Fitment context object

Usually, there is only one fitment context object because a user selects only one fitment as part of the interaction on the website. If you do not have a fitment object, send fitment keys as part of the context.

Important

You must send all fitment keys and values. If you send partial information, Sitecore Discover discards all of it.

The following table describes the keys in the fitment context object:

Key

Type

Description

ids

array of strings

An array of user fitment IDs. Usually, there is only one fitment ID because a user selects only one fitment as part of the interaction on the website.

Use ids when you have a separate fitment entity in your system and an associated ID for each fitment. You must provide this fitment as part of the initial product feed to Sitecore Discover.

Example:

RequestResponse
"context": {
    "fitment": {
      "ids": ["fitid1", "fitid2"]
    }
  }

items

array of objects

An array of fitment objects. Provide this key when a customer does not have fitment IDs associated with fitments in their system. We recommend that, if possible, you use ids and not items.

Note

You can provide ids or items, but not both. If you provide both, Discover uses ids and ignores items.

Example:

RequestResponse
"context": {
    "fitment": {
      "items": [
        {
          "year": "1990",
          "make": "Honda",
          "model": "H1"
        }, 
        {
          "year": "2015",
          "make": "Ford",
          "model": "F100"
        }
      ]
    }
  }

Do you have some feedback for us?

If you have suggestions for improving this article,