Fluent Commerce Logo
Docs
Sign In

LoadInventoryPosition

Rule

Changed on:

26 May 2025

Overview

Forward `{eventName}` () with the 'inventoryPositionExists' set to true or false if the position exists or not respectively.

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

Forward event {eventName} (inline event) with the attribute 'inventoryPositionExists' set to true or false if the inventory position exists or not respectively.

Accepts

  • INVENTORY_CATALOGUE

Actions

Rule parameters

Parameter

Type

Description

`eventName`

`String`

The name of to be triggered

Event attributes

Name

Type

Description

Required?

`inventoryPosition`

InventoryPosition

One single item of batch request

Yes

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

[InventoryQuantity]

No

InventoryQuantity sub-attributes

Parameter

Description

Data Type

Required?

`ref`

Quantity ref

String

No 

`type`

Quantity type

String

No 

`qty`

Quantity

Integer

No

`status`

Status

String

No 


Exceptions

This will throw a RubixException if `{eventName}` property is not provided.

Configuration example

1{
2  "name": "[[account.id]].globalinventory.LoadInventoryPosition",
3  "props": {
4    "eventName": "CheckInventoryPositionExists"
5  }
6}

Detailed Technical Description

Based on the position `ref` (from batch) and catalogue ref (from ref) the loads the corresponding position in one API request. The then adds all the following information into attributes and produces one `SendEventAction` with the  `{eventName}`.

Event Attribute Key

Event Attribute Value

`type`

`entitySubtype`, if undefined (null) sets to `DEFAULT`

`ref`

 `<productRef>:<locationRef>:type`

`qty`

inventoryPosition.qty (from incoming attributes)

`productRef`

inventoryPosition.productRef (from incoming attributes)

`locationRef`

inventoryPosition.locationRef (from incoming attributes)

`inventoryPositionStatus`

inventoryPosition.status from query*, otherwise set to CREATED

`inventoryPositionRef`

inventoryPosition.ref from query*, otherwise generated to `<productRef>:<locationRef>:type`

`inventoryPositionOnHand`

inventoryPosition.onHand from query*, otherwise set to 0

`inventoryPositionExists`

TRUE if position exists, FALSE if position doesn't exist

`correctedQty`

inventoryPosition.correctedQty (from incoming attributes) - UNUSED

`inventoryQuantityExists`

TRUE if quantity exists, FALSE if quantity doesn't exist

`inventoryQuantityTypes`

The List<String> of all the quantity types that exist for the given position. Currently, the is restricted to picking only LAST_ON_HAND Quantity type for performance reasons

*The first option will occur when an Position already exists, otherwise the second option will occur.

Version History

2024-08-15

v24.8.15

Refers to the Product Release Version

2024-07-04

v24.7.4

Refers to the Product Release Version

2023-11-02

v1.0.0

refers to the