Using Triggered Messages with Optimizely Campaign
This topic describes how to connect Triggered Messages A product that lets you send automated personalized emails via an Email Service Provider (ESP), which are initiated by the the email recipient's on-site actions. to Optimizely Campaign.
To use Triggered Messages with Optimizely Campaign, your system administrator or developer must configure tracking first as described in the technical documentation on Optimizely World. When tracking is configured, you can continue to set up Triggered Messages following the steps described here.
Sending triggered emails
You need to create a mailing campaign in Optimizely Campaign, and campaigns in both Triggered Messages and Email Product Recommendations. In Triggered Messages, you also need to create a connection to your recipient list in Optimizely Campaign and specify the appropriate action to take.
The following image shows the flow, through Triggered Messages and Optimizely Campaign, when users abandon their basket triggering an email to be sent to them directly.
To set up the Triggered Messages-to-Campaign integration, do the following.
- Optimizely Personalization Portal > Triggers, set up the following:
- ESP connection to connect to the Optimizely Campaign HTTP API. Enter the Recipient list authorization code, which is a token giving authorization access to a particular recipient list. See Retrieving the Recipient list authorization code and also Setting up an ESP connection.
- ESP action to set up one of the following actions:
- Send Message to user. Specify a Mailing ID for the email template in Optimizely Campaign. The previous chart shows this action being used. See Creating a Send message to user action and also Setting up an ESP action.
- Add user to target group. Specify a User property name and a User property value. See Creating an Add user to target group action.
- Remove user from target group. Specify a User property name. See Creating a Remove user from target group action.
- Setting up a Triggered Messages campaign with a specific strategy, such as Abandoned basket .
- In Optimizely Campaign, you need the following:
- A Recipient list.
For compliance reasons, Triggered Messages can only send emails to users that already exist in the recipient list.
To add new users to the recipient list and make them available for Triggered Messages, you can use a Campaign API. For more information on Campaign's APIs, see Optimizely Campaign's APIs and libraries.
Please note the legal requirements regarding the advertising consent of the recipients.
- A Transactional mail campaign.
- Set up an associated transactional mail campaign in Optimizely Campaign by copying the generated HTML code from Email Product Recommendations and pasting it into the email template (with that Mailing ID) on the Optimizely Campaign portal. The HTML code contains placeholders that the ESP (that is, Optimizely Campaign) replaces with the actual values for each email sent.
- A Recipient list.
When an Optimizely trigger fires, using the Optimizely Campaign HTTP API, Triggered Messages sends Optimizely Campaign the following for a Send Message action:
- Recipient list authorization code. A Recipient list authorization code creates a connection between Optimizely Campaign and the Personalization Portal, and adds the triggerFireId to a user’s entry in the recipient list.
- Mailing ID. For Send Message, for that Mailing ID, Optimizely Campaign replaces the placeholders in the Email Product Recommendations template HTML code with the values sent in the API request.
- triggerFireId. Replaced with the ID of the Triggered Messages campaign sent in the API request.
- Either of the following:
- recipientid. Replaced with the user’s email address sent in the API request.
- bmThirdPartyId. Replaced with the user's email address mapped from their pseudonymized Encryption of personal data using combinations of letters or numbers. user ID.
Retrieving the Recipient list authorization code
To retrieve the Recipient list authorization code:
- Open the Optimizely Campaign menu and select Administration > API Overview in Optimizely Campaign.
- Select Recipient lists to show its table.
- Select your recipient list from the table.
- Click Manage authorization codes.
- From the Manage Authorization Codes view, copy the authorization code.
- Paste the authorization code into the Personalization Portal, on the Triggered Messages > ESP connections page.
- Enter the connection name.
- Select Episerver Campaign as the name of your ESP.
- Click Test ESP connection.
- If the connection was successful, click Save ESP connection.
Linking to a specific basket
Optimizely can integrate links from an email recommendation to a particular basket of the recipient. To enable this feature, contact customer service.
For developer information, see Link to a specific basket on Optimizely World.
Creating an ESP action
See also Setting up an ESP action.
Creating a Send message action
To send messages using Triggered Messages directly to users, you need to provide the Mailing ID of the Optimizely Campaign campaign on the Triggered Messages ESP action page. You can retrieve the Mailing ID by following these steps:
- Open the Optimizely Campaign menu and select Campaigns > TransactionalMails in Optimizely Campaign.
- Copy the Mailing ID for your campaign from the ID column.
- In the Personalization Portal, go to Configuration > Triggered Messages > ESP actions > selected action and paste the Mailing ID.
- ESP action name. Enter the action name.
- ESP connection. Select the connection that you created earlier.
- ESP action type. Select Send message to user.
- Mailing ID. Enter the campaign Mailing ID.
- Test ESP action. Enter the email address of the email recipient and click Test ESP action.
- If the test is successful, click Save ESP action.
Creating an Add user to group action
- In the Personalization Portal, go to Configuration > Triggered Messages > ESP actions > selected action.
- ESP action name. Enter the action name.
- ESP action type. Select Add user to group.
- ESP connection. Select the connection that you created earlier.
- Group ID. Enter the group identifier.
- Test ESP action. Enter your email address of the user and click Test ESP action.
- If the test is successful, click Save ESP action.
Create a Remove user from group action
- In the Personalization Portal, go to Triggers > New campaign > ESP actions page.
- ESP action name. Enter the action name.
- ESP action type. Select Remove user from group.
- ESP connection. Select the connection that you created earlier.
- Group ID. Enter the group identifier.
- Test ESP action. Enter the email address of the user and click Test ESP action.
- If the test is successful, click Save ESP action.
Setting up an email campaign in Optimizely
The following procedure shows how to generate HTML code to copy from Optimizely Email Product Recommendations into a mailing in the Optimizely portal.
- In the Personalization Portal, go to Email Product Recommendations > Campaigns.
- Select and open your Email Product Recommendations campaign.
- In the Configuration tab, choose a trigger strategy.
- Go to the HTML and preview tab.
- Select Optimizely Campaign as the Email service provider.
- Click Generate code.
- Copy the HTML code displayed in the window.
- Go to Optimizely Campaign.
To create a new mailing in Optimizely Campaign, go to Campaigns > Transactional mails and following the instructions in Transactional mails.
- Open the Optimizely Campaign menu and select Campaigns > Transactional Mails.
- Select your email campaign.
- Click Edit.
- In the Edit transactional mail window that opens, click the email node and click Edit .
- Click Edit content.
- In the editor, add or find the Source Code paragraph where you want to insert the Optimizely recommendations. In the image below, a separate Text/Image paragraph was added above for the heading Recommendation Paragraph.
- Click the HTML tab.
- In the Source code field, paste the HTML code (copied in step 6):
You can modify the HTML to add the default image size that is sent for empty images that have no products. If you do not change the HTML, the default for both width and height is 1px for empty images that have no products. For example:
<a href="https://abcde.optimizely.net/link.page? e={bmThirdParty}&site=clientsite&wid=12345&rno="0"> <img src="https://abcde.optimizely.net/image.page? widthIfEmpty=100&heightIfEmpty=200& e={bmThirdPartyID}&site=clientsite&wid=12345&rno=0" alt="Just for you" title="Just for you" /></a> <a href="https://abcde.optimizely.net/link.page? e={bmThirdParty}&site=clientsite&wid=12345&rno="0"> <img src="https://abcde.optimizely.net/productinfo.page? widthIfEmpty=100&heightIfEmpty=200& e={bmThirdPartyID}&site=clientsite&wid=12345&rno=0" alt="Just for you" title="Just for you" /></a>
- Click Apply.