In Checkout UI, is there a way to check existence of a customer tag (to conditionally return text)?

In Checkout UI, is there a way to check existence of a customer tag (to conditionally return text)?

Pseudo code, for example sake only, would be something like this:

//----- RENDER EXTENSION
if (customer.tags.includes(“ChannelPartner”)) {
return (
You are a valued channel partner. Thank you for your order.
);
}
return (
Thank you for your order.
);

Hi there :waving_hand:
At this time the customer tags are not available in Checkout UI extensions, but this could be possible with metafields on the customer instead!

In your toml file you would specify which namespaces and keys of metafields you would like the extension to load. Then that data would be accessible with the useAppMetafield hook.

You could then conditionally render the information to the customer.

If this doesn’t solve for your use case please create an issue in this github repository explaining why in your use case you must use customer tags instead of metafields on the customer.

1 Like

In my case moving the customer tag to a company location metafield is an acceptable solution.

why in your use case you must use customer tags instead of metafields on the customer.

Theres many integrations tied to the existing tag setup on the customers… tags seems like a pretty basic feature to offer read access to, when will the ability be in place? “Just migrate it to metafields” is not a solution.

4 Likes