Product sync service methods

Version: 10.3

Service providers are wrapper objects designed to make it easier to interact with Connect pipelines. The providers implement no logic other than calling Connect pipelines. All of the business logic is implemented in the pipeline processors.

The Product Sync service provider contains the following methods for interacting with product sync data.

SynchronizeProducts method

SynchronizeProducts is used to synchronize a collection of products between the external commerce system and Sitecore.

The synchronization can go both ways, so changes made to product data in CMS content are pushed to the external commerce system.

A log must be kept of events registered during synchronization. At minimum it should contain a list of products successfully updated. 

Upon return, the result contains the list of messages generated during synchronization, which are the IDs of the products that failed during synchronization

Name:

SynchronizeProducts

Description:

SynchronizeProducts calls the SynchronizeProducts pipeline to synchronize changes to all updated products and related repositories

Usage:

Called from Sitecore or the ECS when the product manager wants to update products both from and to the ECS

Signature:

SynchronizeProductsResult SynchronizeProducts(SynchronizeProductsRequest request)

Input:

Language – string, optional.

The language for the product data being synchronized. Default is English (en or US-EN)

Direction – optional. An enum type indicating whether synchronization goes from ECS -> Sitecore, Sitecore -> ECS or both ways. The default is ECS -> Sitecore. 

Output:

SystemMessages - Collection of messages from the external system.

SynchronizeProductList method

Name:

SynchronizeProductList

Description:

SynchronizeProductList calls the SynchronizeProductList pipeline

Usage:

Called from Sitecore or the ECS when the product manager wants to update a list of products both from and to the ECS

Signature:

SynchronizeProductListResult SynchronizeProductList(SynchronizeProductListRequest request)

Input:

List<ExternalProductIds> - List of strings, mandatory

The list of external product IDs to synchronize

Language – string, optional.

The language for the product data being synchronized. Default is English (en or US-EN)

Direction – enum, optional

An enum type indicating whether synchronization goes from ECS -> Sitecore, Sitecore -> ECS or both ways. The default is ECS -> Sitecore. 

Output:

SystemMessages - Collection of messages from the external system.

SynchronizeProduct method

Use the SynchronizeProduct method to synchronize a single product between the external commerce system (ECS) and Sitecore. The product to synchronize is given by ID.

The synchronization can go both ways, so changes made to product data in CMS content are pushed to the external commerce system as well.

Name:

SynchronizeProduct

Description:

SynchronizeProduct calls the SynchronizeProduct pipeline

Usage:

Called from Sitecore or the ECS when the product manager wants to update a single product both from and to the ECS

Signature:

SynchronizeProductResult SynchronizeProduct(SynchronizeProductRequest request)

Input:

ProductId – string, mandatory

The external product ID to be synchronized.

Language – string, optional.

The language for the product data being synchronized. Default is English (en or US-EN)

Direction – enum, optional

An enum type indicating whether synchronization goes from ECS -> Sitecore, Sitecore -> ECS or both ways. The default is ECS -> Sitecore. 

Output:

SystemMessages - Collection of messages from the external system.

SynchronizeArtifacts method

The SynchronizeArtifacts method is responsible for synchronizing all the related repositories: Manufacturers, Types, Classifications, Divisions, Resources, and Specifications. Before the individual products are synchronized the references to repositories are updated.

Name:

SynchronizeArtifacts

Description:

SynchronizeArtifacts calls the SynchronizeArtifacts pipeline to synchronize all the related repositories: Manufacturers, Types, Classifications, Divisions, Resources, andSpecifications

Usage:

Called from Sitecore or the ECS when the product manager wants to update the product related repositories

Signature:

SynchronizeArtifactsResult SynchronizeArtifacts (SynchronizeArtifactsRequest request)

Input:

Language – string, optional.

The language for the product data being synchronized. Default is English (en or US-EN)

Output:

SystemMessages - Collection of messages from the external system.

Do you have some feedback for us?

If you have suggestions for improving this article,