Using Triggered Messages with Episerver Campaign

This topic describes how to connect Triggered MessagesA 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 Episerver Campaign.

To use Triggered Messages with Episerver Campaign, your system administrator or developer must configure tracking first as described in the technical documentation on Episerver 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 Episerver 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 Episerver Campaign and specify the appropriate action to take.

The following image shows the flow, through Triggered Messages and Episerver Campaign, when a user abandons their basket triggering an email to be sent to them directly.

Image: Triggers-to-Campaign flow chart

To set up the Triggered Messages-to-Campaign integration, do the following.

  • Episerver Personalization Portal > Triggers, set up the following:
  • Episerver Campaign portal, set up the following:
    • Recipient list, which include a Recipient list authorization code.

      To receive an email from Triggered Messages, the end user must exist in this Recipient list (which contains only end users who have opted-in).

    • Transactional mail campaign, which will have a Mailing ID.
    • Set up an associated transactional mail campaign in Episerver Campaign by copying the generated HTML code from Email Product Recommendations and pasting it into the email template (with that Mailing ID) on the Episerver Campaign portal. The HTML code contains placeholders that the ESP (that is, Episerver Campaign) replaces with the actual values for each email sent.

When an Episerver trigger fires, using the Episerver Campaign HTTP API, Triggered Messages sends Episerver Campaign the following for a Send Message action:

  • Recipient list authorization code. A Recipient list authorization code creates a connection between Episerver 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, Episerver Campaign replaces the placeholders in the Email Product Recommendations template HTML code with the values sent in the API request.

Retrieving the Recipient list authorization code

To retrieve the Recipient list authorization code:

  1. Open the start menuMain screen in Episerver Campaign, where the available options are grouped together. and select Administration > API overview.
  2. Select Recipient lists to show its table.
  3. Select your recipient list from the table.
  4. Click Manage authorization codes.

    Image: Manage Authorization Codes button

  5. From the Manage Authorization Codes view, copy the authorization code.

    Image: Manage Authorization Codes screen

  6. Paste the authorization code into the Personalization Portal, on the Triggers > New campaign > ESP connections page.

    Image: ESP connections screen

  7. Enter the connection name.
  8. Select Episerver Campaign as the name of your ESP.
  9. Click Test ESP connection.
  10. If the connection was successful, click Save ESP connection.

Linking to a specific basket

Episerver 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 Linking to a specific basket on Episerver 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 Episerver Campaign campaign on the Triggers ESP action page. You can retrieve the Mailing ID by following these steps:

  1. Open the start menuMain screen in Episerver Campaign, where the available options are grouped together. and select Campaigns > Transactionalmails.
  2. Copy the Mailing ID for your campaign from the ID column.

    Image: Copy Mailing ID for your campaign from the ID column

  3. In the Personalization Portal, go to Triggers > New campaign > ESP actions page and paste the Mailing ID.

    Image: Paste the copied Mailing ID

    1. ESP action name. Enter the action name.
    2. ESP connection. Select the connection that you created earlier.
    3. ESP action type. Select Send message to user.
    4. Mailing ID. Enter the campaign Mailing ID.
    5. Test ESP action. Enter the email address of the email recipient and click Test ESP action.
  4. If the test is successful, click Save ESP action.

Creating an Add user to target group action

  1. In the Personalization Portal, go to Triggers > New campaign > ESP actions page.

    Image: Manage your ESP actions screen

    1. ESP action name. Enter the action name.
    2. ESP action type. Select Add user to target group.
    3. ESP connection. Select the connection that you created earlier.
    4. User property name. The name of the user property in your recipient list that you want Triggered Messages to update. The name you specify must match exactly the internal name of the field in your recipient list.
    5. User property value. The value of the user property given in the previous step. In this example, the User property name is language and the User property value is the language code of the user, (en in this case). The language code configures email campaigns that feed the products into the email with the correct currency for each language, and ensures the titles are displayed in the correct language and the prices are in the correct currency. For ambiguous language codes, such as English (which can have different currencies in the US and UK, for example), Episerver Campaign performs an additional check on the user information to use the correct currency.
    6. Test ESP action. Enter your email address of the user and click Test ESP action.
  2. If the test is successful, click Save ESP action.

Create a Remove user from target group action

  1. In the Personalization Portal, go to Triggers > New campaign > ESP actions page.

    Image: Manage your ESP actions screen

    1. ESP action name. Enter the action name.
    2. ESP action type. Select Remove user from target group.
    3. ESP connection. Select the connection that you created earlier.
    4. User property name. The name of the user property in your recipient list that you want Triggered Messages to update. The name you specify must match exactly the internal name of the field in your recipient list (language in this example).
    5. Test ESP action. Enter the email address of the user and click Test ESP action.
  2. If the test is successful, click Save ESP action.

Setting up an email campaign in Episerver

The following procedure shows how to generate HTML code to copy from Episerver Email Product Recommendations into a mailing in the Episerver portal.

  1. In the Personalization Portal, go to Mail > Campaigns.
  2. Select and open your Email Product Recommendations campaign.
  3. In the Configuration tab, choose a trigger strategy.
  4. Go to the HTML and preview tab.
  5. Select Episerver Campaign as the Email service provider.
  6. Click Generate code.
  7. Copy the HTML code displayed in the window.

    Image: Example of generated HTML code

  8. Go to Episerver Campaign.

    To create a new mailing in Episerver Campaign, go to Campaigns > Transactional mails and following the instructions in Transactional mails.

  9. Open the start menuMain screen in Episerver Campaign, where the available options are grouped together. and select Campaigns > Transactional emails.
  10. Select your email campaign.
  11. Click Edit.
  12. In the flow diagram that opens, click the campaign and click Edit (pencil icon).
  13. Click Edit content.
  14. In the editor, add or find the Source Code paragraph where you want to insert the Episerver recommendations. In the following image, a separate Text/Image paragraph was added above for the heading Recommendation Paragraph.
  15. Click Source code.
  16. Paste the HTML code (copied in step 6) into the right-hand panel:

    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.episerver.net/link.page?
    e={bmThirdParty}&site=clientsite&wid=12345&rno="0">
    <img src="https://abcde.episerver.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.episerver.net/link.page?
    e={bmThirdParty}&site=clientsite&wid=12345&rno="0">
    <img src="https://abcde.episerver.net/productinfo.page?
    widthIfEmpty=100&heightIfEmpty=200&
    e={bmThirdPartyID}&site=clientsite&wid=12345&rno=0" 
    alt="Just for you" title="Just for you" /></a>
    

    Image: Paste copied HTML code

  17. Click Apply.