Hello Team!
Hoping you are well and doing awesome!!
I need your attention and a very urgent help on the following outcomes:
- I am developing a full-functional Loyalty App (Shopify Embedded APP) for AnnexCloud.
- The app is connecting through template and region based mechanism where each template has configured per market based scenario like StoreFront US Market → to → Template id US (392), EU, DE, FR, AT (European Regions) → Template-ID (432)
- Using Customer’s Webhooks upon CREATE/UPDATE fetch currencyCode/customer based metafields tracing out the template_id to which region the customer must be opted for loyalty and which region/template the customer get registered under the loyalty platform. Thus, further I am displaying the loyalty outcomes i.e. rewards, loyalty points, etc.
The issues I am facing as below:
-
Customer’s Related webhooks always provide the currencyCode: USD which is default shop currencyCode; not the market/region code from where the customer get created i.e. EU or UK, or CA. Thus my code tracing out US template id, not the inteded market currency.
-
Applied with customer metafileds, using Presentment currency and market_code, but only comes in cusotmers/updated webhooks not able to pass in customers/created webhooks.
Thus, the customer get created under the US not in intended regions.
Please help me accomplish my task. Any idea will be helpful too.
Waiting for kind response.
Thanks, Jitesh from AnnexCloud
Hi Jitesh,
This is expected Shopify behavior rather than an issue with your implementation.
The customers/create webhook doesn’t reliably include the customer’s Shopify Market or presentment currency. In most cases, the currencyCode reflects the shop’s default currency (e.g., USD), so it isn’t suitable for determining which Market or template the customer belongs to.
A few approaches you could consider:
- Wait for the
customers/update webhook if your required metafields (such as market or presentment currency) are populated afterward, and perform the loyalty registration then.
- Use the customer’s country/address together with Shopify Markets to map the customer to the appropriate template instead of relying on
currencyCode.
- If your business flow allows it, register the customer after the first order, since the order provides much more reliable market and presentment currency information.
- If customers are created through your own storefront flow, consider storing the selected market/template as a customer metafield or passing it to your backend during registration so you don’t have to infer it from the webhook.
Unfortunately, there isn’t a reliable way to determine the customer’s Market directly from the customers/create webhook alone.
Hope this helps!
Thanks @Priyanka_Rawat
yes, I am getting the customer market into the order related webhook and using that too.
But the app is fully customizable with different client aspects. Thus if user want the order flow and the app act like wise. But if customer opted for regular flow with multi_region then their I am getting issues to rectify the user market.
But however, Thanks very much for your kind response.
Jitesh Sinha
From Annex Cloud