Using dynamic values in touchpoints

This article explains how you can use dynamic attributes in your touchpoints.

Christiaan Proper avatar
Written by Christiaan Proper
Updated over a week ago

When you are setting up touchpoints you will constantly see text displayed like

"{{item.name}}". You may be wondering what this is and how you can use this.

When you connect/upload content to Datatrics, you send all its attributes and values along with it. Items generally have attributes such as a name, price, description, and many more.

When you are setting up a touchpoint you will generally want to display the name of the item you are recommending. Let's say you are selling MacBooks. If you are only selling one item, you have the option to simply type in the name and you're done. But what if you are recommending more than one item? For this, we can use the attributes.

When creating a touchpoint you have the option to dynamically request attributes by using {{item.attribute}}. Attribute can be replaced with any attribute the item has. This can be its name {{item.name}}, its price {{item.price}}, its description {{item.description}} or any other value the item has.

The attributes of an item are displayed in the content overview. It looks like this:

Using this system you can make sure you are always providing the data of the item you are recommending. Do make sure that every item you are recommending uses the attributes you are requesting.

Note: If you are using "{{#each items}}" loops for recommending multiple content items (mostly via embedded content), you don't need to add "item" before the attribute since you're already looping through items. You can just use {{name}} for displaying the item's name in this case.

Example:

{{#each items}} itemcount='4'
{{name}}
{{description}}
{{/each}}

There are also a lot of other variables you can use in touchpoints, which aren't necessarily attributes of items. Read more about those variables over here.

Did this answer your question?