Recommendations and Documents

Recommendations


RecommendationResponse

Declared In:
Headers/SNRRecommendationResponse.h

Related To:
Recommendation

Inherits From:
BaseModel

Declaration:

class RecommendationResponse

Properties:

Property Type Optional Description
name String no Recommendation’s name
campaignHash String no Campaign hash
campaignID String no Campaign ID
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
extras RecommendationResponseExtras yes Campaign extra info
items [Recommendation] no List of items in the recommendation


Recommendation

Declared In:
Headers/SNRRecommendation.h

Related To:
RecommendationResponse

Inherits From:
BaseModel

Declaration:

class Recommendation

Properties:

Property Type Optional Description
itemID String no Product’s GTIN
attributes [AnyHashable: Any] no Product’s recommendation attributes


RecommendationOptions

Declared In:
Headers/SNRRecommendationOptions.h

Related To:
RecommendationFiltersJoinerRule

Declaration:

class RecommendationOptions

Properties:

Property Type Optional Description
slug String no Unique identifier of a specific recommendation
productID String no Item identifier
productIDs [String] no List of item identifiers
itemsExcluded [String] no Items that will be excluded from the generated recommendations
additionalFilters String no 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 no 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 [String] no An array of item attributes which value will be returned in a recommendation response
includeContextItems Bool no When true, the recommendation response will include context item metadata


RecommendationFiltersJoinerRule

Declared In:
Headers/SNRRecommendationOptions.h

Declaration:

enum RecommendationFiltersJoinerRule: Int {
	and,
	or,
	replace
}

Functions: Converts from RecommendationFiltersJoinerRule to String.

func SNR_RecommendationFiltersJoinerRuleToString(_: RecommendationFiltersJoinerRule) -> String




Documents


DocumentsApiQuery

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

Declared In:
Headers/SNRDocumentsApiQuery.h

Related To:
DocumentsApiQueryType

Inherits From: NSObject

Declaration:

class DocumentsApiQuery: NSObject

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:

init(type: DocumentsApiQueryType, value: String)



DocumentsApiQueryType

Declared In:
Headers/SNRDocumentsApiQueryType.h

Declaration:

enum DocumentsApiQueryType: Int {
	bySchema
}



Document

Declared In:
Headers/SNRDocument.h

Inherits From:
BaseModel

Declaration:

class Document: BaseModel

Properties:

Property Type Optional Description
identifier String no Document’s identifier (UUID)
slug String no Document’s slug
schema String no Document’s schema type
content [AnyHashable: Any] no 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