SendEventOnFulfilmentInventoryUpdate
Changed on:
2 Nov 2023
Overview
Send {inventoryConfirmationEvent} if is confirmed, or send {inventoryReserveEvent} if is reserved, or {inventoryCancelEvent} if is cancelled, to position and include quantities of type {inventoryQuantityTypes} in .
Plugin Name | Inventory Reference Module |
---|---|
Namespace | [[account.id]].globalinventory |
The is the foundation for 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 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 to be triggered if is confirmed |
inventoryCancelEvent | The name of to be triggered if is cancelled |
inventoryReserveEvent | The name of to be triggered if is reserved |
inventoryQuantityTypes | List of quantity types |
Event attributes
Parameter | Description | Data Type | Required? |
items | The fulfilment information. It includes |
Attribute Name | Description |
ref | position ref |
type | position type |
productRef | Product ref |
locationRef | ref |
inventoryQuantities | RESERVED, SALE or CORRECTION quantities information |
Exceptions
This throws a PropertyNotFoundException when:
- the
`inventoryConfirmationEvent`
property is not provided in workflow - the
`inventoryCancelEvent`
property is not provided in workflow - the
`inventoryReserveEvent`
property is not provided in workflow - the
`inventoryQuantityTypes`
property is not provided in workflow
This throws a general RubixException with code 500 when the "items" 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}
Detailed Technical Description
Retrieve position by catalogue `ref`
, `ref`
and product `ref`
for each item from "items" If position exists
- Add event attribute for RESERVED quantity:
- ref:
`{inventoryPositionRef}:RESERVED:{fulfilmentId}`
- type: RESERVED
- quantity:
`item.reserveQty`
- ref:
- If
`item.reserveQty`
is not 0 and`inventoryQuantityTypes`
contains RESERVED type, the rule will produce one SendEventAction with`{inventoryReserveEvent}`
event name. - Else if
`item.cancelQty`
is not 0 and`inventoryQuantityTypes`
contains RESERVED type, the rule will produce one SendEventAction with`{inventoryCancelEvent}`
event name. - Else
- if
`item.saleQty`
is not 0 and`inventoryQuantityTypes`
contains SALE type, the rule will produce one SendEventAction with`{inventoryConfirmationEvent}`
event name and additional SALE inventory quantity information as event attribute- ref:
`{inventoryPositionRef}:SALE:{fulfilmentId}`
- type: SALE
- quantity:
`item.saleQty`
- ref:
- If
`item.correctionQty`
is not 0 and`inventoryQuantityTypes`
contains CORRECTION type, the rule will produce one SendEventAction with`{inventoryConfirmationEvent}`
event name and additional CORRECTION inventory quantity information as event attribute- ref:
`{inventoryPositionRef}:CORRECTION:{fulfilmentId}`
- type: CORRECTION
- quantity:
`item.correctionQty`
- ref:
- if
Version History
v2.0.0
refers to the