Skip to main content

incentiveRuleSave

Replace all rows of an incentive rule in one write, from semantic rows.

Each row gives its conditions by field, the order-item condition, the incentive action, its name and its parameters. The server builds the table: the fixed incentive columns, one input column per condition field, the cells derived from the order-item condition and the order.items path. Condition columns no row uses are removed. All or nothing: when validation fails or the write fails, nothing is stored and the rule stays as it was.

Possible errors:

  • BAD_REQUEST: A row is invalid (an order-item condition that is not complex expressions, two conditions on one field, a condition on order.items, a duplicate row id, an invalid expression)
  • BUSINESS_RULE_NOT_FOUND: Incentive rule with the specified ID does not exist
  • BUSINESS_RULE_TYPE_NOT_SUPPORTED_ERROR: The business rule is not an incentive rule
  • BUSINESS_RULE_DECISION_TABLE_UPDATE_ERROR: Failed to store the incentive rule's table
  • FORBIDDEN: Insufficient permissions to modify incentive rules

AUTH: Role=[configuration.OWNER,configuration.EDITOR]

incentiveRuleSave(
input: IncentiveRuleSaveInput!
): BusinessRule!

Arguments​

incentiveRuleSave.input ● IncentiveRuleSaveInput! non-null input​

The incentive rule, an optional hitPolicy and the complete list of rows

Type​

BusinessRule object​

Complete business rule workflow represented as a directed graph structure.

Each business rule consists of interconnected nodes (input, decision tables, output) connected by edges that define the execution flow. Decision tables contain multiple rows where each row represents a specific rule condition and corresponding action. The graph structure enables complex business logic modeling with branching, parallel processing, and conditional execution paths.