Skip to content
Optima docs
ConsoleEdgeDigital content

Recommended items

Show each visitor a ranked list of products or content from a recommendation catalogue on your website.

A Recommended items content item asks Optima to rank a recommendation catalogue for the visitor and fills your template with the result, so a block of products on your site is different for each person. It is one of the two tabs for a structured item in the Digital content editor, next to Raw JSON.

Who uses it

Campaign creators. Editing needs content_editor, or another role your administrator has given access to this area — see Licences and roles. It needs item recommendations, which belong to the Decision package; without it the tab says "Item recommendations are not on this account's licence." You also need at least one recommendation catalogue. If none exists, the editor says to create one under Recommendations first.

Fields

FieldMeaningValid valuesDefault
CatalogueThe recommendation catalogue to rank.A catalogue in your environmentNone (required)
StrategyHow items are ranked for the visitor.Trending, Recently viewed, AffinityNone (required)
CountHow many items to rank.A whole number from 0 to 20; blank or 0 uses the default6
Item template (JSON)The structure served to visitors. Written as a JSON object, rendered for each request with .Items as the ranked rows.A JSON objectNone (required)

The strategies:

  • Trending: items with the most engagement over the trailing 7 days, the same for every visitor.
  • Recently viewed: items this visitor has recently looked at.
  • Affinity: items that match what the visitor has shown interest in.

The "similar to" and "blend" strategies need a starting item or a mix, so they are not offered on-site.

Recommended items are always personalized, so the Personalized checkbox is hidden. The template's text is checked when you save, and the Display section applies as for any other item.

Template

In the template, loop over .Items and print the fields of each item. Each item carries the fields the catalogue declares, such as its name, image, address and price.

{
  "title": "Picked for you",
  "html": "{{range .Items}}<a href=\"{{.url}}\">{{.name}}</a>{{end}}"
}

Switching between Recommended items and Raw JSON carries your content across, so nothing you typed is lost.

Examples

Trending products in the sidebar. Slot product_sidebar, Catalogue products, Strategy Trending, Count 4.

Pick up where they left off. Strategy Recently viewed, Count 3, shown When the visitor is about to leave (web only) in Display.

Common problems

  • Affinity returns nothing. The catalogue has no affinity fields configured, so there is nothing to score. Add them in the catalogue's settings, or use another strategy.
  • The block is empty. The visitor is new and the strategy has nothing for them (Recently viewed and Affinity need history), or the catalogue has no items. Trending works for everyone.
  • Save is refused for the count. Enter a whole number from 0 to 20, or leave it blank.
  • Save is refused for the template. It must be a JSON object. Enter the JSON template that will be served to visitors.
  • No catalogue can be picked. Either item recommendations are not part of your licence, or no catalogue exists yet. The message under Catalogue says which.

On this page