Skip to content

Order approval GraphQL

Served by OrderApprovalModule on commercetools, OrderApprovalModule on medusa and OrderApprovalModule on sfcc.

Each operation has its own page with its arguments, an example and the engines that serve it. The types link to their fields on the order approval types page.

Operations

OperationDescriptionServed by
orderApprovalRuleCreateMutationCreate an order approval rule for a business unit.commercetoolsmedusasfcc
orderApprovalRuleDeleteMutationDeactivate an order approval rule; a rule is never removedcommercetoolsmedusasfcc
orderApprovalRuleStatusUpdateMutationTurn an order approval rule on or offcommercetoolsmedusasfcc
orderApprovalRuleUpdateMutationChange the fields of an order approval rule that are given, and leave the rest as they are.commercetoolsmedusasfcc
orderApprovalStatusUpdateMutationApprove or reject an order approval flow.commercetoolsmedusasfcc

Types

TypeDescription
CartApprovalRequirementObjectWhat placing a cart now waits for.
MoneyInputInput objectAn amount of money in a currency's minor units, e.g.
OrderApprovalObjectAn order awaiting or having completed approval
OrderApprovalApproverObjectA person who may approve, by name, for a notice to say who an order waits for
OrderApprovalClauseUnionOne condition on an order
OrderApprovalClauseInputInput objectOne condition on an order.
OrderApprovalComparisonOperatorTypeEnumHow a clause compares a number or a value
OrderApprovalConditionObjectWhich orders a rule applies to.
OrderApprovalConditionInputInput objectWhich orders a rule applies to.
OrderApprovalCustomFieldClauseObjectAn order custom field compared with a value
OrderApprovalCustomFieldClauseInputInput objectAn order custom field compared with a value.
OrderApprovalDecisionObjectA recorded approval decision
OrderApprovalErrorUnion
OrderApprovalMatchTypeEnumWhether a condition needs every clause to hold or any one of them
OrderApprovalQuantityClauseObjectA line's quantity compared with a number.
OrderApprovalQuantityClauseInputInput objectA line's quantity compared with a number.
OrderApprovalRejectionObjectA recorded rejection decision
OrderApprovalResponseObject
OrderApprovalResultObjectPaginated approval queue with per-status counts
OrderApprovalRoleGroupObjectAny one of these roles approves for the group.
OrderApprovalRoleGroupInputInput objectAny one of these roles approves for the group.
OrderApprovalRuleObjectA B2B order approval rule
OrderApprovalRuleCreateInputInput objectInput to create an order approval rule
OrderApprovalRuleErrorUnion
OrderApprovalRuleReferenceObjectThe approval rule an order meets, by the name a buyer is shown.
OrderApprovalRuleResponseObject
OrderApprovalRuleResultObjectPaginated result containing order approval rules
OrderApprovalRuleStatusTypeEnumWhether an approval rule is currently in effect
OrderApprovalRuleUpdateInputInput objectPartial: only the fields given are changed.
OrderApprovalSetOperatorTypeEnumWhether a clause holds for values in a list or outside it
OrderApprovalShippingCountryClauseObjectWhether the order ships to one of these countries
OrderApprovalShippingCountryClauseInputInput objectWhether the order ships to one of these countries
OrderApprovalSkuClauseObjectWhether the order has a line with one of these SKUs
OrderApprovalSkuClauseInputInput objectWhether the order has a line with one of these SKUs
OrderApprovalStatusTypeEnumStatus of an order approval flow
OrderApprovalTierObjectTiers approve in order; within a tier, every group must approve.
OrderApprovalTierInputInput objectTiers approve in order; within a tier, every group must approve.
OrderApprovalTotalClauseObjectThe order total compared with an amount.
OrderApprovalTotalClauseInputInput objectThe order total compared with an amount, for orders in its currency

Fields on other types

This domain adds these fields to types that another domain defines.

BusinessUnit

FieldTypeDescription
orderApprovalsOrderApprovalResult!Approval queue for the business unit, optionally filtered by statusArguments: status, page, pageSize
orderApprovalRuleOrderApprovalRuleOne approval rule of the business unit, or null when it has none by that idArguments: id
orderApprovalRulesOrderApprovalRuleResult!Approval rules configured for the business unit, optionally by statusArguments: status, page, pageSize

Cart

FieldTypeDescription
approvalRequirementCartApprovalRequirementWhat placing the cart now waits for. Null when it needs no approval, and for a cart that is not a business unit's.

Order

FieldTypeDescription
approvalOrderApprovalApproval flow for this order, so its status can be shown wherever the order appears rather than by searching the queue and joining back. Null where the order needed no approval, and null where the caller may not see the flow -- visibility follows the caller's associate permissions, which commercetools decides.

OrderPlaceResponse

FieldTypeDescription
approvalOrderApprovalWhy an order that was just placed cannot be paid yet, when an approval flow is the reason. Read authoritatively rather than through the caller, so it is present even for someone who may not query the flow off the order itself. Absent where the order needed no approval, or where it did and has been decided.