Content


Generate document


This method generates the document that is defined for the provided slug. Inserts are processed.

Note: The API key must have the SCHEMA_SERVICE_SCHEMA_READ permission from the Schema group.

Declared In:
lib/main/modules/ContentModule.js

Related To:
Document

Class:
ContentModule

Declaration:

public generateDocument(slug: string, onSuccess: (document: Document) => void, onError: (error: Error) => void)

Parameters:

Parameter Type Mandatory Default Description
slug string yes - Name of the slug
onSuccess Function no - Function to be executed when the operation is completed successfully
onError Function no - Function to be executed when the operation is completed with an error

Return Value:
No value is returned.

Example:

Synerise.Content.generateDocument('slugName', function(document) {
	//success
}, function(error) {
	//failure
})

Get recommendations (v2)


This method generates recommendations that are defined for the options provided.

Note: The API key must have the SCHEMA_SERVICE_SCHEMA_READ permission from the Schema group.

Declared In:
lib/main/modules/ContentModule.js

Related To:
RecommendationOptions

Class:
ContentModule

Declaration:

public getRecommendationsV2(options: RecommendationOptions, onSuccess: (recommendationResponse: RecommendationResponse) => void, onError: (error: Error) => void)

Parameters:

Parameter Type Mandatory Default Description
recommendationOptions RecommendationOptions yes - Object for configuration of the options parameters
onSuccess Function no - Function to be executed when the operation is completed successfully
onError Function no - Function to be executed when the operation is completed with an error

Return Value:
No value is returned.

Example:

let recommendationOptions = new RecommendationOptions()
recommendationOptions.productID = 'productID'
recommendationOptions.slug = 'slugName'
Synerise.Content.getRecommendationsV2(recommendationOptions, function(recommendationResponse) {
      //success
},function(error) {
      //failure
});

Generate screen View


This method generates a customer’s highest-priority screen view campaign from the feed with the provided feed slug.

Note: The API key must have the SCHEMA_SERVICE_SCHEMA_READ permission from the Schema group.

Declared In:
lib/main/modules/ContentModule.js

Related To:
ScreenView

Class:
ContentModule

Declaration:

public generateScreenView(onSuccess: (screenView: ScreenView) => void, onError: (error: Error) => void)

Parameters:

Parameter Type Mandatory Default Description
onSuccess Function no - Function to be executed when the operation is completed successfully
onError Function no - Function to be executed when the operation is completed with an error

Return Value:
No value is returned.

Deprecated methods

Get document


This method generates the document that is defined for the provided slug.

Note: The API key must have the SCHEMA_SERVICE_DOCUMENT_READ permission from the Document group.

Declared In:
lib/main/modules/ContentModule.js

Class:
ContentModule

Declaration:

public getDocument(slug: string, onSuccess: (document: Object) => void, onError: (error: Error) => void)

Parameters:

Parameter Type Mandatory Default Description
slug string yes - Name of the slug
onSuccess Function no - Function to be executed when the operation is completed successfully
onError Function no - Function to be executed when the operation is completed with an error

Return Value:
No value is returned.

Example:

Synerise.Content.getDocument('slugName', function(document) {
	//success
}, function(error) {
	//failure
})

Get documents


This method generates documents that are defined for parameters provided in the query object.

Note: The API key must have the SCHEMA_SERVICE_DOCUMENT_READ permission from the Document group.

Declared In:
lib/main/modules/ContentModule.js

Related To:
DocumentsApiQuery

Class:
ContentModule

Declaration:

public getDocuments(apiQuery: DocumentsApiQuery, onSuccess: (documents: Array<Object>) => void, onError: (error: Error) => void)

Parameters:

Parameter Type Mandatory Default Description
documentsApiQuery DocumentsApiQuery yes - DocumentsApiQuery object responsible for storing all query parameters
onSuccess Function no - Function to be executed when the operation is completed successfully
onError Function no - Function to be executed when the operation is completed with an error

Return Value:
No value is returned.

Example:

let documentsApiQuery = new DocumentsApiQuery(DocumentsApiQueryType.SCHEMA, 'type', '1.0.0')
Synerise.Content.getDocuments(documentsApiQuery, function(documents) {
     //success
}, function(error) {
     //failure
 })

Get recommendations


This method generates recommendations that are defined for the options provided.

Note: The API key must have the SCHEMA_SERVICE_DOCUMENT_READ permission from the Document group.

Declared In:
lib/main/modules/ContentModule.js

Related To:
RecommendationOptions

Class:
ContentModule

Declaration:

public getRecommendations(options: RecommendationOptions, onSuccess: (recommendationResponse: RecommendationResponse) => void, onError: (error: Error) => void)

Parameters:

Parameter Type Mandatory Default Description
recommendationOptions RecommendationOptions yes - Object for configuration of the options parameters
onSuccess Function no - Function to be executed when the operation is completed successfully
onError Function no - Function to be executed when the operation is completed with an error

Return Value:
No value is returned.

Example:

let recommendationOptions = new RecommendationOptions()
recommendationOptions.productID = 'productID'
recommendationOptions.slug = 'slugName'
Synerise.Content.getRecommendations(recommendationOptions, function(recommendationResponse) {
      //success
},function(error) {
      //failure
});

Get screen View


This method generates the customer’s highest-priority screen view campaign.

Note: The API key must have the SCHEMA_SERVICE_SCHEMA_READ permission from the Schema group.

Declared In:
lib/main/modules/ContentModule.js

Related To:
ScreenViewResponse

Class:
ContentModule

Declaration:

public getScreenView(onSuccess: (screenViewResponse: ScreenViewResponse) => void, onError: (error: Error) => void)

Parameters:

Parameter Type Mandatory Default Description
onSuccess Function no - Function to be executed when the operation is completed successfully
onError Function no - Function to be executed when the operation is completed with an error

Return Value:
No value is returned.

😕

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