Fluent Commerce Logo
Docs

ChangeStateGQL

RuleRules are designed to be building blocks for workflow logic.

Changed on:

13 Nov 2023

Overview

Change the state of the {event.entityType} to {status} using GraphQL.
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

Change the state of the {event.entityType} to {status} using GraphQL.

Accepts

  • CATEGORY
  • PRODUCT
  • INVENTORY_POSITION
  • INVENTORY_QUANTITY
  • VIRTUAL_POSITION
  • ORDER
  • FULFILMENT
  • ARTICLE
  • CONSIGNMENT
  • FULFILMENT_OPTIONS
  • FULFILMENT_PLAN
  • WAVE
  • LOCATION
  • CONTROL

Actions

  • This rule doesn't produce any output actions.

Rule parameters

ParameterDescription
statusThe new state to apply to the entity

Event attributes

Not Applicable for this rule.

Exceptions

  • This rule throws an IllegalArgumentException when:
    • the `entityId` is empty if it's a legacy orchestrated entity
    • the `entityRef` is empty if it's a non-legacyOrchestrated entity
    • the `retailerId` is empty if it's a RETURN_ORDER/RETURN_FULFILMENT
    • the `rootEntityRef` is empty if it's a RETURN_FULFILMENT
  • This rule throws a general RubixException with code 422 when the incoming entity is not supported.

Configuration example

1{
2  "name": "FLUENTRETAIL.globalinventory.ChangeStateGQL",
3  "props": {
4    "status": "ACTIVE"
5  }
6}

Detailed Technical Description

Based on the type of the incoming entity, this rule either calls GQL or REST API to update the status of the entity to the new `{status}` given in the input parameters.

Version History