Template Variables

Template variables can be used to generate content on the Fera servers that can be served to your clients.

Current Shopper

You can get shopper data in the templates from the {{ shopper.* }} template variables.

Location
Other

The shopper's location can be accessed from the {{ shopper.location.* }} attributes. For example, to get the shopper's country you would enter {{ shopper.location.country_name }}

Attribute

Description & Examples

country_name

Country name

Ex: United States; Canada; United Kingdom

country_code

2-Letter country code

Ex: US; CA; UK

region_code

2 or 3 letter state, province or region code

Ex: CA (California); ON (Ontario)

region_name

State, province or region fill name.

Ex: California; Ontario

city

City

Ex: Waterloo; San Francisco; Miami

The shopper's location can be accessed from the {{ shopper.* }} attributes. For example, to get the shopper's first name you would enter {{ shopper.first_name }}

Attribute

Description & Examples

first_name

Shopper's first name if it is known.

Ex: Tobias; Lindsay; Buster

Current Product

Details
Counters

The current product (if it exists can be accessed from the {{ product.* }} attributes. For example, to get the current product's name you would enter {{ product.name }}

Attribute

Description & Examples

name

Name of the product currently being viewed or associated with the current skill. Ex: Limited Edition Fukajimi Sneakers

thumbnail_url

URL to the product's thumbnail image.

Ex: https://uploads.fera.ai/example_images/shoe.png‚Äč

url

URL to the product's products view detail page.

Ex: https://www.example.com/some_product

The current product counters (if the product exists and has counts accumulated at all) can be accessed from the {{ product.*.*period* }} attributes.

For example, to get the number of viewers that started looking at the current product in the last 15 minutes, you would do: {{ product.viewers.last_15_min }}

Attribute

Description & Examples

viewers

The number of unique shoppers who have been viewing the product within the specified time period.

Ex: product.viewers.last_15_min

add_to_carts

The number of unique shoppers who added the product to their cart within the specified time period.

Ex: product.add_to_carts.last_2w

purchasers

The number of unique shoppers who purchased the the product within the specified time period.

Ex: product.purchaserts.last_2_months

Counter Time periods

The last parameter of a counter attribute is the time period you want the count for. Here is a list of time periods that are possible:

Period Code

Description

last_15_min

In the last 15 minutes.

last_hour

In the last 1 hour.

last_3h

In the last 3 hours

last_12h

In the last 12 hours.

last_24h

In the last 24 hours (1 day).

last_2d

In the last 2 days.

last_3d

In the last 3 days.

last_week

In the last week (7 days).

last_2w

In the last 2 weeks.

last_month

In the last month (4 weeks)

last_2_months

In the last 2 months (8 weeks).