Fluent Commerce Logo
Docs
Sign In

ValidateProductCategoriesExist

Rule

Changed on:

18 Dec 2023

Overview

Validates the incoming product event to confirm the given categories already exist

Plugin NameInventory Reference Module
Namespace{{accountId}}.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 Modules includes the following areas:

  • Inventory Catalogue workflow
  • Virtual Catalogue workflow
  • Control Group workflow
  • Product Catalogue workflow

UI Description

Validates the incoming product event to confirm the given categories already exist

Accepts

  • PRODUCT_CATALOGUE

Actions

  • This rule does not produce any action. It validates the incoming event categories exist in the product catalogue. Otherwise, an IllegalArgumentException will be thrown for the non-existent categories.

Rule parameters

This rule has no Input Parameters.

Event attributes

Parameter

Description

Data Type

Required?

categoryRefs

A list of categories this product belongs to

[String]

Optional

Exceptions

If any of the specified categories don't exist, an IllegalArgumentException will be thrown.

Configuration example

1{
2  "name": "FLUENTRETAIL.globalinventory.ValidateProductCategoriesExist"
3}

Language: json

Detailed Technical Description

This rule parses/deserializes all the event attributes into a Product object. If there is at least one 

`category ref`
 provided in the incoming event attributes, it checks if that category / categories exist in the product catalogue using the 
`{entityRef}`
 field of the incoming event as the product catalogue ref. An IllegalArgumentException will be thrown if at least one or more categories do not exist in the product catalogue. Otherwise, the rule does not have any output/output action.

Version History

2023-08-03

v2.0.0

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.

Fluent Logo