Fluent Commerce Logo
Docs
Sign In

LoadInventoryPosition

Rule

Changed on:

2 Nov 2023

Overview

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

Plugin NameInventory Reference Module
Namespace{{accountId}}.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 Modules includes the following areas:

  • Inventory Catalogue workflow
  • Virtual Catalogue workflow
  • Control Group workflow
  • Product 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

  • This rule produces a SendEventAction with name {eventName} as provided in rule Input Parameters

Rule parameters

Parameter

Description

eventName

The name of event to be triggered

Event attributes

Parameter

Description

Data Type

Required?

inventoryPosition

One single item of inventory batch request

Array

Required

Exceptions

This rule will throw a RubixException if 

`{eventName}`
 property is not provided.

Configuration example

1{
2  "name": "FLUENTRETAIL.globalinventory.LoadInventoryPosition",
3  "props": {
4    "eventName": "CheckInventoryPositionExists"
5  }
6}

Language: json

Detailed Technical Description

Based on the inventory position 

`ref`
 (from inventory batch) and inventory catalogue ref (from event root entity ref) the rule loads the corresponding inventory position in one GraphQL API request. The rule then adds all the following information into event attributes and produces one 
`SendEventAction`
 with the event 
`{eventName}`
.

Event Attribute Key

Event Attribute Value

type

inventoryPosition.type (from incoming event attributes)

ref

inventoryPosition.ref (from incoming event attributes)

qty

inventoryPosition.qty (from incoming event attributes)

productRef

inventoryPosition.productRef (from incoming event attributes)

locationRef

inventoryPosition.locationRef (from incoming event attributes)

inventoryPositionStatus

inventoryPosition.status from GraphQL query*, otherwise set to CREATED

inventoryPositionRef

inventoryPosition.ref from GraphQL query*, otherwise generated to 

`<productRef>:<locationRef>:DEFAULT`

inventoryPositionOnHand

inventoryPosition.onHand from GraphQL query*, otherwise set to 0

inventoryPositionExists

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

correctedQty

inventoryPosition.correctedQty (from incoming event attributes)

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


Version History

2023-11-02

v1.0.0

refers to the plugin

Copyright © 2024 Fluent Retail Pty Ltd (trading as Fluent Commerce). All rights reserved. No materials on this docs.fluentcommerce.com site may be used in any way and/or for any purpose without prior written authorisation from Fluent Commerce. Current customers and partners shall use these materials strictly in accordance with the terms and conditions of their written agreements with Fluent Commerce or its affiliates.

Fluent Logo