We run an extension on the Thank You and Order Status pages which calls an API on our backend. This API does some rule based segmentation (think “if this, then that”) which in turn is used to render different offers to the customer within Shopify.
We use factors such as the purchase amount, the email address of the customer and their language to allow clients to change the offer.
For instance, a high value transaction might get a high value offer - while a low value transaction might get something smaller (or nothing at all).
Pre-Shopify Extensibility, our clients placed a JavaScript tag into their “Additional Scripts” section, which in turn allowed them to pass us additional data of their choice. It was very flexible.
Most often, this data would be factors such as Customer Tags or Customer Metafields.
e.g. a client might pass us a tag or metafield value like “VIP”, which we could use to adjust the offer we present. Examples our clients might use tags and metafields for at the moment might include:
- Loyalty scheme membership
- Whether they’re a VIP or other “special” customer
- Whether they’ve bought a certain product range previously (e.g. a pizza oven company doesn’t want to offer discounts on the same pizza oven to people who’ve already got one. It’s better to offer discounts on accessories)
Our clients would like us to build equivalent functionality within Checkout Extensibility.
As we operate around 70 ish clients, they each have different models for how they segment their customers.
Some clients use tags, while others have various metafields. None of them are consistent. (The only consistency is their inconsistency!)
I understand from reading the documentation that neither of these are available to use - and migrating to Checkout Extensibility on the post purchase pages (Thank You & Order Status) would break this functionality.
We would like them both to be available / accessible. We would expect to be able to call an API something like:
const tags = getCustomerTags()
or
const metafields = getCustomerMetafields();
We’d expect that we do any transformation of that data before sending it to our API. e.g. segment=${tags.join(",")}
Otherwise our clients will not be able to segment the way they would like to. They would need to be available at the same time as any other data (e.g. order total, email, etc) in order to be valuable for us.
A similar issue has been raised Customer metafields are not available in the Checkout UI extensions for the Order Status Page · Issue #1904 · Shopify/ui-extensions · GitHub.