When using the Storefront API with the "customerCreate" mutation, I notice that all customers created this way are automatically activated.
1) What is the reasoning behind this? Is the idea that a custom Storefront will only defer to Shopify for authentication in the backend, and will handle end-user facing notifications and e-mail validation itself? If so, why does it not trust the "acceptsMarketing" field then and sends out the confirmation link notification when it is set to true?
2) Is there a way to create a customer without activating the customer?
3) Is there a way to create a customer without activating the customer, and have Shopify send out its usual activation notification, and follow its normal activation workflow?
When using the storefront API, the action of creating a customer assumes the customer is taking this action themselves on the storefront, in which case an account is created for them.
A customer record will be created automatically for any customer that places an order on the store. A customer record means the customer exists in the store, but there is no account created for them. There's a few ways to convert an existing customer record into a customer account. If you want to create an account for a customer that already exists, you can send the customer an invitation from the customer page in the Shopify admin, or by using an app such as the Bulk Account Invite Sender. A customer who has previously made a purchase can also create an account for themselves by simply going through the customer create flow. When an account is created for a customer who already exists in the store, the sales history of the existing customer is merged with the new customer account.
If you haven't already, I recommend checking out this guide which walked through the different steps of creating/modifying customers through the storefront API.
JB | Developer Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Click Accept as Solution