Use Dotdigital with Shopify Flow
Shopify Flow lets you extend Shopify's native automation functionalities with actions and triggers.
Dotdigital offers three actions:
Add to marketing program
Add customers to an existing omnichannel marketing program in DotdigitalCreate or update contact
Create a contact in Dotdigital or update if the contact already existsSend transactional email
Send a transactional email using an existing Dotdigital campaign
Shopify Flow actions
The process of installing the Dotdigital app to your Shopify store imports the Dotdigital actions to Shopify Flow.
Before you start
Things you need to know:
The Shopify Flow app is available from the Shopify app store.
Set up the Add to marketing program action
First, you must have an existing active program in your Dotdigital account with a Start node set to No scheduled enrolment. If the program is deactivated or in a draft state, the action fails and is retried by Shopify at increasing intervals for up to three days.
Learn more about creating programs in Dotdigital in the Program Builder section of our Help Centre.
To configure the action:
In Shopify Flow, select Create workflow or select an existing workflow to edit it.
For a new workflow, you need to Select a trigger.
To add a new action select the + symbol on the preceding node, then select Action.
Under Installed App Actions, select dotdigital Engagement Cloud.
Select Add to marketing program.
In the Customer email address field enter either
##{{ customer.email }}
or##{{ order.email }}
. Choose the variable most relevant to the trigger you have chosen for your workflow.Shopify Liquid variables
You must ensure that any variable you enter such as
##{{ customer.email }}
is not preceded nor followed by a space. Spaces before or after the brackets will cause the variable to appear invalid.
In the Program ID field, enter the relevant program ID. To find the ID, open the program in Dotdigital's program builder and look for the ID in the URL (e.g. .../Edit?id=xxxxxxx...)
Edits you make to your workflow are saved automatically. To activate the workflow select Turn on workflow.
Each time the workflow runs, it creates a new program enrolment in Dotdigital. If the contact doesn't already exist in Dotdigital, they are created and then enrolled.
Pending contacts
If the Dotdigital account's regulatory settings are set to Enforce double opt-in for all signups, including bulk uploads, and the contact is pending at the point of enrolment, the enrolment will fail and won't be retried.
Learn more about account regulatory settings in Managing your account settings and options.
Set up the Create or update contact action
In Shopify Flow, select Create workflow or select an existing workflow to edit it. For a new workflow, you need to Select a trigger.
Select the + symbol then select Action.
Under Installed App Actions, select dotdigital Engagement Cloud.
Select Create or update contact.
In the Customer email address field, enter
##{{ customer.email }}
or##{{ order.email }}
. Choose the variable most relevant to the trigger you have chosen for your workflow.In the List ID field, add the ID for the Dotdigital list the contact should be added to. To find a list ID, open the list in Dotdigital and look for the the ID in the URL (e.g. .../contactmanager/#/audience/lists/XXXXX). You can only add one list per action.
Under Customer data fields you can add a list of Dotdigital Contact data fields and the corresponding value that the field should contain. Values can be static text, or you can specify a Shopify variable. Select Add a variable to choose from a list of Shopify Liquid variables.
Contact data fields should be added as a list, with each entry on a new line. The data field name must appear exactly as it appears in Dotdigital.For boolean data types, provide Yes or No only.
For text data types, either enter static text or use a Flow Liquid variable such as
##{{ order.discount.Code }}
.For date data types, use the DD/MM/YYYY HH:MM format (e.g. 09/01/2018 7:11 pm)
Select Resubscribe if previously unsubscribed if you wish to send a resubscribe email to newly added contacts who were previously unsubscribed.
Select Verify your contact with double opt-in if you wish to send a double opt-in confirmation email to new contacts (if selected, the confirmation email will be sent to all new contacts who pass through your workflow regardless of your Dotdigital account regulatory settings).
Edits you make to your workflow are saved automatically. To activate the workflow select Turn on workflow.
Each time the workflow runs, it creates or updates a contact in Dotdigital.
Set up the Send transactional email action
First, you must have an existing triggered campaign in your Dotdigital account, and if you choose to use personalisation in your transactional email, the campaign must contain the relevant personalisation placeholders.
Support for transactional email templates
Learn more about what campaign features are supported or not supported for transactional emails in Create, design and send a transactional email template.
To configure the action:
In Shopify Flow, select Create workflow or select an existing workflow to edit it.
For a new workflow, you need to Select a trigger.
Select the + symbol then select Action.
Under Installed App Actions, select dotdigital Engagement Cloud.
Select Send transactional email.
In the Customer email address field, enter ##{{ customer.email }} or ##{{ order.email }}. Choose the variable most relevant to the trigger you have chosen for your workflow.
In the Triggered Campaign ID field, you need to add the ID of your chosen triggered campaign. To find the ID, open up the triggered campaign in Dotdigital and you'll find it in the URL (e.g. …./Campaigns/Step/EasyEditor.aspx?id=XXXXXXX).
Adding personalisation to your transactional email is optional. To do so, you can add in key-value pairs to the Personalisation Values field - for example, FIRSTNAME:
##{{ order.customer.firstName }}
. Select Add template variable to choose the correct variable. You need to separate each key-value pair using a new line.
Edits you make to your workflow are saved automatically. To activate the workflow select Turn on workflow.
Anytime the workflow runs, it sends your transactional email as configured.
Personalisation for transactional emails
The personalisation placeholders used in transactional email are unrelated to Dotdigital’s Contact data field personalisation, although the placeholders used within your triggered campaign use the same @XXXXXXXX@ format.
To ensure that your personalisation works correctly when you send a transactional email using Shopify Flow, the placeholders in your triggered campaign must match the key name you enter when you configure the Send transactional email action.
Example
Your personalisation values in the Send transactional email action are entered as below:
FIRSTNAME:##{{order.customer.firstName}}
LASTNAME:##{{order.customer.lastName}}
ORDERREF:##{{order.id}}
Your triggered campaign in Dotdigital should use those same key names as personalisation placeholders:
These placeholders are replaced with the corresponding data from the Liquid variable you have specified when the transactional email is sent.
The process to send personalised transactional emails using Shopify Flow differs from the process to send personalised transactional emails from Shopify directly. When sending directly, only Shopify Liquid variables are used in the campaign template. For sending through Shopify Flow, you must use the key-value pairs and placeholders.
Campaign save warning
You may see a warning message when saving a campaign which contains placeholders which do not match contact data fields within your Dotdigital account.
For a campaign you are sending as a transactional email you can ignore this warning and select Save anyway.