Fluent Commerce Logo
Docs
Sign In

NotifyVirtualCataloguesOnNetworksMatch

Rule

Changed on:

17 Oct 2024

Overview

Conditionally send an event (or multiple events) to Virtual Catalog(s), which passed the "Network-Match-Check".

A Virtual Catalog passes the "Network-Match-Check" when its Network(s) finds a match with a given Inventory Position Location Network(s).

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

Forward the event with name {eventName} to the virtual catalogues if the location's network ref is listed in the virtual catalogue's networkIds.

Accepts

  • INVENTORY_POSITION

Actions

Rule parameters

Name

Type

Description

`eventName`

`String`

The name of the event to be triggered

Event attributes

This Rule does not expect any Event attributes.

Exceptions

  • This Rule throws a
    `PropertyNotFoundException`
    when the Rule parameter(s) is not provided.
  • This Rule throws a 
    `RubixException`
     when:
    • A given Inventory Position can not be found.
    • Virtual Catalogs not found.

Configuration example

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

Language: json

Detailed Technical Description

This Rule conditionally produces a SendEventAction. The Rule condition is defined by the "Network-Match-Check", including the following steps:

  • The Rule will get the Inventory Position.
    It stops the execution when the Inventory Position can not be found.
  • The list of Networks (by
    `id`
    ) assigned to the loaded Inventory Position Location will be retrieved.
  • The Rule then gets Virtual Catalogs, including their lists of associated Networks (stored in the
    `networkIds`
    field).
  • The Networks lists mentioned (associated with the Location (point 2) and the Virtual Catalogs (point 3)) will be compared. The Rule condition is met when any match case occurs. 
  • Finally, the event 
    `{eventName}`
     will be sent to all the Virtual Catalogs passed the "Network-Match-Check".

The generated event contains the following event attributes:

Parameter

Description

Notes

`ref`

Inventory Position reference

Legacy attribute

`locationRef`

Location reference

Taken from the Inventory Position

`productRef`

Product reference 

Taken from the Inventory Position

`inventoryPositionRef`

Inventory Position reference

Taken from

`getEvent().getEntityRef();`

`inventoryCatalogueRef`

Inventory Catalog reference

Legacy attribute

Version History

2024-10-28

v.24.10.28

Refers to the Product Release Version

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