Changed on:
28 Nov 2023
Validates the incoming category event for the existence of the parent and child categories
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:
Validates the incoming category event for the existence of the parent and child categories
There are no Input Parameters for this rule.
Parameter | Description | Data Type | Required? |
childCategories | A list of child categories of the category being created/updated. Each child category is a string and the value of this field is a list of strings | [String] | Optional |
parentCategory | The category reference if the current category being created/updated has a parent category | String | Optional |
1{
2 "name": "{{accountId}}.globalinventory.ValidateCategoriesExist"
3}
Language: json
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}
Language: java
Name: Category Java Class Definition
Description:
[Warning: empty required content area]This rule parses/deserialises all the event attributes into a Category object outlined above. If child categories are present in the event attributes, it will perform a validation on them. The rule will throw an exception with all the missing categories if the provided child category/categories do not exist. Likewise, the rule performs the same validation on the parent category if such value is present in the event attributes and throws an exception if the parent category does not exist. Otherwise, the rule does not have any output/output action. Note that a parent category ref with an empty string or series of empty spaces is considered a valid parent category.
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.