Once you have created your recommendation scheme, you can now use it in a messaging template. When a campaign that uses the messaging template runs, it applies the recommendation steps for every user in the segment to deliver a unique and personalized message with items tailored to the individual user.

Include recommendations in your template

Before you can include recommendations in your template, you must create a recommendation scheme.

To include recommendations in your template, complete the following steps:

  • Include the recommendation scheme from the Data tab of your template. If you are creating a Live Content template, go to the Template Info tab
  • Select the right Preview User for the template.

Use item recommendations in your messages

The method for including recommendations in the template content differs based on the type of messaging template. 

  • Drag and drop an ‘AI + Items’ block while using the Visual Studio to design an email template or In-app template. 
  • Manually add the liquid expression in the template.

Include recommendations using Visual Studio

If you are creating an email template or an in-app template using the Visual Studio, you can drag and drop an ‘AI + Items’ block to include recommendations..

To include recommendations in your template, complete the following steps:

  1. From the Visual Studio Content tab, drag and drop the AI+ Items block into the required position in the template.


  2. Click Configure Item Recommendations in the added block.
  3. Click Create.
  4. Navigate to the Data or any other tab, to preview the recommendations for the selected preview user.


Configuring Item Recommendations

If you want to update the look and feel of the recommended content, configure the AI+ Items recommendations component.

  1. Select the AI+ Items block and click Configure Item Recommendations.


  2. Configure the recommendations component.


  3. Configure the Block Layout.
    1. Select the recommendation block to use.
    2. Set the Maximum items to show in the block
    3. Set the starting index for the items. For example, to include items from the beginning of the block, set to 0. To exclude the first item in the block, set to 1.
    4. Set the number of lines of text to show.
    5. If an image is to be included, set the position of the image in the block.
    6. Decide if a CTA button is to be included.
  4. If you selected to include an image, configure the Image Settings. You can use a product attribute for the settings or include a custom value.
    1. Set the Image Source.
    2. Set a link for the Image.
  5. Configure the content for the Lines. You can use a product attribute for the settings or include a custom value.

    For example, you can set Line 1 to show the product title, Line 2 to show the price, and Line 3 to show the author, the brand name, or the size of the item.

  6. If you selected to include a CTA button, configure the settings for the button.
  7. Set the text color and CTA button color.
    • Use the color Picker option and select a color.
    • Use the Custom option and dynamically define the color using personalization. For example, you can set the line color to {{user.preferred_color}}.
  8. Click Update.

    The recommendations are configured.

Include recommendations manually

In some studios like the HTML Editor, the Liquid strings to reference different components of a recommendation scheme are available via an autocomplete menu. To activate the autocomplete menu, add the opening and closing double curly brackets for the liquid expression and click between them.

In other studios, you must manually type the liquid expression in the template.

Pro Tip: Copy + paste the syntax from the HTML Email editor to avoid guess work and errors.

Components of a Recommendation Scheme

You can include a recommendation scheme in a messaging template by using the open source templating language Liquid. It is important to understand the components of a recommendation block to ensure that you are including the right information in the messaging template. 

 Let’s take a closer look at a recommendation scheme.


  • A recommendation scheme contains one or more recommendation blocks.
  • Each recommendation block has a name.
  • The products in a block are numbered from left to right, and the numbering starts at 0. So the first product in the block is product[0], the second product is product[1], and so on.
  • Each product has attributes that you can include in the template. For example, a book has the attributes title, price, author, and so on.

Format of recommendation data in a template

When you include a recommendation in a messaging template, you can view the recommendation data in the template.

  • Go to the Data tab of the template you are creating.
  • Go to the Template Info tab if you are creating a Live Content template.

Note: The data depends on the preview user.


Liquid expression to include item

When you put this information about recommendation blocks and the JSON data together, you can form a liquid expression to include a recommended item in the template:

Note: Liquid expressions are included in double curly brackets.


Consider the above example of the recommendation block abandoned_cart_items

  • To include the title of the first product in that block, the expression would be:


  • To include the price of the product, the expression would be:


  • To include an image, use an <img> tag.

    <img src=”{{{{recommendations.abandoned_cart_items.products[0].image}}}}” />


Here is an example of a Push template where the recommendation is created via the autocomplete menu.


Here is an example of an SMS template where the recommendation for a book is entered manually.


Was this article helpful?
0 out of 0 found this helpful



Please sign in to leave a comment.