Fluent Commerce Logo
Docs
Sign In

ForwardIfIncomingAttributeEquals

Rule

Changed on:

2 Jan 2024

Overview

Forward the incoming event with the event name

`{eventName}`
if event attribute key
`{attributeKey}`
has value
`{attributeValue}`
.

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

attributeKey

The key of the attribute to be verified

attributeValue

The value of the attribute to be verified

Event attributes

Parameter

Description

Data Type

Required?

attributeKey

The attribute specified by the rule property attributeKey

String

Optional

Exceptions

This rule 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}

Language: json

Detailed Technical Description

The rule first checks whether the required attribute to be compared exists. If it does exist it will compare the value 

`{attributeValue}`
 from the Input Parameters to the value 
`{attributeValue}`
 from the Event Attributes. If these 2 values are the same then the rule will trigger an event with name 
`{eventName}`
.

Version History

2023-08-02

v2.0.0

refers to 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