Recommendations and Documents
Recommendations
RecommendationResponse
Declared In:
lib/classes/content/RecommendationResponse.js
Related To:
Recommendation
Inherits From:
BaseModel
Declaration:
class RecommendationResponse extends BaseModel
Properties:
Property | Type | Optional | Description |
---|---|---|---|
name | string | no | Recommendation’s name |
campaignHash | string | no | Campaign hash |
campaignID | string | no | Campaign ID |
items | Array |
no | List of items in the recommendation |
Recommendation
Model representating a recommendation item data.
Declared In:
lib/classes/Content/Recommendation.js
Related To:
RecommendationResponse
Inherits From:
BaseModel
Declaration:
class Recommendation extends BaseModel
Properties:
Property | Type | Optional | Description |
---|---|---|---|
itemID | string | no | Product’s GTIN |
attributes | Record<string, any> | no | Product’s recommendation attributes |
RecommendationOptions
Declared In:
lib/classes/content/RecommendationOptions.js
Declaration:
class RecommendationOptions
Properties:
Property | Type | Optional | Description |
---|---|---|---|
slug | string | no | Unique identifier of a specific recommendation |
productID | string | no | Item identifier |
RecommendationFiltersJoinerRule
Declared In:
lib/classes/models/Content/RecommendationOptions.js
Declaration:
enum RecommendationFiltersJoinerRule {
And = 'AND',
Or = 'OR',
Replace = 'REPLACE'
}
Documents
DocumentsApiQuery
The object to set parameters easily for fetching documents from API.
Declared In:
lib/classes/api_queries/DocumentsApiQuery.js
Related To:
DocumentsApiQueryType
Declaration:
class DocumentsApiQuery
Properties:
Property | Type | Optional | Default | Description |
---|---|---|---|---|
type | DocumentsApiQueryType | no | .bySchema | Query type |
typeValue | string | no | nil | Value for query type |
version | string | yes | nil | Specifies the document version |
Initializers:
constructor(type: DocumentsApiQueryType, typeValue: string, version: string)
DocumentsApiQueryType
Declared In:
lib/classes/api_queries/DocumentsApiQueryType.js
Declaration:
enum DocumentsApiQueryType {
SCHEMA = 'by-schema',
}
DocumentApiQuery
The object to set parameters easily for fetching screen views from API.
Declared In:
lib/classes/api_queries/DocumentApiQuery.js
Declaration:
class DocumentApiQuery
Properties:
Property | Type | Optional | Description |
---|---|---|---|
slug | string | no | Unique identifier of a document |
Properties used only if the document includes a recommendation insert:
Property | Type | Optional | Description |
---|---|---|---|
productId | string | yes | Item identifier of the context item |
itemsIds | Array |
yes | List of item identifiers, used for multiple item context |
itemsExcluded | Array |
yes | Items that will be excluded from the generated recommendations |
additionalFilters | string | yes | Additional filters. These are merged with the campaign’s own filters according to the logic in filtersJoiner |
filtersJoiner | RecommendationFiltersJoinerRule | no | Defines the logic of merging additionalFilters with the campaign’s existing filters |
additionalElasticFilters | string | yes | Additional elastic filters. These are merged with the campaign’s own elastic filters according to the logic in elasticFiltersJoiner |
elasticFiltersJoiner | RecommendationFiltersJoinerRule | no | Defines the logic of merging additionalElasticFilters with the campaign’s existing elastic filters |
displayAttribute | Array |
yes | An array of item attributes which value will be returned in a recommendation response |
includeContextItems | boolean | yes | When true, the recommendation response will include context item metadata |
Initializers:
constructor()
Document
Model representing a highest-priority customer screen view campaign.
Declared In:
lib/classes/content/Document.js
Inherits From:
BaseModel
Declaration:
class Document extends BaseModel
Properties:
Property | Type | Optional | Description |
---|---|---|---|
uuid | string | no | Document’s identifier (UUID) |
slug | string | no | Document’s slug |
schema | string | no | Document’s schema type |
content | object | no | Document’s content |