Entity Synchronization
Published by Marc Bednar on February 16, 2024
Overview
OrderCloud introduces the ability to publish base entities to the destination of your choice. You will be notified when the entities are created, updated or deleted via any of the following delivery configuration targets:
SearchIngestion for out-of-the-box integration with Sitecore Search
An Http(s) endpoint
An EventHub instance
A Kafka instance
AzureBlob logging
The current release allows you to synchronize the following entities:
Buyers
User Groups
Categories
Inventory Records
Suppliers
Users
Admin
Buyer
Supplier
Sitecore Search Integration
When synchronizing entities using the SearchIngestion delivery target, you must specify the name of the entity as part of the delivery target. If you are going to synchronize different entity types, then it is crucial that you create a separate delivery configuration for each entity type.
Example of a Product Synchronization Delivery Configuration
1{2 "ID": "SynchronizeProducts",3 "Name": "SynchronizeProducts",4 "Enabled": true,5 "DeliveryTargets": {6 "SearchIngestion": {7 "Domain": "<your domain>",8 "Source": "<your source>",9 "Endpoint": "https://discover.sitecorecloud.io",10 "Entity": "product",11 "ApiKey": null12 }13 }14}
Example of a Category Entity Synchronization Delivery Configuration
1{2 "ID": "SynchronizeCategories",3 "Name": "SynchronizeCategories",4 "Enabled": true,5 "DeliveryTargets": {6 "SearchIngestion": {7 "Domain": "<your domain>",8 "Source": "<your source>",9 "Endpoint": "https://discover.sitecorecloud.io",10 "Entity": "category",11 "ApiKey": null12 }13 }14}
Notice in the above configurations, the Entity names are specific to the type of entity defined in Sitecore Search.
New Properties
EntitySyncConfig
1{2 "DeliveryConfigID": "".3 "SyncEntityChanged": true | false,4 "SyncEntityDeleted": true | false,5 "Paused" : true | false6}
SyncEntityChanged and SyncEntityDeleted enable and disable incremental synchronization. Regardless of their values, you can always issue a manual full synchronization if necessary.
For more information on the pause feature, please refer to Pausing Synchronization Tasks
New Endpoints
GET /v1/entitysync/categories
PUT /v1/entitysync/categories
DELETE /v1/entitysync/categories
GET /v1/integrations/entitysync/suppliers
PUT /v1/integrations/entitysync/suppliers
DELETE /v1/integrations/entitysync/suppliers
GET /v1/integrations/entitysync/adminusers
PUT /v1/integrations/entitysync/adminusers
DELETE /v1/integrations/entitysync/adminusers
GET /v1/integrations/entitysync/buyers
PUT /v1/integrations/entitysync/buyers
DELETE /v1/integrations/entitysync/buyers
GET /v1/integrations/entitysync/buyers/usergroups
PUT /v1/integrations/entitysync/buyers/usergroups
DELETE /v1/integrations/entitysync/buyers/usergroups
GET /v1/integrations/entitysync/buyers/users
PUT /v1/integrations/entitysync/buyers/users
DELETE /v1/integrations/entitysync/buyers/users
GET /v1/integrations/entitysync/products/inventoryrecords
PUT /v1/integrations/entitysync/products/inventoryrecords
DELETE /v1/integrations/entitysync/products/inventoryrecords
GET /v1/integrations/entitysync/suppliers/users
PUT /v1/integrations/entitysync/suppliers/users
DELETE /v1/integrations/entitysync/suppliers/users
For more information, see Entity Sync API Reference
Sync Endpoints
The entity-sync feature now support /sync endpoints, allowing you to target specific entities for synchronization to quickly resolve sync issues. These endpoints are not intended—and should never be used—for syncing entire lists or handling incremental updates. Such operations are better managed through the dedicated full sync and incremental sync processes provided by this feature.
POST /v1/integrations/entitysync/adminusers/sync
POST /v1/integrations/entitysync/buyers/sync
POST /v1/integrations/entitysync/buyers/users/sync
POST /v1/integrations/entitysync/buyers/usergroups/sync
POST /v1/integrations/entitysync/catalogs/categories/sync
POST /v1/integrations/entitysync/products/inventoryrecords/sync
POST /v1/integrations/entitysync/suppliers/users/sync
POST /v1/integrations/entitysync/suppliers/sync
SyncAdminUser
1{2 "UserID": ""3}
SyncBuyer
1{2 "BuyerID": ""3}
SyncBuyerUser
1{2 "BuyerID": "",3 "UserID": ""4}
SyncBuyerUserGroup
1{2 "BuyerID": "",3 "UserGroupID": ""4}
SyncCategory
1{2 "CatalogID": "",3 "CategoryID": ""4}
SyncInventoryRecord
1{2 "ProductID": "",3 "InventoryRecordID": ""4}
1null
SyncSupplier
1{2 "SupplierID": ""3}
SyncSupplierUser
1{2 "SupplierID": "",3 "UserID": ""4}
Still have questions?
Ask in our Community Channel