The updateContext object model
The updateContext object is used to update page and widget context using the Sitecore Discover beacon and rfk.push(). It defines the widget(s) that the context applies to and the contexts and filters to set.
The following table describes the keys for the updateContext object:
|
Key |
Value type |
Description |
Notes |
|---|---|---|---|
|
|
Widgets that this |
If not specified, context applies to all widgets on the page. | |
|
|
Context to apply. Might include information on user, page, store, and so on. | ||
|
|
Filters to apply. | ||
|
|
Boolean |
Flag for context persistence after widgets refresh. |
Defaults to |
The widget object
The following table describes the widget object key:
|
Key |
Value type |
Description |
|---|---|---|
|
|
array of strings |
Array of |
The filter object
The following table describes the filter object key:
|
Key |
Value type |
Description |
|---|---|---|
|
<type> |
array of strings |
An array of filters to apply |
The context object
The context object used in updateContext contains objects representing contextual information about the user, store, campaign, page, and fitment. It is similar to the event context object, but its sub-objects have fewer available keys.
The following table lists the keys of the context object:
|
Key |
Value type |
Description |
|---|---|---|
|
|
Object defining the user context. | |
|
|
Object defining the store context. | |
|
|
Object describing the campaign context. | |
|
|
Object describing the context of the page. | |
|
|
Object describing the fitment context. |
The user object
The following table describes the user object key:
|
Key |
Value type |
Description |
Notes |
|---|---|---|---|
|
|
array of strings |
Custom groups or segments assigned to the user. |
For B2B websites, use the |
The store object
The following table describes the keys of the store object:
|
Key |
Value type |
Description |
Notes |
|---|---|---|---|
|
|
string |
Store |
B2B websites use this to identify a restriction |
|
|
string |
|
For B2B websites, if your restrictions are organized in two levels, then pass the restriction group |
The campaign object
The following table describes the keys of the campaign object:
|
Key |
Value type |
Description |
|---|---|---|
|
|
string |
|
|
|
string |
|
The page object
The following table describes the keys of the page object:
|
Key |
Value type |
Description |
|---|---|---|
|
|
array of strings |
Array of product SKUs. |
|
|
string |
URI representing a category. |
|
|
string |
An ID representing a category provided as part of the category feed. This field is ignored if |
|
|
integer |
The Discover |
|
|
string |
The country specified as part of the locale context based on ISO 3166 Alpha 2 country code. |
|
|
string |
The language specified as part of the locale context based on ISO 639-1 standard language codes. |
The fitment object
The following table describes the keys of the fitment object:
|
Key |
Value type |
Description |
|---|---|---|
|
|
array of strings |
Array of fitment IDs. |
|
|
array of fitment objects |
For rare cases when you do not have fitment IDs associated with fitments in your system. We recommend the use of IDs where possible. |
You must provide either IDs or items, not both. If both are provided, items are ignored.