Work with the Inventory Entity Views and Actions API
You can use the XC Inventory Entity Views and Actions API to integrate XC Inventory operations and data a with external business systems.
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 an inventory set (C#)
Get an inventory set (C#)
You can retrieve an inventory set programmatically. The query must specify the id of the inventory set (inventorySetId).
To get an inventory set using C#:
Create an inventory set (C#)
Create an inventory set (C#)
You can create an inventory set programmatically.
To create a new inventory set, for example using C#:
-
Get the entity view for the action:
-
Specify inventory set details. The request must specify the the name of the new inventory set (
name), the display name (DisplayName), and optionally a description (description). -
Execute the action:
Update an inventory set (C#)
Update an inventory set (C#)
You can edit the details of an existing inventory set.
To update the details of an inventory set, for example to change its display name and description, using C#:
-
Get the entity view:
-
Provide the updated details for the inventory set:
-
Execute the action:
Associate an item to an inventory set (C#)
Associate an item to an inventory set (C#)
You can associate a sellable item to a specified inventory set. For example, when a sellable item is associated with two inventory sets, you can allocate 100 units of a sellable item to inventory set A, and 40 to inventory set B. This lets you manage stock according to your needs.
To associate a sellable item to an inventory set, for example using C#:
-
Get the entity view:
-
Set the inventory details for the sellable item, for example:
-
Execute the action:
Disassociate an item from an inventory set (C#)
Disassociate an item from an inventory set (C#)
You can remove a sellable item (sellableItemId), or a specific variant (variationId) of an item, from an inventory set.
To disassociate an item, for example, a sellable item, from a specified inventory set:
-
Get the entity view and disassociate the sellable item:
-
Execute the action:
Transfer inventory (C#)
Transfer inventory (C#)
You can transfer a quantity of units of a sellable items between multiple inventory sets. For example, if you allocated 100 units of a given sellable item to inventory set A, and 40 to set B, but set B is running low, you can transfer additional amounts of the sellable item from inventory set A to inventory set B. This lets you respond to the different needs of your stores and distribution centers.
To transfer inventory from one set to another, for example, using C#:
-
Get the entity view:
-
Specify the inventory set and quantity to transfer:
-
Execute the action:
Associate a catalog to an inventory set (C#)
Associate a catalog to an inventory set (C#)
You can associate a catalog to an inventory set.
To associate a catalog to an inventory set, for example, using C#:
-
Get the entity view and delete the catalog:
-
Specify the catalog to associate with the inventory set:
-
Execute the action:
Disassociate a catalog from an inventory set (C#)
Disassociate a catalog from an inventory set (C#)
You can disassociate a catalog from an inventory set.
To disassociate a catalog from a inventory set, for example, using C#:
-
Get the entity view and specify and specify the catalog ID to disassociate:
-
Execute the action: