Re: Migrating Orders & Customers to Shopify without triggering emails

Solved

Migrating Orders & Customers to Shopify without triggering emails

MichaelBrock
Shopify Partner
1 0 0

I have a client who is migrating some stores to Shopify. They would like to migrate their orders and customers. so I have written a php script which creates the customers and orders in the new Shopify store via the api. However, this process triggers the "Welcome account" and "order confirmation" emails and there is no way to turn those off without subscribing to Shopify Plus and requesting Shopify support to turn them off. Sending 1000s of customers emails related to this migration isn't going to work. Before they jump ship I thought I would ask if anyone knows of any way to migrate those customers and orders without triggering those emails.

 

I apologize of this is in the wrong location. I did not see one that fit better.


Thanks,

Michael

Accepted Solution (1)

SBD_
Shopify Staff
1829 271 415

This is an accepted solution.

Hey @MichaelBrock 

 

There's a send_email_welcome parameter you can use to prevent emails being sent when creating customer accounts. E.g.

 

 

curl -d '{"customer":{"first_name":"Steve","last_name":"Lastnameson","email":"steve.lastnameson@test.com","verified_email":true,"addresses":[{"address1":"123 Oak St","city":"Ottawa","province":"ON","phone":"555-1212","zip":"123 ABC","last_name":"Lastnameson","first_name":"Mother","country":"CA"}],"password":"newpass","password_confirmation":"newpass","send_email_welcome":false}}' \
-X POST "https://your-store.myshopify.com/admin/api/2023-04/customers.json" \
-H "X-Shopify-Access-Token: abc123" \
-H "Content-Type: application/json"

 

 

For orders, there are send_receipt and send_fulfillment_receipt attributes to disable order confirmation / fulfillment emails (docs).

Scott | Developer Advocate @ Shopify 

View solution in original post

Reply 1 (1)

SBD_
Shopify Staff
1829 271 415

This is an accepted solution.

Hey @MichaelBrock 

 

There's a send_email_welcome parameter you can use to prevent emails being sent when creating customer accounts. E.g.

 

 

curl -d '{"customer":{"first_name":"Steve","last_name":"Lastnameson","email":"steve.lastnameson@test.com","verified_email":true,"addresses":[{"address1":"123 Oak St","city":"Ottawa","province":"ON","phone":"555-1212","zip":"123 ABC","last_name":"Lastnameson","first_name":"Mother","country":"CA"}],"password":"newpass","password_confirmation":"newpass","send_email_welcome":false}}' \
-X POST "https://your-store.myshopify.com/admin/api/2023-04/customers.json" \
-H "X-Shopify-Access-Token: abc123" \
-H "Content-Type: application/json"

 

 

For orders, there are send_receipt and send_fulfillment_receipt attributes to disable order confirmation / fulfillment emails (docs).

Scott | Developer Advocate @ Shopify