Skip to content

OrderApprovalModule

Module in @evolve-framework/commercetools

B2B order approval on commercetools: approving or rejecting an order that needs it, and reading, creating, changing and turning off the approval rules of a business unit.

Constructed without options it serves the schema only, for a shop without approvals whose storefront still selects them: Order.approval is null, writing a rule is refused, and nothing is checked at startup.

import { OrderApprovalModule } from "@evolve-framework/commercetools";

Serves the Order approval part of the GraphQL API: orderApprovalRuleCreate, orderApprovalRuleDelete, orderApprovalRuleStatusUpdate, orderApprovalRuleUpdate, orderApprovalStatusUpdate.

new OrderApprovalModule(options?: OrderApprovalModuleOptions)
OptionTypeDescription
clientFactoryClientFactory

The commercetools client its requests to the project go through, built with ClientFactory.create.

customTypesApprovalRuleCustomTypes

Keys of the project's custom types for an approval rule, which stores the condition a rule was built from, and for an order, whose fields a custom-field clause names. Required: the framework has no key of its own.

Extends AbstractModule<CommercetoolsLoaderContext>.

The same module on medusa and sfcc.