Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Receiving wrong welcome email language when registering through Storefront API

Solved

Receiving wrong welcome email language when registering through Storefront API

ocastx
Shopify Partner
31 6 12

Hi all,

 

when using the Storefront API to register a customer, we found an issue that Shopify sends out the welcome e-mail with the wrong language selected. 

 

We create the customer using the customerCreate mutation and specify the Accept-Language header. Furthermore, we have set the @inContext directive with language parameter. Still, the customer always receives emails in english, not in the one we specified. 

 

Is there any parameter we are not aware of that controls this behavior? 

 

Thanks in advance!

Accepted Solution (1)

Liam
Community Manager
3108 344 889

This is an accepted solution.

Hi Ocastx,
 
The `Accept-Language` header and `@inContext` directive are both used to specify the language of the Storefront API responses, but they might not affect the language used in Shopify's automated emails, such as the welcome email. The language used in these emails is typically determined by the customer's language preference in their customer profile within Shopify, so it's separate to the Storefront API.
 
Could you create customers via the Admin `customerCreate` mutation instead of the Storefront API one, as this has a locale field and may apply the language settings? Alternatively, you could create a custom welcome email and send it to the customer using your own email service provider. This way, you can control the language in which the email is sent.
 
Hope this helps,

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Reply 1 (1)

Liam
Community Manager
3108 344 889

This is an accepted solution.

Hi Ocastx,
 
The `Accept-Language` header and `@inContext` directive are both used to specify the language of the Storefront API responses, but they might not affect the language used in Shopify's automated emails, such as the welcome email. The language used in these emails is typically determined by the customer's language preference in their customer profile within Shopify, so it's separate to the Storefront API.
 
Could you create customers via the Admin `customerCreate` mutation instead of the Storefront API one, as this has a locale field and may apply the language settings? Alternatively, you could create a custom welcome email and send it to the customer using your own email service provider. This way, you can control the language in which the email is sent.
 
Hope this helps,

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog