Newsletter sign-up
To be able to communicate with customers through an email channel, you need their consent to receive emails.
You can use the Automation module to prepare workflows that facilitate the single and double opt-in scenarios. This article contains instructions how to do that.
The single opt in process saves the marketing agreement (email channel) without a user email confirmation. When a profile sends a newsletter submission form, the agreement is confirmed in their profile card without requiring an email confirmation. The double opt-in process is also started when a customer submits the form, but the agreement is not saved to the profile until they click the confirmation link received by email.
The workflow described further in this article is designed to work with the implementation described in the developer guide. In this setup, you cannot use the single-opt in and double opt-in mechanisms simultaneously in different subscription forms.
Requirements
- Implement a tracking code into your website (instructions: here and here).
- Configure an email account (instructions).
- Go to Data Management > Params Manager and verify that a
newsletter_agreement_enabled
attribute exists. If it does not, create it. For instructions, see this section. - Prepare email confirmation/notification templates, depending on the solution you want to use:
- Notification for single opt-in (the notification is optional)
- Confirmation email for double opt-in (confirmation is required)
- Reminder for double opt-in (the reminder is optional)
Creating the automation trigger
- Go to Automation > Workflows > New workflow.
- Enter the name of the workflow.
- On the dashboard, click Add trigger.
- Select the Data Changed node.
- Open the configuration window by clicking the node.
- From the Choose value dropdown list, select Attributes > newsletter_agreement_enabled.
- From the Choose operator dropdown list, select Equal (String).
- In the text field, enter
enabled
. - Click Apply.
- On the Data Changed node, click THEN.
- From the list, add a Delay node.
- Open the configuration window by clicking the added node.
- Change the delay to 60 seconds and click Apply.
- If you want to only include customers who have not agreed to a newsletter before, add a filter node:
- On the Delay node, click THEN.
- From the dropdown list, select the Profile Filter node.
- Open the configuration window by clicking the added node.
- From the Choose filter dropdown list, select Clients > Attributes > newsletter_agreement (you can use the search field).
- If you use email address as a unique profile identifier, select Clients > Attributes > newsletter_agreement.
- If you configured emails as non-unique, select Clients > Attributes and then the attribute you configured as the email agreement indicator.
- From the Choose operator dropdown list, select Equal.
Result: A text field appears. - In the text field, enter
enabled
. - Confirm by clicking Apply.
- On the filter node, click MATCHED.
- From the dropdown list, select the End node.
Result: If a profile already has newsletter subscription enabled, the journey ends at this point.
- Continue configuring the automation depending on the scenario you need:
Single opt-in
- On the last node you added:
- If you added the optional filter for profiles who previously agreed to newsletters, click NOT MATCHED on the filter node.
- If you didn’t add that filter, click THEN on the Delay node.
- Select the Update Profile node.
- Open the configuration window by clicking the new node.
- From the left dropdown list, select the attribute:
- If you use email address as a unique profile identifier, select Attributes > newsletter_agreement.
- If you configured emails as non-unique, select Attributes and then the attribute you configured as the email agreement indicator.
- From the right dropdown list, select Change.
- In the text field that appears, enter
enabled
. - Click Apply.
- If you want to send a notification, add a notification node:
- On the Update Profile node, click THEN.
- From the dropdown list, select the Send Email node.
- Open the configuration window by clicking the new node.
- In the Sender details section:
- In the From email address field, select the email address from which the email is sent.
- In the From name field, enter the name of the sender that displays in the customer mailbox.
- In the “Reply to” email address field, select the email customers can reply to.
- In the “Reply to” name field, enter the name of the sender.
- Select the Send without marketing agreement checkbox.
- In the Content section:
- In the Subject field, enter the subject of the email (shown in the customer’s mailbox).
- In the Template field, select the template of the notification email.
- In the UTM and URL parameters section, click Skip step and Yes.
- In the Additional parameters section, click Skip step and Yes.
- Click Apply.
- On the last added node, click THEN.
- From the dropdown list, select the End node.
Result: The workflow looks similar to this: - To save the workflow:
- as a draft, click Save.
- and launch it, click Save&Run.
Double opt-in
For your reading convenience, this section is divided into sub-sections for each node.
Send a confirmation email
- On the last node you added:
- If you added the optional filter for profiles who previously agreed to newsletters, click NOT MATCHED on the filter node.
- If you didn’t add that filter, click THEN on the Delay node.
- From the dropdown list, select the Send Email node.
- Open the configuration window by clicking the new node.
- In the Sender details section:
- In the From email address field, select the email address from which the email is sent.
- In the From name field, enter the name of the sender that displays in the customer mailbox.
- In the “Reply to” email address field, select the email customers can reply to.
- In the “Reply to” name field, enter the name of the sender.
- Select the Send without marketing agreement checkbox.
- In the Content section:
- In the Subject field, enter the subject of the email (shown in the customer’s mailbox).
- In the Template field, select the template of the confirmation email.
- In the UTM and URL parameters, click Skip step and Yes.
- Click Apply.
- In the Sender details section:
Wait for confirmation
- On the Send email confirmation node, click THEN.
- From the dropdown list, select Event Filter.
- Open the configuration window by clicking the new node.
- In the Check drop-down list, select without limits (default).
- From the Choose event dropdown list, select
newsletter.click
. - Click the + where button.
- From the Choose parameters dropdown list, select
url
. - As the logical operator, select Contain.
Result: A text field appears. - In the text field, enter the agreement confirmation URL.
- Confirm by clicking Apply.
Update newsletter agreement
- On the Event Filter node, click THEN or MATCHED.
- From the dropdown list, select the Update Profile node.
- Open the configuration window by clicking the new node.
- From the left dropdown list, select the attribute:
- If you use email address as a unique profile identifier, select Attributes > newsletter_agreement.
- If you configured emails as non-unique, select Attributes and then the attribute you configured as the email agreement indicator.
- From the right dropdown list, select Change.
- In the text field that appears, enter
enabled
. - Click Apply.
- On the Update Profile node, click THEN.
- From the dropdown list, select the End node.
Result: The workflow looks similar to this: - Save the automation or add a reminder:
- If you want to add an email confirmation reminder, continue to Adding the confirmation reminder node.
- If you want to save the workflow as a draft, click Save.
- If you want to save and launch the workflow, click Save&Run.
Optional: add confirmation reminder
In the double opt-in scenario, you can add an email reminder.
- Click the Event Filter node.
- In the Check drop-down list, select for period of time.
- In the Time range section that appears, set the period after which the reminder will be sent.
- Click Apply.
- On the Send Email node, click the three dots icon (it appears when you hover your cursor over the node) and select Duplicate.
- Optional: Change the email template used in the duplicate Send Email node.
- From NOT MATCHED on the Event Filter node, drag a path to the duplicate Send Email node.
- On the Event Filter node, click the three dots icon (it appears when you hover your cursor over the node) and select Duplicate.
- Click the duplicate Event Filter node.
- In the Check drop-down list, select without limits.
- Click Apply.
- From THEN on the Send Email node, drag a path to the duplicate Event Filter node.
- On the Update Profile node, click the three dots icon (it appears when you hover your cursor over the node) and select Duplicate.
- From MATCHED on the duplicate Event Filter node, drag a path to the duplicate Update Profile node.
- On the duplicate Update Profile node, click THEN.
- From the dropdown list, select the End node.
Result: The workflow looks similar to this: - To save the workflow:
- as a draft, click Save.
- and launch it, click Save&Run.