Fluent Commerce Logo
Docs
Sign In

SplitInventoryUpdates (Deprecated)

Rule

Changed on:

30 Apr 2025

Overview

Notifies the positions of the incoming updates with {eventName}

Plugin NameInventory 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

Notifies the inventory positions of the incoming updates with event {eventName}

Accepts

  • INVENTORY_CATALOGUE

Actions

  • This rule sends an individual event for each InventoryPosition record sent to the event up to the first 1000 records passed in the attributes.

Rule parameters

Parameter

Description

Notes

eventName

The name of the to be triggered

Required

Event attributes

Parameter

Description

Data Type

Required?

InventoryUpdates

Array of InventoryPosition records to be updated

[InventoryPosition]

No

InventoryPosition sub-attributes

Parameter

Description

Data Type

Required?

ref

ref

String

No, unused

type

The position type

String

No, unused

productRef

The ref of the variant product associated to the position

String

No

locationRef

The ref associated to the position

String

No

qty

The quantity

Integer

No

correctedQty

corrected quantity

Integer

No, unused

inventoryQuantity

inventoryQuantityUpdate

POJO

No

InventoryQuiantity sub-attributes

Parameter

Description

Data Type

Required?

ref

Inventor Quantity ref

String

No 

type

Quantity type

String

No 

qty

Quantity

Integer

No

status

Status

String

No 

Exceptions

Exceptions will be thrown if attributes in the incoming are missing or an name is missing in a given .

Configuration example

1{
2  "name": "globalinventory.SplitInventoryUpdates",
3  "props": {
4    "eventName": "InventoryChanged"
5  }
6}

Detailed Technical Description


This parses/deserialises an `InventoryUpdates`  into a list of `InventoryUpdate` objects, then it produces `SendEventActions` for each individual `InventoryUpdate` to create multiple new outgoing events for all positions at `INVENTORY_CATALOGUE` level with the given name.

InventoryUpdate DTO Definition
1    public class InventoryUpdate {
2
3        private String ref;
4        private String productRef;
5        private String locationRef;
6        private Integer qty;
7        private Integer correctedQty;
8        private String type;
9        private InventoryQuantityUpdate inventoryQuantity;
10    };
11    
12    public class InventoryQuantityUpdate {
13    
14        private String ref;
15        private Integer qty;
16        private String type;
17        private String status;
18        private Map<String, Object> attributes;
19    }


Version History

2023-08-03

v2.0.0

refers to the