ForwardIfProductStatusEquals
Changed on:
29 Nov 2023
Overview
Send an event {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 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
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 event to be triggered |
status | Expected location status |
productCatalogueRef | The product catalogue ref of the product |
Event attributes
Not Applicable for this rule.
Exceptions
- This rule throws a PropertyNotFoundException when:
- the property is not provided in workflow
`eventName`
- the property is not provided in workflow
`status`
- the property is not provided in workflow
`productCatalogueRef`
- 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}
Language: json
Detailed Technical Description
When the ForwardIfProductStatusEquals rule 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 plugin