Work with the sellable items Entity Actions and Views API
Sitecore Experience Commerce can exchange product-related data with other business systems using the Catalog Entity Views and Actions API.
The Views and Actions API is an authoring API designed to service a business user interface and is not optimized for integration scenario.
You should consider the following when using the Views and Actions API for your commerce integration:
-
The Views and Actions API can only process one Commerce entity at the time and does not support batch processing.
-
The Views and Actions API carries more overhead than the Commerce web service API. A call to the Views and Action API is typically a 3-step process that requires getting the action's view, modifying the view's properties with updated values, and then executing the action.
Get a sellable item (C#)
Get a sellable item (C#)
The following example shows how to get a sellable item using C#:
Create a sellable item (C#)
Create a sellable item (C#)
The following example shows how to create a sellable item using C#:
-
Get the entity view:
-
Specify the sellable item properties:
-
Execute the action:
Delete a sellable item (C#)
Delete a sellable item (C#)
The following example shows how to delete a sellable item using C#:
-
Get the entity view:
-
Delete the sellable item:
-
Execute the action:
Update a sellable item (C#)
Update a sellable item (C#)
The following example shows how you can use the Entity Views and Actions API to update the details of a sellable item using C#:
-
Get the entity view:
-
Modify the view's property with the details to update:
-
Execute the action:
Disassociate a sellable item (C#)
Disassociate a sellable item (C#)
The following example shows how you can use the Entity Views and Actions API to disassociate a sellable item (for example, from a category), using C#:
-
Get the entity view:
-
Disassociate the sellable item:
-
Execute the action: