Fluent Commerce Logo
Docs
Sign In

LoadVirtualPositionAndVirtualCatalogueDetails

Rule

Changed on:

2 Nov 2023

Overview

Loads the details and then sends an {eventName}

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

Loads the virtual position details and then sends an event {eventName}

Accepts

  • VIRTUAL_CATALOGUE

Actions

  • This rule produces a SendEventAction that forwards the incoming event as an inline event with the given name {eventName}.

Rule parameters

Parameter

Description

eventName

The name of to be triggered

type

The type of & Virtual Catalogue*

*This needs to be either “BASE” or “AGGREGATE” for the 2 types of Virtual Catalogue.


Event attributes

Parameter

Description

Data Type

Required?

virtualCatalogueInventoryCatalogueRef

The ref of the catalogue this goes

String

Optional

virtualPositionProductRef

The product ref of the

String

Optional

virtualPositionGroupRef

The group reference value of the

String

Optional

Exceptions

No Exceptions are generated from this

Configuration example

1{
2  "name": "FLUENTRETAIL.globalinventory.LoadVirtualPositionAndVirtualCatalogueDetails",
3  "props": {
4    "eventName": "CheckVirtualPositionExists",
5    "type": "BASE"
6  }
7}

Detailed Technical Description

The generated contains the following attributes:

Parameter

Description

Notes

virtualCatalogueRef

The ref of the virtual catalogue


virtualCatalogueType

The type of the virtual catalogue


virtualCatalogueInventoryCatalogueRef

The catalogue ref this virtual catalogue is made of


virtualCatalogueProductCatalogueRef

The product catalogue ref this virtual catalogue is made of


virtualCatalogueControlGroupRef

The control group ref this virtual catalogue is made of


virtualCatalogueNetworkIds

The references this virtual catalogue is made of


virtualPositionRef

The ref of the


virtualPositionProductRef

The product ref of the


virtualPositionQuantity

The quantity of the


virtualPositionGroupRef

The group reference value of the


virtualPositionType

The type


targetVirtualPositionRef

The ref of the

same as the value of virtualPositionRef

locationRef

The ref of the

Contains the same value as the {locationRef} incoming

productRef

The product ref of the

Same value as the value of {productRef} incoming

  • The rule queries a virtual catalogue using the `{entityRef}` value of the event and adds all the virtual catalogue information to the new event as attributes. See output actions for all the event attribute names. This rule makes another query to fetch virtual position details using the `{entityRef}` of the incoming event (as the virtual catalogue `ref`) and the virtual position `ref`.
  • The virtual position `ref` is constructed in the following way.
    • virtual position ref = `{productRef}:{locationRef}:BASE` if the input parameter `{type}` is BASE
    • virtual position ref = virtual position ref = `{productRef}:{rootEntityRef}:BASE` if the input parameter `{type}` is AGGREGATE
  • The virtual position information is also added to the new event as attributes.
  • If there is no virtual catalogue or virtual position found, the rule won't add virtual catalogue or virtual position details to the generated event, however it will still trigger the new event `{eventName}`.

Version History

2023-08-23

v2.0.0

First release