Mutations and types for managing Approval Rules in the platform.
Mutations
Create Approval Rule
| Arguments | |
|---|---|
draft | |
asAssociate | Create/modify entity as an associate in business-unit. |
Update Approval Rule
| Arguments | |
|---|---|
versionLong | |
actionsArray of ApprovalRuleUpdateAction | |
asAssociate | Create/modify entity as an associate in business-unit. |
idString | Queries with specified ID |
keyString | Queries with specified key |
Output types
ApprovalRule
keyString | User-defined unique identifier of the Approval Rule. Must be unique within a Business Unit. |
nameString | Name of the Approval Rule. |
descriptionString | Description of the Approval Rule. |
status | Indicates whether the Approval Rule should be matched against Orders or not. Can be Active, or Inactive |
predicateString | The Order Predicate describing the Orders the Approval Rule should match against. |
approvers | The hierarchy of approvers within the Approval Rule. |
requestersArray 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. |
idString | Unique identifier of the Approval Rule. |
versionLong | 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
ActiveInactive
ApproverHierarchy
tiersArray of ApproverConjunction | All of the nested conjunctions must be approved in order for the hierarchy to be considered approved. |
ApproverConjunction
andArray of ApproverDisjunction | All of the nested disjunctions must be approved in order for the conjunction to be considered approved. |
ApproverDisjunction
orArray 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
offsetInt | |
countInt | |
totalLong | |
existsBoolean | |
resultsArray of ApprovalRule |
Input types
ApprovalRuleDraft
keyString | User-defined unique identifier of the Approval Rule. Uniqueness is enforced within the Business Unit. |
nameString | Name of the Approval Rule. |
descriptionString | Description of the Approval Rule. |
status | Indicates whether the Approval Rule should be matched against Orders or not. Can be Active, or Inactive |
predicateString | |
approvers | The hierarchy of approvers within the Approval Rule. |
requestersArray of RuleRequesterDraft | The Associate Roles customers must hold for their Order to require approval. |
ApprovalRuleStatus
ActiveInactive
ApproverHierarchyDraft
tiersArray of ApproverConjunctionDraft | Nested conjunctions representing tiers of approvers in a hierarchy. |
ApproverConjunctionDraft
andArray of ApproverDisjunctionDraft | All of the nested disjunctions must be approved in order for the conjunction to be considered approved. |
ApproverDisjunctionDraft
orArray 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
keyString | Value to set. Must be unique within a Business Unit. If omitted, any existing value is removed. |
Set Name
nameString | New name to set for the Approval Rule. |
Set Description
descriptionString | New description to set for the Approval Rule. |
Set Status
status | New status to set for the Approval Rule. Can beActive, or Inactive |
ApprovalRuleStatus
ActiveInactive
Conditions
Set Predicate
predicateString | A valid Order Predicate to set for the Approval Rule. |
Set Requesters
requestersArray 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
approvers | New approvers to set for the Approval Rule. |
ApproverHierarchyDraft
tiersArray of ApproverConjunctionDraft | Nested conjunctions representing tiers of approvers in a hierarchy. |
ApproverConjunctionDraft
andArray of ApproverDisjunctionDraft | All of the nested disjunctions must be approved in order for the conjunction to be considered approved. |
ApproverDisjunctionDraft
orArray 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
fieldsArray of CustomFieldInput | |
type | |
typeKeyString | |
typeIdString |
Set Custom Field
nameString | Name of the Custom Field. |
valueString | 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. |