There are situations where the courier API requires an email address when generating a shipping label, but the store's checkout process collects only a phone number because some customers either do not have or do not wish to provide an email address.
For such cases, an email address can be automatically added. The email address must be valid, as some couriers may send useful information, such as updates about the order or details about the locker used for delivery.
Therefore, stores can create an email address to automatically add to orders when this field is not filled in.
The solution below works for email addresses with the @gmail.com domain.
Suppose a different domain is desired (other than @gmail.com). In that case, specific settings supported by the hosting domain must be followed because some systems do not accept emails sent to addresses containing the "+" character.
Steps for implementing the flow that automatically adds an email address:
Create a new gmail email address that will always be added to orders without a client email address.
Import the flow attached to this article into Shopify > Flows.
Edit the email address saved in the Flow with your newly created email address.
Activate the flow.
How to edit the email address in the Flow:
The current flow automatically saves the email address example@gmail.com to the order using the following line of code:
"email": "example+{{order.name|remove:"#"}}@gmail.com"
You need to replace this email address with your own: delete example and add your own email address.
For example, if you create your own email address shoporders@gmail.com, you will replace the line of code, and it will look like this:
"shoporders+{{order.name|remove:"#"}}@gmail.com"
Here is the the email address as an exampleYou just have to replace 'example' with your own email address.
How it works:
The order is placed without an email address
Wait for the flow to run after 2 minutes.
The email address you saved in the Flow is automatically added to the order.
Each email address is unique, with the order number automatically appended. Emails sent to addresses like example+1752@gmail.com will still be delivered to the primary address example@gmail.com.
Order 1752 was placed without an email address. After 2 minutes, the email address was automatically added by the flow.
How to test the flow:
Place a test order on your website without entering an email address.
Wait for 2 minutes.
Check if the email address was automatically added to the order.
Feel free to contact us if you need any further information:
Chat: click on the blue chat icon (bottom-right)
E-mail: support@xconnector.app
Phone: +4 0373 747 991
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article