Inserts
In Synerise you are able to create various types of analytics such as aggregates and expressions that calculate the customer actions who belong to a workspace; you can work with metrics which allow you to analyze the events and AI-powered recommendations to offer your customers exactly what they want. To make use of them to the fullest you can use them while creating content to your email or your website. They are available in the email and dynamic content creator in the form of inserts.
In conjunction with engine templates called Jinjava you can design complex conditions or convert value of inserts into communication with customers.
Business benefits
- Tailored to the customer preferences and diversified communication.
- Increased traffic and usability of website.
- Increased email OR and CTR.
Adding inserts to a template
You can find inserts in the following localizations in the application:
- Communication > Email
- Communication > Dynamic content
- Communication > SMS
- Communication > Mobile
- Communication > Webpush
- Go to Communication module and choose the type of the message you’d like to create (in this example we will create an email).
- Regardless of the message type you choose, you need to design the content. Click
Define
in the Content section and thenCreate message
. - If you want to create a new email template click
Create new
or if you want to use a template, clickFrom template
. In this case, let’s make a new template.
Visual builder
If you prefer to use wysiwyg email creator, choose the visual builder. To add an insert to the body of the email, choose Inserts on the upper right side (as presented in the illustration above). Then choose the type of insert you want to use in the email and copy the code.
Then create a section in the body of the template and add any elements (e.g. a text field) and paste the copied code while formatting the text in the field.
Code editor
If you prefer to create the content of your email through code editor (because you want to use elements of code to build it) click Code editor
. To add an insert to the body, choose Inserts on the upper right side (it’s in the same place as in the visual builder). Then choose the type of insert you want to use in the email and copy the code.
Choose the type of the insert you want to add to the email, copy the code and paste it to the template straightaway.
Insert types
Let’s have a look, at the list of inserts you can use in your content.
You can choose and combine the following types:
- Variables
- Metrics
- Aggregates
- Expressions
- AI suite
- Social proof
- Images
- Links
- Blocks
- Pools
Variables
Variables are connected with customers’ attributes. You can use every customer’s attribute as a variable. A name, surname, email, phone number, etc. can be a variable. By means of those variables you can personalize the content, e.g. you can use the name of the user in the beginning of the email.
To add a variables as an insert repeat the steps described in section about adding inserts
Metrics
Metrics is a type of analytics that let you calculate statistics on the basis of events or customer attributes, and analyze the number of times a specific event has occurred in the system.
Example of use
The results of inserted metrics is presented through the dynamic content feature. On the website it will be presented in the form of the chart.
To add a metrics as an insert repeat the steps described in section about adding inserts
Aggregates
Aggregate is prepared with the intention of analyzing the actions of an individual customer. The analysis is based on a particular event occurrence (which can be specified by the event parameters) within the defined time range. The result of the analysis can be a minimum, average, maximum value of the event, and many more. An aggregate itself becomes a kind of a customer attribute which can be used for further analyses (for example, to create an analytical dashboard which you can add to a customer card) or to personalize communication with customers. One of the most popular aggregate applications is creating a lists of recently viewed, bought or abandoned products.
This aggregates counts the value of products which were added to cart during last 30 days. It’s possible due to the event Add to cart
and event parameter $finalUnitPrice
that defines the value of a product.
Later this aggregate will come in handy while creating an expression which allows us to count the value of abandoned cart.
To add an aggregate as an insert repeat the steps described in section about adding inserts
Example of use
Because aggregates make it possible to return the value of the event parameter (sum, average, etc) you can use them to send information about the products a user has viewed, the value of the last transaction or the number of points granted for the activity.
Advanced usage
You can use the transfer of information to the URL to the abandoned cart mechanism. Thanks to this, you can recreate the abandoned cart on your website.
Let’s see how to add a sku
list to the URL to build an abandoned shopping cart on your webpage.
{% set skus = [] %}
{% aggregate AGGREGATE_ID %} // Here, put your aggregate ID.
{% for item in aggregate_result %}
{% if skus.append("sku=" + item) %} {% endif %}
{% endfor %}
<a href="https://www.example.pl/forwardcart-createCart.html?{{ skus|join('&') }}" target="_blank">
{% endaggregate %}
As a result, you’ll get a link with product id (sku
) as parameters of URL. You can, use this dynamic link as a redirection to the abandoned cart.
Expressions
Expressions can be built on the basis of existing aggregates or events. You can carry out further mathematical operations to calculate the value of the event parameters which couldn’t be counted by means of aggregates. Use functions to perform mathematical operations, to receive rounded results, specific ranges, minimum and maximum values, etc.
This expression uses two types of aggregates. The first one, presented in the previous example, is concerned with the value or products added to a cart during last 30 days. The second aggregate presents the value of purchased products. To calculate the value of abandoned cart, the value of purchased products is deducted from the value of products added to cart during last 30 days.
To add an expression as an insert repeat the steps described in section about adding inserts
Example of use
You can use aggregates in emails to remind your customers about the products they abandoned in the cart and encourage them to finalize the transaction.
Advanced usage
Below you will find an example of use the expression result as a variable. Thanks to this, depending on the result, we can return, for example, the appropriate sentence form.
{% expressionvar EXPRESSION_ID %} //Here, put your aggregate ID.
{% set tmp = expression_result|string %}
{% if expression_result == '1' %}
<h1>You earned {{expression_result}} point for your last transaction.</h1>
{% else %}
<h1>You earned {{expression_result}} points for your last transaction.</h1>
{% endif %}
{% endexpressionvar %}
As a result, if you gain 1 point, you’ll get copy: You earned 1 point for your last transaction. In other cases, when expression result is more than 1 you’ll get point in plural form.
AI Suite
AI Suite, in other words AI-powered recommendations, allow you to send personalized product offers to customers. There recommendations can be included in emails or you can insert them to a website, so the visitors can see offers prepared individually.
To add a recommendation as an insert repeat the steps described in section about adding inserts
Example of use
You can send your customers emails with reminder about the products they have viewed on the website.
AI Cart recommendations
AI Cart recommendations consist of product offers which match the products that users added to the cart. The offers are prepared individually for each user, so each of them receive a unique offer adjusted to their preferences.
Example of use You can display dynamic content on your website that includes products which are similar to the products your customers added to a cart. This way you encourage customers to buy more products as the recommended ones are complementary to the products in their carts.
Advanced usage After you create this type of recommendation in Communication > Recommendations, you need to create an aggregate that analyzes and counts products added to the cart in a certain date range. The aggregate is needed because later in the HTML code of the cart recommendation, you will need the ID of the aggregate that analyzes products added to carts.
Social proof
This type of insert is available only in dynamic content. It lets you display metric results on your website, allowing visitors to the product page to view real-time information such as the number of people currently viewing the same product or the number of visitors who have purchased it.
The instructions on adding the insert to the dynamic content template are available in:
- Dynamic content inserts in the Developer Guide
- Visual Builder section in this article
Example of use
To see a social proof insert in a practical example, check Adding mix of social proof to product pages use case.
Images
This option allows you to add images to your email or dynamic content. Copy to clipboard the URL path of the image. You will need to paste it when you drag the Image element to the canvas (in case when you use a visual builder). This type of inserts is especially useful when you work in the code editor, because you can add the image path at once.
Links
By means of this insert you can add two types of links: resignation link (a user can unsubscribe from receiving a newsletter) and open in browser (when a user clicks a link, the website opens in a new browser window).
Blocks
If you use predefined blocks of code, this section will be useful for you. If you have footers, headers or other elements that you constantly use in emails, you can insert them to an email.
Pools
Code pools (Data Management > Voucher Pools ) is a place where you can import discount codes, which we be will used in communication with customers. Define a catalog from which a discount code will be used in communication with customers.