Mutations and types for managing Approval Flows in the platform.
Mutations
Update Approval Flow
| Arguments | |
|---|---|
versionLong | |
actionsArray of ApprovalFlowUpdateAction | |
asAssociate | Create/modify entity as an associate in business-unit. |
idString | |
Output types
ApprovalFlow
statusString | Indicates whether the Approval Flow is under review, approved, or rejected. |
approvalsArray of ApprovalFlowApproval | Existing approvals in the Approval Flow. |
rejection | Present when the status of the Approval Flow is Rejected. |
orderRef | Order that needs to be approved. |
order | Order that needs to be approved. |
rulesArray of ApprovalRule | Approval Rules that matched the Order. |
businessUnitRef | Business Unit the Approval Flow belongs to. |
businessUnit | Business Unit the Approval Flow belongs to. |
eligibleApproversArray of RuleApprover | Associate Roles that can approve according to the approver hierarchy tiers defined in rules.
Associates are allowed to reject even after they have given approval, as long as the current approver hierarchy tier still contains their role. |
pendingApproversArray of RuleApprover | Associate Roles required for approval based on the approver hierarchy tiers defined in rules across all remaining tiers. |
currentTierPendingApproversArray of RuleApprover | Associate Roles required for approval based on the approver hierarchy tiers defined in rules only for the currently active tier(s). |
custom | Custom Fields on the Approval Flow. |
idString | Unique identifier of the Approval Flow. |
versionLong | Current version of the Approval Flow. |
createdAt | Date and time (UTC) the Approval Flow was initially created. |
lastModifiedAt | Date and time (UTC) the Approval Flow was last updated. |
createdBy | IDs and references that created the ApprovalFlow. |
lastModifiedBy | IDs and references that last modified the ApprovalFlow. |
ApprovalFlowApproval
approver | Associate who approved the Approval Flow. |
approvedAt | Date and time (UTC) the Approval Flow was approved. |
Associate
associateRoleAssignmentsArray of AssociateRoleAssignment | Roles assigned to the Associate within a Business Unit. |
customerRef | The Customer that acts as an Associate in the Business Unit. |
customer | The Customer that acts as an Associate in the Business Unit. |
AssociateRoleAssignment
associateRoleRef | Role the Associate holds within a Business Unit. |
associateRole | Role the Associate holds within a Business Unit. |
inheritance | Determines whether the AssociateRoleAssignment can be inherited by child Business Units. Can beDisabled, or Enabled |
AssociateInheritanceMode
DisabledEnabled
ApprovalFlowRejection
rejecter | Associate who rejected the Approval Flow. |
rejectedAt | Date and time (UTC) the Approval Flow was rejected. |
reasonString | The reason for the rejection of the Approval Flow. |
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. |
ApprovalFlowQueryResult
offsetInt | |
countInt | |
totalLong | |
existsBoolean | |
resultsArray of ApprovalFlow |
Input types
ApprovalFlowUpdateAction
reject | |
setCustomField | |
setCustomType | |
approve |
Update actions
Decisions
Approve
dummyString |
Reject
Rejected.
The process takes into account all Associate Roles held by the Associate, aligning with the matched Approval Rules and their respective approver hierarchies.
Even a single rejection in the process will result in the rejection of the entire Approval Flow.An Associate is eligible to reject only if their roles are within tiers of the Approval Rule hierarchy that are yet to be rejected. An Associate may alter a prior approval into a rejection.
reasonString | The reason for the rejection of the Approval Flow. |
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. |