Product Synchronization & Sitecore Search
Published by Miranda Danielson on April 25, 2025
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. This article will cover the SearchIngestion
Delivery Configruation in-depth, along the optional content merging functionality, and the Search Proxy.
Connection to OrderCloud
First, you'll need to create a DeliveryConfiguration in your production marketplace with SearchIngestion
as one of the DeliveryTargets
by calling POST v1/integrations/deliveryconfig
with the following request body populated:
1{2 "ID": "",3 "Name": "",4 "Enabled": true,5 "DeliveryTargets": {6 "SearchIngestion": {7 "Domain": "",8 "Source": "",9 "Endpoint": "",10 "Entity": "",11 "ApiKey": ""12 }13 }14}
Next, you'll need to create a Product Sync, with the following request body populated:
1{2 "DeliveryConfigID": "", // pass the ID of the config created in the step above3 "SyncProductChanged": true,4 "SyncProductDeleted": true5}
The above request also accepts an optional ConfigData
object.
You are now setup to transmit product changes and deletions that occur in OrderCloud over to Search.
Content Merging
Search provides the ability for customers to provide locale specific information, such as unique category names or product descriptions, in order to tailor search results based on a user’s locale. That information is typically stored within an external CMS, not within OrderCloud, as it is a content concern. To bridge the gap between the content needed for Search and the data available in OrderCloud, we added enhancement to the Delivery Target Configuration for Search Ingestion that allows you to specify locales along with an HTTP endpoint so that we can gather the information needed prior to sending updates to Search. If your marketplace only has a single locale, you can also use this feature to send along things like product attributes.
To utilize this feature, you'll need to update your DeliveryConfig
by calling PATCH v1/integrations/deliveryconfig/{deliveryConfigID}
with the following request body populated:
1{2 "DeliveryTargets": {3 "SearchIngestion": {4 "Content": {5 "Locales": [6 "",7 ""8 ],9 "Http": {10 "Endpoint": "",11 "CustomAuthHeaderName": "",12 "CustomAuthHeaderValue": ""13 }14 }15 }16 }17}
In Sitecore Search, the locals are separated by an underscore character "_". Examples: "en_us", "fr_ca", "en_au"
The URL that OrderCloud calls out to after an event is structured as
GET <endpoint>/{entity}/{ID}
In this example, the entity is
product
and theID
is the Product.ID of the product in OrderCloud
If the
CustomAuthHeaderName
andCustomAuthHeaderValue
are specified, they will be passed in the header of the HTTP call.The payload returned by this API must adhere to the following format:
1{2 "DocumentID": "P01",3 "EntityType": "product",4 "Data": [5 {6 "locale": "en_us",7 "fields": {8 "name": "Name of the product.",9 "description": "Description of the product."10 }11 },12 {13 "locale": "fr_ca",14 "fields": {15 "name": "Le nom du produit.",16 "description": "La description du produit."17 }18 }19 ]20}
The following attribute names are reserved and will be ignored if provided in the response body:
active
,allsupplierscansell
,autoforward
,buyers
,catalogs
,categories
,category_names
,ccids
,defaultpriceschedule
,defaultpricescheduleid
,defaultsupplierid
,quantitymultiplier
,inventory
,inventoryrecords
,isparent
,marketplace
,ownerid
,party_price
,partypriceschedules
,returnable
,sellerdefaultpriceschedules
,shipfromaddressid
,shipheight
,shiplength
,shipweight
,shipwidth
,speccount
,suppliers
,supplier_inventory
,specs
,usergroups
,variantcount
Sitecore Search Proxy
You should use the Sitecore Search Proxy when you need OrderCloud product visibility and pricing rules applied to your search results. 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.
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.
Sample 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 wildcards. If your inventory records IDs have a format similar to this: <productId>_<addressId>
. You can specify *-<addressId>
and have all inventory records ending with that addressID returned.
Still have questions?
Ask in our Community Channel