Fluent Commerce Logo
Docs
Sign In

SendEventToAllInventoryQuantities

Rule

Changed on:

2 Nov 2023

Overview

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

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

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 event to be triggered

inventoryQuantityTypes

List of inventory quantity types

Event attributes

Parameter

Description

Data Type

Required?

inventoryPosition

The inventory position whose associated inventory quantities are receiving the event

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}

Language: json

Detailed Technical Description

The rule checks all the Inventory Quantities under a given Inventory Position to find ones which match the type or types 

`{inventoryQuantityTypes}`
 given in the Input Parameters. The rule will then send an event 
`{eventName}`
 to each of the Inventory 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}

Language: java

Name: InventoryPosition

Description:

[Warning: empty required content area]


Version History

2023-08-02

v23.8.2

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