Mutations and types for managing Approval Rules in the platform.

Mutations

Create Approval Rule

MUTATIONcreateApprovalRule
Arguments
draft​
asAssociate​

Create/modify entity as an associate in business-unit.

Update Approval Rule

MUTATIONupdateApprovalRule
Arguments
version​
Long​
actions​
asAssociate​

Create/modify entity as an associate in business-unit.

id​
String​

Queries with specified ID

key​
String​

Queries with specified key

Output types

ApprovalRule

key​
String​
User-defined unique identifier of the Approval Rule. Must be unique within a Business Unit.
name​
String​

Name of the Approval Rule.

description​
String​

Description of the Approval Rule.

status​
Indicates whether the Approval Rule should be matched against Orders or not.
Can be Active, or Inactive​
predicate​
String​
The Order Predicate describing the Orders the Approval Rule should match against.
approvers​

The hierarchy of approvers within the Approval Rule.

requesters​
Array of RuleRequester​
The Associate Roles customers must hold for their Order to require approval.
businessUnitRef​
The Business Unit the Approval Rule belongs to.
businessUnit​
The Business Unit the Approval Rule belongs to.
custom​

Custom Fields on the Approval Rule.

id​
String​

Unique identifier of the Approval Rule.

version​
Long​

Current version of the Approval Rule.

createdAt​

Date and time (UTC) the Approval Rule was initially created.

lastModifiedAt​

Date and time (UTC) the Approval Rule was last updated.

createdBy​

IDs and references that created the ApprovalRule.

lastModifiedBy​

IDs and references that last modified the ApprovalRule.

ApprovalRuleStatus

Active
Inactive

ApproverHierarchy

Describes the order in which Associates can approve the matched Order.
tiers​

All of the nested conjunctions must be approved in order for the hierarchy to be considered approved.

ApproverConjunction

and​

All of the nested disjunctions must be approved in order for the conjunction to be considered approved.

ApproverDisjunction

or​
Array of RuleApprover​

Any of the nested approvers must approve in order for the disjunction to be considered approved.

RuleApprover

associateRole​

The Associate Role that is allowed to approve at a given stage in the approval process.

associateRoleRef​

The Associate Role that is allowed to approve at a given stage in the approval process.

RuleRequester

associateRole​
The Associate Role that an Associate must hold for the Approval Rule to apply to the Orders they create.
associateRoleRef​
The Associate Role that an Associate must hold for the Approval Rule to apply to the Orders they create.

ApprovalRuleQueryResult

offset​
Int​
count​
Int​
total​
Long​
exists​
Boolean​
results​
Array of ApprovalRule​

Input types

ApprovalRuleDraft

key​
String​

User-defined unique identifier of the Approval Rule. Uniqueness is enforced within the Business Unit.

name​
String​

Name of the Approval Rule.

description​
String​

Description of the Approval Rule.

status​
Indicates whether the Approval Rule should be matched against Orders or not.
Can be Active, or Inactive​
predicate​
String​
The predicate describing the Orders the Approval Rule should match against.
approvers​

The hierarchy of approvers within the Approval Rule.

requesters​
Array of RuleRequesterDraft​
The Associate Roles customers must hold for their Order to require approval.

ApprovalRuleStatus

Active
Inactive

ApproverHierarchyDraft

Describes the sequence in which Associates can approve an Order.
tiers​

Nested conjunctions representing tiers of approvers in a hierarchy.

ApproverConjunctionDraft

and​

All of the nested disjunctions must be approved in order for the conjunction to be considered approved.

ApproverDisjunctionDraft

or​
Array of RuleApproverDraft​

Any of the nested approvers must approve in order for the disjunction to be considered approved.

RuleApproverDraft

associateRole​

Any Associate with this Role can approve.

RuleRequesterDraft

associateRole​
The Associate Role that an Associate must hold for the Approval Rule to apply to the Orders they create.

ApprovalRuleUpdateAction

setCustomField​
setCustomType​
setKey​
setName​
setDescription​
setPredicate​
setRequesters​
setStatus​
setApprovers​

Update actions

Definition

Set Key

Setting the key for an Approval Rule generates an ApprovalRuleKeySet Message.
key​
String​

Value to set. Must be unique within a Business Unit. If omitted, any existing value is removed.

Set Name

Setting the name for an Approval Rule generates an ApprovalRuleNameSet Message.
name​
String​

New name to set for the Approval Rule.

Set Description

Setting the description for an Approval Rule generates an ApprovalRuleDescriptionSet Message.
description​
String​

New description to set for the Approval Rule.

Set Status

Setting the status for an Approval Rule generates an ApprovalRuleStatusSet Message.
status​

New status to set for the Approval Rule.

Can be Active, or Inactive​

ApprovalRuleStatus

Active
Inactive

Conditions

Set Predicate

Setting the Order Predicate for an Approval Rule generates an ApprovalRulePredicateSet Message.
predicate​
String​
A valid Order Predicate to set for the Approval Rule.

Set Requesters

Sets the requesters for an Approval Rule generates an ApprovalRuleRequestersSet Message.
requesters​
Array of RuleRequesterDraft​

New requesters to set for the Approval Rule.

RuleRequesterDraft

associateRole​
The Associate Role that an Associate must hold for the Approval Rule to apply to the Orders they create.

Set Approvers

Setting the approvers for an Approval Rule generates an ApprovalRuleApproversSet Message.
approvers​

New approvers to set for the Approval Rule.

ApproverHierarchyDraft

Describes the sequence in which Associates can approve an Order.
tiers​

Nested conjunctions representing tiers of approvers in a hierarchy.

ApproverConjunctionDraft

and​

All of the nested disjunctions must be approved in order for the conjunction to be considered approved.

ApproverDisjunctionDraft

or​
Array of RuleApproverDraft​

Any of the nested approvers must approve in order for the disjunction to be considered approved.

RuleApproverDraft

associateRole​

Any Associate with this Role can approve.

Custom Fields

Set Custom Type

fields​
Array of CustomFieldInput​
typeKey​
String​
typeId​
String​

Set Custom Field

name​
String​
Name of the Custom Field.
value​
String​
If value is absent or null, this field will be removed if it exists. Removing a field that does not exist returns an InvalidOperation error. If value is provided, it is set for the field defined by name.