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 | false5}
SyncEntityChanged and SyncEntityDeleted enable and disable incremental synchronization. Regardless of their values, you can always issue a manual full synchronization if necessary.
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
Still have questions?
Ask in our Community Channel