Fluent Commerce Logo
Docs
Sign In

ForwardIfIncomingAttributeEquals

Rule

Changed on:

2 Jan 2024

Overview

Forward the incoming with the name `{eventName}` if key `{attributeKey}` has value `{attributeValue}`.

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

Forward the incoming event with the event name {eventName} if event attribute key {attributeKey} has value {attributeValue}.

Accepts

  • CATEGORY
  • PRODUCT
  • INVENTORY_POSITION
  • INVENTORY_QUANTITY
  • INVENTORY_CATALOGUE
  • VIRTUAL_CATALOGUE
  • VIRTUAL_POSITION
  • PRODUCT_CATALOGUE

Actions

  • This rule produces a SendEventAction that forwards the incoming event with the given name when the specified attribute matches to the rule properties.

Rule parameters

Parameter

Description

eventName

The name of to be triggered

attributeKey

The key of the to be verified

attributeValue

The value of the to be verified

Event attributes

Parameter

Description

Data Type

Required?

attributeKey

The specified by the property attributeKey

String

Optional

Exceptions

This will throw a PropertyNotFoundException which is a subclass of RubixException if the `eventName`/`attributeKey`/`attributeValue` property is not provided.

Configuration example

1{
2  "name": ">AccountID>.globalinventory.ForwardIfIncomingAttributeEquals",
3  "props": {
4    "eventName": "attribute_matched",
5    "attributeKey": "the_name_of_the_key",
6    "attributeValue": "the_expected_value"
7  }
8}

Detailed Technical Description

The first checks whether the required to be compared exists. If it does exist it will compare the value `{attributeValue}` from the Input Parameters to the value `{attributeValue}` from the Attributes. If these 2 values are the same then the will an with name `{eventName}`.

Version History

2023-08-02

v2.0.0

refers to