Recommendations and Documents

Recommendations


RecommendationResponse

Model representing a response with recommendations.

WARNING: This is a read-only class and it is not meant to be instantiated directly.

Declared In:
lib/model/content/recommendation_response.dart

Related To:
Recommendation

Declaration:

class RecommendationResponse

Properties:

Property Type Optional Description
name String no Recommendation’s name
campaignHash String no Campaign hash
campaignID String no Campaign ID
items List<Recommendation> no List of items in the recommendation
correlationID String no Recommendation’s correlation ID. It can be added to a recommendation.click event to associate it with the recommendation request
schema String no Recommendation’s schema type
slug String no Slug name
uuid String no Recommendation’s UUID


Recommendation

Model representating a recommendation item data.

WARNING: This is a read-only class and it is not meant to be instantiated directly.

Declared In:
lib/model/content/recommendation.dart

Related To:
RecommendationResponse

Declaration:

class Recommendation

Properties:

Property Type Optional Description
itemID String no Product’s GTIN
attributes Map<String, Object> no Product’s recommendation attributes


RecommendationOptions

Declared In:
lib/model/content/recommendation_options.dart

Related To:
RecommendationFiltersJoinerRule

Declaration:

class RecommendationOptions

Properties:

Property Type Optional Description
slug String no Unique identifier of a specific recommendation
productID String yes Item identifier (for single ID)
productIDs List yes List of item identifiers (for multiple IDs)
itemsExcluded List 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 yes 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 yes Defines the logic of merging additionalElasticFilters with the campaign’s existing elastic filters
displayAttribute List yes An array of item attributes which value will be returned in a recommendation response
includeContextItems bool yes When true, the recommendation response will include context item metadata

Initializers:

RecommendationOptions recommendationOptions = RecommendationOptions(
        slug: slug,
        productID: productId);



RecommendationFiltersJoinerRule

Declared In:
lib/model/content/recommendation_options.dart

Declaration:

enum RecommendationFiltersJoinerRule {
  and('and'),
  or('or'),
  replace('replace');

Functions: Converts from RecommendationFiltersJoinerRule to String.

String recommendationFiltersJoinerRuleAsString()

Converts from String to RecommendationFiltersJoinerRule.

static RecommendationFiltersJoinerRule? getRecommendationFiltersJoinerRuleFromString(String string)



Documents


DocumentsApiQuery

The object to set parameters easily for fetching documents from API.

Declared In:
lib/model/content/documents_api_query.dart

Related To:
DocumentsApiQueryType

Declaration:

class DocumentsApiQuery

Properties:

Property Type Optional Default Description
type DocumentsApiQueryType no .bySchema Query type
typeValue String no null Value for query type
version String yes null Specifies the document version

Initializers:

DocumentsApiQuery({required this.type, required this.typeValue, this.version})



DocumentsApiQueryType

Declared In:
lib/enums/content/documents_api_query_type.dart

Declaration:

enum DocumentsApiQueryType {
  schema('by-schema');
}



Document

Declared In:
lib/model/content/document.dart

Declaration:

class Document

Properties:

Property Type Optional Description
identifier String no Document’s identifier
slug String no Document’s slug
schema String no Document’s schema type
content Map<String, Object> yes Document’s content
Important: All properties are read-only.
😕

We are sorry to hear that

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

😉

Awesome!

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

Close modal icon Placeholder alt for modal to satisfy link checker