Fluent Commerce Logo
Docs

ValidateIncomingCategory

Rule

Changed on:

12 Aug 2025

Overview

Validates the incoming category event
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

Validates the incoming category event

Accepts

  • PRODUCT_CATALOGUE

Actions

  • This rule does not produce any output actions. It reads all the incoming event attributes to confirm that they can be converted to the expected format.

Rule parameters

There are no Input Parameters for this rule.

Event attributes

ParameterDescriptionData TypeRequired?
refThe unique reference of the categoryStringRequired
typeThe type of the categoryStringOptional
nameThe name of the categoryStringOptional
summaryThe summary of this categoryStringOptional
parentCategoryThe parent category ref if this category has a parent categoryStringOptional
childCategoriesA list of child category references if this product has child categories[String]Optional
attributesAdditional attributes of this category[Attribute]Optional

Exceptions

  • If the event attributes are not conformed to the Category object outlined above an IllegalArgumentException will be thrown.
  • If event attribute {ref} is missing or empty, EventAttributeNotFoundException will be thrown.

Configuration example

1{
2  "name": "{{ACCOUNTID}}.globalinventory.ValidateIncomingCategory"
3}

Detailed Technical Description

All the event attributes of the incoming event must conform to the following JSON structure and are parsed/deserialized into a "Category" object which has the following structure.A sample event attributes payload with example values:
1{
2  "ref": "INFT_1",
3  "type": "STANDARD",
4  "attributes": [],
5  "name": "Infants Toys",
6  "summary": "summary",
7  "parentCategory": "parent_category",
8  "childCategories": [
9    "child_category_1",
10    "child_category_2"
11  ]
12}
The below snippet shows the corresponding Java class definition of the incoming event's event attributes
1public class Category {
2
3     @NonNull
4     private String ref;
5
6     private String type;
7
8     private List<Attribute> attributes;
9
10     private String name;
11
12     private String summary;
13
14     private String parentCategory;
15
16     private List<String> childCategories;
17}

The only thing this rule checks is if the event attributes could be deserialized to the Category object properly. It validates the attributes and throws the exceptions detailed in the Exceptions section. Otherwise, the rule does not have any output actions.

Version History

2023-08-02

v2.0.0

refers to plugin