ForwardIfProductStatusEquals
Changed on:
29 Nov 2023
Overview
Send an {eventName} if the status of the product in the product catalogue with ref {productCatalogueRef} has the current status of {status}.
Plugin Name | Inventory 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
Send an event {eventName} if the status of the product in the product catalogue with ref {productCatalogueRef} has the current status of {status}.
Accepts
- INVENTORY_POSITION
Actions
- This rule produces a SendEventAction that forwards the incoming event as an inline event with the given name {eventName} to the inventory position if the status of the product has a different status compared to the inventory position and the product has become {status}.
Rule parameters
Parameter | Description |
eventName | The name of to be triggered |
status | Expected status |
productCatalogueRef | The product catalogue ref of the product |
Event attributes
Not Applicable for this .
Exceptions
- This rule throws a PropertyNotFoundException when:
- the
`eventName`
property is not provided in workflow - the
`status`
property is not provided in workflow - the
`productCatalogueRef`
property is not provided in workflow - This rule throws a general RubixException with code 400 when it can not find the corresponding variant product or standard product.
Configuration example
1{
2 "name": "{{accountId}}.globalinventory.ForwardIfProductStatusEquals",
3 "props": {
4 "status": "INACTIVE",
5 "eventName": "DeactivateInventoryPosition",
6 "productCatalogueRef": "DEFAULT:1"
7 }
8}
Detailed Technical Description
When the ForwardIfProductStatusEquals retrieves the product status, firstly, it retrieves the variant product based on the product ref. If it gets a variant product, it will return and compare its status. Otherwise, then it will use the same product ref to retrieve standard product and return its status.
Version History
v2.0.0
refers to