Product Synchronization
Published by Marc Bednar on July 26, 2023
Overview
OrderCloud allows you to synchronize your catalog content with any system of your choosing using one of the pre-defined delivery mechanism that best suits your needs. When products are created, updated or deleted, you will be notified of these changes via any of the following Delivery Configurations:
SearchIngestion for out-of-the-box integration with Sitecore Search
An Http(s) endpoint
An EventHub instance
A Kafka instance
Add a Connection to OrderCloud
You must have an OrderCloud production marketplace.
You must create a DeliveryConfiguration that enables one of the delivery mechanisms.
You must enable ProductSync using the API described later in this document.
Sitecore Search Proxy
You should use the Sitecore Search Proxy when you are required to have the OrderCloud product visibility and pricing rules applied. In a simple B2C implementation you can use Sitecore Search API directly.
The proxy takes the ‘userinfo’ bearer token obtained via the “oauth/userinfo” route in OrderCloud. The returned token provides all of the context information to the proxy.
Currently, you need to make a request for the OrderCloud team to setup your Sitecore Search APIKeys in the proxy on your behalf. This process will eventually become self-serviced.
The payload to be submitted to the proxy is identical to the one of Sitecore Search as well as the returned payload, therefore you can take advantage of all the features available in Sitecore Search. The proxy simply appends the visibility rules of the current user to the given filters and applies the proper pricing.
Example API payload:
1{2 "ordercloud": {3 "RequiredInventoryLocations":["address1"],4 "SellerId": "12345"5 },6 "context": {7 "page": {8 "uri": "/search"9 }10 },11 "widget": {12 "items": [13 {14 "entity": "product",15 "rfk_id": "rfkid_7",16 "search": {17 "content": {},18 "filter": {19 "type": "or",20 "filters": [21 {22 "name": "id",23 "type": "eq",24 "value": "BoulderXMid"25 },26 {27 "name": "allsupplierscansell",28 "type": "eq",29 "value": false30 }31 ]32 }33 }34 }35 ]36 }37}
RequiredInventoryLocations supports simple wildcards. If your inventory locations IDs have a format similar to this: <productId>_<addressId>_inv". You can specify "*-<addressId>_inv". This is convenient when fulfilling product list pages.
The following is a list of SearchProxy endpoint by region:
Endpoint | Region |
---|---|
US West | |
Europe West | |
US East | |
Japan East | |
Australia East |
The format of the search URL is: {Endpoint}/api/v1/search/{domain}
New Properties
ProductSyncConfig
1{2 "SyncProductChanged": true | false,3 "SyncProductDeleted": true | false,4 "DeliveryConfigID": ""5}
New Endpoints
GET /integrations/ProductSync
PUT /integrations/ProductSync
PATCH /integrations/ProductSync
DELETE /integrations/ProductSync
For more in formation, see Product Sync API Reference
Still have questions?
Ask in our Community Channel