Fluent Commerce Logo
Docs
Sign In

ForwardIfInventoryPositionStatusEquals

Rule

Changed on:

2 Jan 2024

Overview

This article covers the following topics: 

  • Supported Entities:
    `VIRTUAL_POSITION`
  • This rule produces a
    `SendEventAction`
  • Rule Parameters
  • Event Attributes
  • Exceptions
  • Configuration Example
  • Detailed Technical Description
Plugin NameInventory 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

Forwards the event {eventName} to the virtual position if the status of the corresponding inventory position matches any of {statuses}

Accepts

  • VIRTUAL_POSITION

Actions

  • This rule produces a
    `SendEventAction`
    that forwards the incoming event as an inline event with the given name
    `{eventName}`
    if the status of the corresponding inventory position of the given virtual position is in the status list of the rule property. Otherwise, it does not have any output/output action.

Rule parameters

Parameter

Description

eventName

The name of the event to be triggered

statuses

A list of inventory position statuses

Event attributes

Parameter

Description

Data Type

Required?

virtualCatalogueInventoryCatalogueRef

The ref of the inventory catalogue this virtual position is associated with

String

Required

virtualPositionProductRef

The product ref of the virtual position

String

Required

virtualPositionGroupRef

The group reference value of the virtual position

String

Required

Exceptions

  • This rule throws a PropertyNotFoundException when any rule parameter 
    `statues`
     or 
    `eventName`
     are missing.
  • This rule throws an EventAttributeNotFoundException when missing any of the above event attributes.

Configuration example

1{
2  "name": "<AccountId>.globalinventory.ForwardIfInventoryPositionStatusEquals",
3  "props": {
4    "statuses": [
5      "ACTIVE"
6    ],
7    "eventName": "UpdateBaseVirtualPosition"
8  }
9}

Language: json

Detailed Technical Description

  • The rule retrieves the corresponding inventory position based on the inventory catalogue ref and inventory position ref, which is generated from the virtual position group ref and product ref by following this format 
    `{productRef}:{virtualPositionGroupRef}:DEFAULT`
  • Verify if its status is in the list of statuses given by the rule property.
  • If yes, it forwards the inline event with the name 
    `{eventName}`
    . Otherwise, do nothing.

Version History

2023-08-02

v2.0.0

refers to 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