SendEventOnFulfilmentInventoryUpdate
Changed on:
2 Nov 2023
Overview
Send event {inventoryConfirmationEvent} if inventory is confirmed, or send {inventoryReserveEvent} if inventory is reserved, or {inventoryCancelEvent} if inventory is cancelled, to inventory position and include inventory quantities of type {inventoryQuantityTypes} in event attribute.
Plugin Name | Inventory Reference Module |
---|---|
Namespace | [[account.id]].globalinventory |
The Inventory Reference Module is the foundation for inventory related implementations. It provides reference Workflows for inventory ingestion and processing. Extensible by design, use this Module as a base to build a solution to the needs of your customers.
The Inventory Module includes the following areas:
- Product Catalogue workflow
- Inventory Catalogue workflow
- Control Group workflow
- Virtual Catalogue workflow
UI Description
Send event {inventoryConfirmationEvent} if inventory is confirmed, or send {inventoryReserveEvent} if inventory is reserved, or {inventoryCancelEvent} if inventory is cancelled, to inventory position and include inventory quantities of type {inventoryQuantityTypes} in event attribute.
Accepts
- INVENTORY_CATALOGUE
Actions
- This rule produces multiple SendEventActions that forwards the incoming event as a scheduled event with the given name {inventoryConfirmationEvent}, {inventoryCancelEvent}, {inventoryReserveEvent} and following event attributes to the inventory position. See Detailed Rule Logic to get more information.
Rule parameters
Parameter | Description |
inventoryConfirmationEvent | The name of event to be triggered if inventory is confirmed |
inventoryCancelEvent | The name of event to be triggered if inventory is cancelled |
inventoryReserveEvent | The name of event to be triggered if inventory is reserved |
inventoryQuantityTypes | List of inventory quantity types |
Event attributes
Parameter | Description | Data Type | Required? |
items | The fulfilment information. It includes
|
Attribute Name | Description |
ref | Inventory position ref |
type | Inventory position type |
productRef | Product ref |
locationRef | Location ref |
inventoryQuantities | RESERVED, SALE or CORRECTION inventory quantities information |
Exceptions
This rule throws a PropertyNotFoundException when:
- the property is not provided in workflow
`inventoryConfirmationEvent`
- the property is not provided in workflow
`inventoryCancelEvent`
- the property is not provided in workflow
`inventoryReserveEvent`
- the property is not provided in workflow
`inventoryQuantityTypes`
This rule throws a general RubixException with code 500 when the "items" event attribute is empty.
Configuration example
1{
2 "name": "FLUENTRETAIL.globalinventory.SendEventOnFulfilmentInventoryUpdate",
3 "props": {
4 "inventoryConfirmationEvent": "inventoryConfirmationEvent",
5 "inventoryCancelEvent": "inventoryCancelEvent",
6 "inventoryReserveEvent": "inventoryReserveEvent",
7 "inventoryQuantityTypes": ["RESERVED", "SALE"]
8 }
9}
Language: json
Detailed Technical Description
Retrieve inventory position by inventory catalogue
`ref`
`ref`
`ref`
- Add event attribute for RESERVED quantity:
- ref:
`{inventoryPositionRef}:RESERVED:{fulfilmentId}`
- type: RESERVED
- quantity:
`item.reserveQty`
- ref:
- If is not 0 and
`item.reserveQty`
contains RESERVED type, the rule will produce one SendEventAction with`inventoryQuantityTypes`
event name.`{inventoryReserveEvent}`
- Else if is not 0 and
`item.cancelQty`
contains RESERVED type, the rule will produce one SendEventAction with`inventoryQuantityTypes`
event name.`{inventoryCancelEvent}`
- Else
- if is not 0 and
`item.saleQty`
contains SALE type, the rule will produce one SendEventAction with`inventoryQuantityTypes`
event name and additional SALE inventory quantity information as event attribute`{inventoryConfirmationEvent}`
- ref:
`{inventoryPositionRef}:SALE:{fulfilmentId}`
- type: SALE
- quantity:
`item.saleQty`
- ref:
- If is not 0 and
`item.correctionQty`
contains CORRECTION type, the rule will produce one SendEventAction with`inventoryQuantityTypes`
event name and additional CORRECTION inventory quantity information as event attribute`{inventoryConfirmationEvent}`
- ref:
`{inventoryPositionRef}:CORRECTION:{fulfilmentId}`
- type: CORRECTION
- quantity:
`item.correctionQty`
- ref:
- if
Version History
v2.0.0
refers to the plugin