Recommendations and Documents

Recommendations


RecommendationRequestBody

Class responsible for creating a recommendation request.

Declared In:
com.synerise.sdk.content.model.recommendation.RecommendationRequestBody

Declaration:

public final class RecommendationRequestBody implements Serializable

Properties:

Property Type Optional Default Description
productId String no - Item identifier of the context item
itemsIds ArrayList no - List of item identifiers, used for multiple item context
itemsExcluded ArrayList 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 String 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 String no Defines the logic of merging additionalElasticFilters with the campaign’s existing elastic filters
displayAttribute ArrayList no An array of item attributes which value will be returned in a recommendation response
includeContextItems Boolean no When true, the recommendation response will include context item metadata

Initializers:

There are no initializers.

Methods:

Setter for productId

public RecommendationRequestBody setProductId(String productId)

Setter for itemsIds

public RecommendationRequestBody setItemsIds(ArrayList<String> itemsIds)



RecommendationResponse

Class responsible for receiving recommendations.

Declared In:
com.synerise.sdk.content.model.recommendation.RecommendationResponse

Declaration:

public class RecommendationResponse

Properties:

Property Type Optional Default Description
recommended List<Recommendation> no - List of recommendations
extras RecommendationResponseExtras yes Campaign extra info
campaignHash String no - Campaign hash
campaignId String no - Campaign ID
schema String no - Recommendation’s schema type
slug String no - Slug name
uuid String no - Recommendation’s UUID
name String no - Name of 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
Note: All the properties above are accessible by using getters.

Initializers:

There are no initializers.

Methods:

This method retrieves a recommendation schema.

public String getSchema()

This method retrieves the value of the slug parameter.

public String getSlug()

This method retrieves the value of the UUID parameter.

public String getUuid()

This method retrieves a list of recommendations.

public List<Recommendation> getRecommendations()

This method retrieves the value of the campaignHash parameter.

public String getCampaignHash()

This method retrieves the value of the campaignId parameter.

public String getCampaignId()



Recommendation

Class model for a recommendation.

Declared In:
com.synerise.sdk.content.model.recommendation.Recommendation

Declaration:

public class Recommendation extends BaseModel

Properties:

Property Type Optional Default Description
itemId String no - Product’s GTIN
feed HashMap<String, Object> no - Product’s recommendation attributes
Note: All the properties above are accessible by using getters and setters.

Initializers:
There are no initializers.

Methods:
There are only getters and setters for the above properties.




RecommendationAttribute

Class model for custom attributes.

Declared In:
com.synerise.sdk.content.model.recommendation.RecommendationAtribute

Declaration:

public class RecommendationAtribute

Properties:

Property Type Optional Default Description
name String no - Attribute name
type String no - Attribute type
value String no - Attribute value
Note: All the properties above are accessible by using getters and setters.

Initializers:

There are no initializers.

Methods:

There are only getters and setters for the above properties.


Documents


DocumentsApiQuery

Class responsible for creating a query to the Documents API.

Declared In:
com.synerise.sdk.content.model.DocumentsApiQuery

Declaration:

public class DocumentsApiQuery

Properties:

Property Type Optional Default Description
type DocumentsApiQueryType yes - Document’s query type
typeValue String yes - Document’s query type value
version String yes - Document version

Initializers:

There are no initializers.

Methods:

This method sets query parameters.

public void setDocumentQueryParameters(DocumentsApiQueryType type, String typeValue)

This method sets a document version.

public void setVersion(String version)



DocumentApiQueryType

This enum contains values for the Documents API query type.

Declared In:
com.synerise.sdk.content.model.DocumentsApiQueryType

Declaration:

public enum DocumentsApiQueryType

Values:

Property Value Description
SCHEMA “by-schema” Query type

Methods:

Get by path type.

public static DocumentsApiQueryType getByPathType(String type)



DocumentApiQuery

Class responsible for creating a query to the Documents API.

Declared In:
com.synerise.sdk.content.model.DocumentApiQuery

Declaration:

public 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 no -
itemsIds ArrayList no -
itemsExcluded ArrayList 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 String 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 String no Defines the logic of merging additionalElasticFilters with the campaign’s existing elastic filters
displayAttribute ArrayList no An array of item attributes which value will be returned in a recommendation response
includeContextItems Boolean no When true, the recommendation response will include context item metadata

Initializers:

There is a constructor.

public DocumentApiQuery(String feedSlug)

Methods:

Setter for feedSlug

public void setFeedSlug(String feedSlug)

Setter for additionalFilters

public DocumentApiQuery setAdditionalFilters(String additionalFilters)

Setter for itemsExcluded

public DocumentApiQuery setItemsExcluded(ArrayList<String> itemsExcluded)

Setter for filtersJoiner

public DocumentApiQuery setFiltersJoiner(FiltersJoinerRule filtersJoiner)

Setter for additionalElasticFilters

public DocumentApiQuery setAdditionalElasticFilters(String additionalElasticFilters)

Setter for elasticFiltersJoiner

public DocumentApiQuery setElasticFiltersJoiner(FiltersJoinerRule elasticFiltersJoiner)

Setter for displayAttributes

public DocumentApiQuery setDisplayAttributes(ArrayList<String> displayAttribute)

Setter for includeContextItems

public DocumentApiQuery setIncludeContextItems(Boolean includeContextItems)

Setter for itemsIds

public DocumentApiQuery setItemsIds(ArrayList<String> itemsIds)

Setter for productId

public DocumentApiQuery setProductId(String productId)



Document

Declared In:
com.synerise.sdk.content.model.document

Declaration:

public class Document

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 [AnyHashable: Any] no Document’s content
Note: All the properties above are accessible by using getters.

Initializers:
There are no initializers.

Methods:
There are only getters for the above properties.

😕

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