Fluent Commerce Logo
Docs
Sign In

SendEventToAllInventoryQuantities

Rule

Changed on:

2 Nov 2023

Overview

Send an {eventName} to quantities of type {inventoryQuantityTypes} using attributes

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

Send an event {eventName} to inventory quantities of type {inventoryQuantityTypes} using event attributes

Accepts

  • INVENTORY_POSITION

Actions

  • This rule produces a SendEventAction that will send an inline event to each the qualified inventory quantities.

Rule parameters

Parameter

Description

eventName

The name of to be triggered

inventoryQuantityTypes

List of quantity types

Event attributes

Parameter

Description

Data Type

Required?

inventoryPosition

The position whose associated quantities are receiving the

The type is a Java object, required and defined below

Required

Exceptions

  • If `eventName` rule property or `inventoryQuantityTypes` are not set in the workflow, a PropertyNotFoundException will be thrown.
  • If `inventoryPosition` event attribute is missing, an EventAttributeNotFoundException will be thrown.

Configuration example

1{
2  "name": "FLUENTRETAIL.globalinventory.SendEventToAllInventoryQuantities",
3  "props": {
4    "eventName": "QuantityResetEvent",
5    "inventoryQuantityTypes": [
6      "RESERVED"
7    ]
8  }
9}

Detailed Technical Description

The checks all the Quantities under a given Position to find ones which match the type or types `{inventoryQuantityTypes}` given in the Input Parameters. The will then send an  `{eventName}` to each of the Quantities that are of the given types.

1public class InventoryPosition {
2
3    private String ref;
4
5    private String type;
6
7    private String status;
8
9    @NonNull
10    private String productRef;
11
12    @NonNull
13    private String locationRef;
14
15    private List<InventoryQuantity> inventoryQuantities;
16
17    private List<Attribute> attributes;
18
19    @JsonPOJOBuilder(withPrefix = "")
20    public static final class Builder {
21
22    }
23}


Version History

2023-08-02

v23.8.2

refers to the