ValidateIncomingProduct
RuleRules are designed to be building blocks for workflow logic.
Changed on:
12 Aug 2025
Overview
Validates the incoming product payload| Plugin Name | Inventory Reference Module |
|---|---|
| Namespace | [[account.id]].globalinventory |
- Product Catalogue workflow
- Inventory Catalogue workflow
- Control Group workflow
- Virtual Catalogue workflow
UI Description
Validates the incoming product payload
Accepts
- PRODUCT_CATALOGUE
Actions
- This rule only validates {ref}, and {type} event attributes and does not produce any action.
Rule parameters
This rule has no Input Parameters.
Event attributes
Main Event Attributes
Price sub-attribute
Tax type sub-attribute
Attribute type sub-attribute
| Parameter | Description | Data Type | Required? |
| ref | The ref of the product | String | Required |
| type | The type of the product | String | Required |
| name | The name of the product | String | Optional |
| gtin | The gtin of the product | String | Optional |
| standardProductRef | The ref of the parent Standard Product | String | Optional |
| categoryRefs | A list of string category references | [String] | Optional |
| summary | A brief summary of the product | String | Optional |
| prices | A list of prices. See the below table for its attributes | [Price] | Optional |
| taxType | Tax type of this product. See the below table for its attributes | Tax | Optional |
| attributes | Extra attributes that may be used as part of this product. See the table below for the definition | [Attribute] | Optional |
| Parameter | Description | Data Type | Required? |
| type | The type of the price | String | Required |
| currency | The currency of the price | String | Required E.g. EUR, AUD |
| value | The value of the price | Floating Point | Required |
| Parameter | Description | Data Type | Required? |
| country | The country of this tax type | String | Required |
| group | The tax group | String | Required |
| tariff | The tariff of this tax type | String | Required |
| Parameter | Description | Data Type | Required? |
| name | The name of the attribute | String | Required |
| type | The type of the attribute | String | Required E.g. STRING, INTEGER, BOOLEAN, OBJECT |
| value | The value of the attribute | JSON or scalar | Required |
Exceptions
- If rootEntityRef is not found in the event, an IllegalArgumentException will be thrown.
- If attributes in the event can not be converted into a non-null Product object, an IllegalArgumentException will be thrown.
Configuration example
1{
2 "name": "{{accountId}}.globalinventory.ValidateIncomingProduct"
3}Detailed Technical Description
All the event attributes of the incoming event are parsed/deserialized into a "Product" object which has the following structureAn example JSON payload that represents the event attributes of an incoming event
There are no rule parameters required from the workflow. The rule validates the type and ref fields and throws an exception if any one of them is not provided. Event attributes are converted to an attribute map and then into a Product DTO. If the data passes the validation for conversion, the rule returns and no action is produced
There are no rule parameters required from the workflow. The rule validates the type and ref fields and throws an exception if any one of them is not provided. Event attributes are converted to an attribute map and then into a Product DTO. If the data passes the validation for conversion, the rule returns and no action is produced