Sellable item commands, pipelines and blocks
Version:
The following table describes the sellable items commands and pipelines:
| Command/Pipeline | Description |
|---|---|
CreateSellableItemCommandCreateSellableItemPipeline | Creates a new sellable item in the Commerce Engine. Parameters:
Note When you create a sellable item programmatically, you must also explicitly associate the new item to a catalog, as shown in this |
CreateSellableItemVariationCommandCreateSellableItemVariationPipeline | Creates a variant of an existing sellable item. Parameters:
|
DeleteSellableItemCommand | Deletes the specified sellable item. Parameters:
|
DeleteSellableItemVariationCommand | Deletes the specified variantof the sellable item. Parameters:
|
DisableSellableItemVariationCommandDisableSellableItemVariationPipeline | Removes the specified variant from a sellable item. Parameters:
|
EditSellableItemCommandEditSellableItemPipeline | Makes changes to an existing sellable item.
|
GetBulkPricesCommandGetSellableItemPipeline | Retrieves a string of sellable item identifiers and returns a bulk pricing model for each item. Returns pricing on a particular variant if a variant identifier is supplied, otherwise returns pricing on all variants. Parameters:
|
GetSellableItemsByParentCommandGetSellableItemsByParentPipeline | Retrieves all sellable items that belong to a specified parent (that is, a catalog or a category). Parameters:
|
GetSellableItemCommandGetSellableItemPipeline | Retrieves the specified sellable item. Parameters:
|
GetSellableItemsCommandGetSellableItemsPipeline | Retrieves a list of all sellable items in the system. Parameters: none. |
RemoveListPricesCommandRemoveListPricesPipeline | Removes the specified list prices for a sellable item. Parameters:
|
UpdateListPricesCommandUpdateListPricesPipeline | Adds or updates the specified list prices (in different currencies) for a sellable item. Parameters:
|
UpdateSellableItemPurchasableCommand | Determines if an item is available for purchase or not.
|
DeleteSellableItemBundleReferencesBlock | Checks if the item that is being deleted is a sellable item and cleans up bundle associations if necessary. |
Example: create a sellable item programmatically
You use the CreateSellableItem command to create a sellable item programmatically. When you create a sellable item using code, you must also include an explicit association to the relevant catalog.
The following example shows a sample createSellableItem command, with the required catalog association:
If you have suggestions for improving this article, let us know!