Setting Up Recommendations for Trigger Campaigns

The recommendation blocks in the email are placed in stripes. Stripe’s code contains the rules for substituting dynamic data.

You will find the Abandoned browse template in your account, where this stripe is already set up. 

You only need to create data sources and insert their names into the stripes’ code.

We will show how to create a trigger template with two dynamic stripes: one with products viewed by the user and one with recommendations based on products viewed. Each stripe requires its data source.

Recommendation Setup Steps

  1. Create data sources based on the Abandoned view (up to 6 products) and Recommendations for 6 abandoned views (up to 6 rec.) algorithms.
Settings menu underlined in the account dropdown with the Data sources section and the New data source button highlighted
📘

Note

Most algorithms are designed for specific advanced segmentation triggers and work only in them. Setting up a universal algorithm is described in the article Setting Up Product Recommendations for Promo Campaigns.

  1. Go to the Messages section on the Messages tab and click New Email.
Messages section with the Messages tab, the Email channel underlined, and the New Email button highlighted
  1. Select the Abandoned browse basic template.
Create new Email gallery with the Lifecycle emails category and the Abandoned browse template highlighted

The template contains 2 stripes with product cards:

  • the first (You recently viewed) — with dynamic settings;
  • the second You may also like) is illustrative, without dynamic settings.
  1. Select the first stripe with products and open its code.
Abandoned browse template with the product stripe framed and the code editor icon highlighted in the top panel
  1. In the #foreach($item in $data.get('views')) line, replace views with the name of the data source you created based on the Abandoned view (up to 6 products) algorithm.
Stripe code showing the foreach line with the data source name parameter underlined in red
  1. Customize the stripe’s appearance.

The stripe’s structure is universal: depending on the number of viewed items, the recipient will see one, two, or three cards in a row.

You can change the design of the stripe’s elements: colors, text, and background.

We do not recommend changing the stripe’s structure, i.e., the arrangement of its elements to each other: this will break the layout, and the recipient will see an incorrect display of the email’s content. Also, you cannot change the variables specified in the structure blocks since they are responsible for displaying product data from your feed.

If you want to create a fundamentally different structure with dynamic content, please send a request to [email protected]

Learn more about designing recommendations in email.

  1. Save the stripe as a module.
Product stripe toolbar with the Save as Module icon highlighted

You can insert the saved module in any campaigns with product selections, for example, for the Abandoned cart trigger. You just need to replace the name of the data source.

We will use the saved module in the same template as a stripe with recommendations for viewed products.

  1. Remove the illustrative stripe with product cards from the template (You may also like).
Illustrative product stripe framed in the template with the delete icon highlighted on its toolbar
  1. Insert the module you saved before in place of the removed stripe.
Modules tab with the saved module highlighted and arrows showing where to drag it into the template
  1. Replace the name of the data source in the stripe’s code with the one you created for the Recommendations for 6 abandoned views (up to 6 rec.) algorithm.

This completes the recommendation settings. You can insert saved modules into your trigger template or redesign the template you are currently working on to match the style of your site.

📘

Note

You can define what to do with messages when there is no data for recommendations - to send or not. To do this, add one of the variants of the Velocity command to the recommendations’ code:

  • $!datasource('source_name').required('false') — send,
  • $!datasource('source_name').required('true') — do not send.


Did this page help you?