Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/Schema/CMS/Events/BulkEditFlow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export type CmsBulkEditClickLabel =
| "publish"
| "publish learn more"
| "resolve all conflicts"
| "shipping preset"
| "shortlist"
| "unpublish"

Expand Down Expand Up @@ -135,6 +136,7 @@ export interface CmsBulkEditProcessingCompleted {
label: string
value: string
artwork_ids: string[]
shipping_preset_id?: string
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably the diff I'd like the most feedback on!

Allowing the CmsBulkEditProcessingCompleted event to support optional arrays for labels and values

This is needed as all shipping/pickup related fields will be sent over at one time

Ex:

  {
    action: "processingCompleted",
    context_module: "Artworks - bulk edit",
    labels: ["change domesticShipping", "change internationalShipping", "change collectorPickup"],
    values: ["2000", "3000", "1000"],
    artwork_ids: ["artwork1", "artwork2"],
    shipping_preset_id: "preset123"
  }

And here's the UI, all domestic, international, and collector pickup are sent over on a single click

Screenshot 2025-11-24 at 10 00 44 AM

Copy link
Contributor Author

@jpotts244 jpotts244 Nov 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me know if this raises any red flags on your end @leodmz !

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the optional array bit is fine.
I'm a bit concerned with amending an attribute on an existing event though. We've had issues in the past when trying to change the type of an attribute after it already started being fired.
This is a bit different but we should try firing some examples in prod' to see what it looks like in redshift

Copy link
Contributor Author

@jpotts244 jpotts244 Nov 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The singular label and value singular will continue to fire as expected/untouched

The array fields are brand new attributes on the event - labelsand values will be separate optional fields and only be used when we are ready!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah I see now. No concerns from my side then :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohh interesting this wasn't already the case.

This probably means we're not capturing all of them in case of signature then (signature section on the drawer already provides multiple fields).

It shouldn't be a big deal as I believe @leodmz is relying on the actual db tables for most of the tracking events related to the updated fields, but just something to be aware of.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes you are right @lidimayra, looks like we never send over the text field value when a user updates a signature in batch edits

I've updated this example to signature: hand signed and notes of "bottom left hand" and notice we only send the first value

Screenshot 2025-11-24 at 11 19 05 AM

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐛 , let me know if we should ticket this to use the array values event type as well!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say only if @leodmz thinks it might be useful somehow (if we never had it and we never lacked it, it might not even be needed, given our analysis are usually on top of the data provided by Gravity db tables)


/**
Expand Down
2 changes: 2 additions & 0 deletions src/Schema/Events/Click.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1627,6 +1627,7 @@ export interface ClickedPublish {
context_module: ContextModule
artwork_id: string
label: string
shipping_preset_id?: string
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these ones I want to look into more - maybe its ok to have such a specific optional field on a very generic artwork click event (?)

Copy link
Contributor

@lidimayra lidimayra Nov 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's the idea. These are already specific actions (ClickedPublish, ClickedSave). They only get triggered in CMS when hitting the CTAs, so by adding this we can always capture the shipping preset id on saving and publishing.


/**
Expand All @@ -1650,6 +1651,7 @@ export interface ClickedSave {
context_module: ContextModule
artwork_id: string
label: string
shipping_preset_id?: string
}

/**
Expand Down