Fluent Commerce Logo
Docs
Sign In

UpdateCategory

Rule

Changed on:

13 Nov 2023

Overview

Update a category based on the information provided in the event

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

Update a category based on the information provided in the event

Accepts

  • CATEGORY

Actions

  • This rule produces a MutationAction that will update an existing category.

Rule parameters

This rule has no Input Parameters.

Event attributes

Main Event Attributes

Parameter

Description

Data Type

Required?

ref

The ref of the category

String

Required

type

The type of the category

String

Required

name

The name of the category

String

Required

parentCategory

The ref of the parent category

String

Optional

childCategories

A list of child category references

[String]

Optional

summary

A brief summary of the category

String

Optional

attribute

Extra attributes that may be used as part of this category. See the table below for the definition

[Attribute]

Optional

Attribute type sub-attribute

Parameter

Description

Data Type

Required?

name

The ref of the category

String

Required

type

The type of the category

String

Required E.g STRING, INTEGER, BOOLEAN, OBJECT

value

The name of the category

String

Required


Exceptions

EventAttributeNotFoundException is thrown when event attribute 

`{ref}`
 is missing

Configuration example

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

Language: json

Detailed Technical Description

All the event attributes of the incoming event are parsed/deserialized into a "Category" object which has the following structure:

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}

Language: java

Name: Category Java Class Definition

Description:

[Warning: empty required content area]

An example JSON payload that represents the event attributes of an incoming event:

1{
2  "ref": "INFT_1",
3  "type": "DEFAULT",
4  "attributes": [],
5  "name": "Infants Toys",
6  "summary": "summary",
7  "parentCategory": "parent_category_ref"
8}

Language: java

Name: Category JSON

Description:

[Warning: empty required content area]

Version History

2023-08-03

v2.0.0

refers to the 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