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:
- From the Visual Studio Content tab, drag and drop the AI+ Items block into the required position in the template.
- Click Configure Item Recommendations in the added block.
- Click Create.
- 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.
- Select the AI+ Items block and click Configure Item Recommendations.
- Configure the recommendations component.
- Configure the Block Layout.
- Select the recommendation block to use.
- Set the Maximum items to show in the block
- 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.
- Set the number of lines of text to show.
- If an image is to be included, set the position of the image in the block.
- Decide if a CTA button is to be included.
- 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.
- Set the Image Source.
- Set a link for the Image.
- 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.
- If you selected to include a CTA button, configure the settings for the button.
- 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}}.
- 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.
{{recommendations.<block_name>.products[<product_number>].<product_attribute>}}
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:
{{recommendations.abandoned_cart_items.products[0].title}}
- To include the price of the product, the expression would be:
{{recommendations.abandoned_cart_items.products[0].price}}
- To include an image, use an <img> tag.
<img src=”{{{{recommendations.abandoned_cart_items.products[0].image}}}}” />
Examples:
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.
Comments
0 comments