Skip to main content
Model available for use in the Templates, and also returned by PureClarity in server-side requests

Properties

title
string
The title of the recommender
type
string
Set to “recommender-category”
items
array
Array of category objects to show in the recommender

Category Item Properties

items[].Id
string
The category’s unique Id
items[].DisplayName
string
The category name to show in the recommender
items[].Image
string
The url to the category image
A url link to take an optional category page
items[].Description
string
An optional description text
items[].Parents
array
An array of immediate parent category IDs
items[].Children
array
An array of immediate child category IDs
items[].AllChildIds
array
An array of ALL child IDs, not just immediate children

Example

{
  "title": "Popular Categories",
  "type": "recommender-category",
  "items": [
    {
      "Id": "3841",
      "DisplayName": "Electronics",
      "Image": "https://example.com/images/categories/electronics.jpg",
      "Link": "https://example.com/categories/electronics",
      "Description": "Latest gadgets and technology",
      "Parents": [],
      "Children": ["3842", "3843"],
      "AllChildIds": ["3842", "3843", "3844", "3845"]
    },
    {
      "Id": "3842",
      "DisplayName": "Smartphones",
      "Image": "https://example.com/images/categories/smartphones.jpg",
      "Link": "https://example.com/categories/smartphones",
      "Description": "Latest mobile phones",
      "Parents": ["3841"],
      "Children": ["3844", "3845"],
      "AllChildIds": ["3844", "3845"]
    }
  ]
}