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:

KeyTypeDescription
idsarray of stringsAn 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:"context": { "fitment": { "ids": ["fitid1", "fitid2"] } }
itemsarray of objectsAn 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.NoteYou can provide ids or items, but not both. If you provide both, Discover uses ids and ignores items.Example:"context": { "fitment": { "items": [ { "year": "1990", "make": "Honda", "model": "H1" }, { "year": "2015", "make": "Ford", "model": "F100" } ] } }
If you have suggestions for improving this article, let us know!