Skip to content

Conversation

@jpotts244
Copy link
Contributor

@jpotts244 jpotts244 commented Nov 21, 2025

The type of this PR is: FEAT

This PR resolves Shipping-Preset-Project-tracking

Description

Adjusting and adding some new tracking details for the shipping presets flows

See thoughts inline

PR Checklist (tick all before merging)

  • If I've added a new file to the tree I've exported it from the common index.ts
  • I've added comments with examples for any new interfaces and ensured that they're in the docs
  • No platform-specific terminology has been used outside of click and tap (platform is inferred by the DB storing events)

cc @artsy/amber-devs

@artsy-peril artsy-peril bot added the Jira Synced Indicates that Peril has connected this PR to Jira label Nov 21, 2025
@artsyit artsyit added the Version: Minor A deploy for new features label Nov 21, 2025
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.

@jpotts244 jpotts244 marked this pull request as ready for review November 24, 2025 14:57
values?: 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)

@jpotts244 jpotts244 changed the title [needs additional audit]: Adds optional shipping_preset_id to some click events for edits and a… feat: Adds optional shipping_preset_id to some click events for edits and a… Nov 24, 2025
@jpotts244 jpotts244 changed the title feat: Adds optional shipping_preset_id to some click events for edits and a… feat: Tracking needs for Shipping Presets project Nov 24, 2025
@jpotts244 jpotts244 requested a review from leodmz November 24, 2025 15:02
@jpotts244 jpotts244 self-assigned this Nov 24, 2025
@jpotts244 jpotts244 requested a review from fladson November 24, 2025 15:04
Copy link
Contributor

@lidimayra lidimayra left a comment

Choose a reason for hiding this comment

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

LGTM!!! 🚀

values?: string[]
artwork_ids: string[]
shipping_preset_id?: string
}
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.

@jpotts244 jpotts244 merged commit de4300d into main Nov 24, 2025
12 of 13 checks passed
@jpotts244 jpotts244 deleted the jpotts244/shipping-preset-events branch November 24, 2025 16:21
@artsyit
Copy link
Collaborator

artsyit commented Nov 24, 2025

🚀 PR was released in v4.326.0 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Jira Synced Indicates that Peril has connected this PR to Jira released Version: Minor A deploy for new features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants