Item types

Out of the box we treat all items as products. On instance-level we can configure any attribute as discriminator to distinguish types of data. We call this the item-type characteristic.

When configured, this item-type characteristic will then be exposed by our Frontend API. You'll notice there is a type field for every item returned by the API.

<item>
  <type>product</type>
  <itemno>10001-101</itemno>
  <title>Tweakwise Hoodie Blue</title>
  ...
</item>
{
    "type": "product",
    "itemno": "10001-101",
    "title": "Tweakwise Hoodie Blue",
    // ...
}

This concept will allow you to use different types of content besides products: editorial content, content search, promotional content, you name it!

Read how you can use this to integrate a visual in lister pages 👉


🚧

Beta

This feature is currently running in Beta-mode and can be activated by Tweakwise.
Get in touch with us if you want to know more.

Reserved keywords

If an attribute is configured as type characteristic, make sure you check the following values. These currently are reserved keywords:

TypeDescription
productout-of-the-box everything is a product
visualout-of-the-box support for displaying promotional items in demoshop & Tweakwise JS.

These will be extended in the future. To make sure these will never conflict with your prefered types, prefix your types. To prevent future conflicts, we will do the same.


Next steps

Currently we support display of a single position in the results.
In the future we will:

  • investigate additional ways of getting data into Tweakwise
  • extend the Frontend API to expose item-specific attributes, for example a promotion item would include panel-bg-color and a product would include sale-price.
  • extend Tweakwise JS with more component types that work out-of-the-box.

Keep an eye on the release notes!