orderApprovalRuleCreate
Create an order approval rule for a business unit. Invalid input is answered with a ValidationError whose field paths name the input, such as approverTiers.0.allOf.1.anyOf or condition.clauses.2.orderTotal.amount.
Arguments
| Argument | Type | Description |
|---|---|---|
businessUnitId | ID! | |
input | OrderApprovalRuleCreateInput! |
Returns
| Field | Type | Description |
|---|---|---|
orderApprovalRule | OrderApprovalRule | The created or updated rule |
orderApprovalRuleErrors | [OrderApprovalRuleError!] | Error details if the operation failed |
Example
mutation OrderApprovalRuleCreate( $businessUnitId: ID! $input: OrderApprovalRuleCreateInput!) { orderApprovalRuleCreate(businessUnitId: $businessUnitId, input: $input) { orderApprovalRule { id version key name description status conditionEditable predicate requesterRoleKeys } orderApprovalRuleErrors { __typename ... on ValidationError { message } } }}{ "businessUnitId": "id-1", "input": { "name": "Example", "requesterRoleKeys": [ "id-1" ], "approverTiers": [ { "allOf": [ { "anyOf": [ "id-1" ] } ] } ] }}{ "data": { "orderApprovalRuleCreate": { "orderApprovalRule": { "id": "id-1", "version": "Example", "key": "Example", "name": "Example", "description": "Example", "status": "ACTIVE", "conditionEditable": true, "predicate": "Example", "requesterRoleKeys": [ "Example" ] }, "orderApprovalRuleErrors": [ { "__typename": "ValidationError", "message": "Example" } ] } }}The query selects the return type's fields two levels deep; pick the ones you need. The response shows its shape with placeholder values.
Served by
| @evolve-framework/commercetools | Resolved |
| @evolve-framework/medusa | Stub: answers Not implemented |
| @evolve-framework/sfcc | Resolved |
Used by
The storefront packages that send it, in these GraphQL documents:
- @evolve-storefront/feature-organization:
OrderApprovalRuleCreate

