Fluent Commerce Logo
Docs
Sign In

NotifyVirtualCatalogueOnNetworkMatch

Rule

Changed on:

9 Sept 2024

Overview

Forward the event with name {eventName} to the virtual catalogue with ref {virtualCatalogueRef} if the current Inventory Positions location’s network ref is listed in the virtual catalogue's networkIds.

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 catalogue with ref {virtualCatalogueRef} if the current Inventory Positions location’s network ref is listed in the virtual catalogue's networkIds.

Accepts

  • INVENTORY_POSITION

Actions

  • This rule produces a SendEventAction that will forward to the incoming event with the name {eventName} when the corresponding location of the given inventory position is present in one of the virtual catalogue's networks.

Rule parameters

Parameter

Description

eventName

The name of event to be triggered

virtualCatalogueRef

The ref of the virtual catalogue to be notified

Event attributes

Not Applicable for this rule.

Exceptions

  • This rule throws a PropertyNotFoundException, which is a subclass of RubixException, if the 
    `eventName`
     is not provided.
  • The rule throws a RubixException when the given virtual catalogue can not be found or does not have networks configured properly

Configuration example

1{
2  "name": "[[account.id]].globalinventory.NotifyVirtualCatalogueOnNetworkMatch",
3  "props": {
4    "eventName": "virtual_catalogue_event",
5    "virtualCatalogueRef": "the_ref_of_the_catalogue"
6  }
7}

Language: json

Detailed Technical Description


The generated event contains the following event attributes:

Parameter

Description

Notes

ref

Inventory Position reference 

legacy attribute

inventoryCatalogueRef

Catalogue reference

legacy attribute

locationRef

The ref of the location

taken from Inventory Position

productRef

The product ref of the virtual 

taken from Inventory Position

inventoryPositionRef

Inventory Position reference. 

is taken from

`getEvent().getEntityRef();`

  • The rule will first get the Inventory Position based on the current catalog and entity references. In case the inventory position could not be found, the rule stops the execution.
  • Once the inventory position has been loaded, it will then retrieve the list of networks by 
    `id`
     for which the Inventory Positions location is featured.
  • The rule then gets the Virtual Catalogue by 
    `{virtualCatalogueRef}`
    , this will include the list of network IDs associated to that Virtual Catalogue.
  • The rule will then compare the networks that the location is featured to the networks that are associated with the Virtual Catalogue, if there is any match the event 
    `{eventName}`
     will be sent through to the Virtual Catalogue to begin updating the correct Virtual Catalogues. Additionally, if the Virtual Catalogue is associated with multiple Retailers the event will be sent to each of the associated Retailers to ensure cross-Retailer functionality.

Version History

2023-08-02

v2.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