Skip to main content

ordersCreateTemplate

Creates a new order template with predefined B2B data. Templates allow you to store reusable configurations for shipping details, packaging requirements, billing information, and routing instructions that can be applied to multiple orders.

This is useful for standardizing order processing for specific customers, order types, or fulfillment scenarios where the same B2B data is frequently used.

Required Permission​

  • orders:create_special_template

Template Data​

The template_data field accepts a JSON object containing any B2B fields that should be applied when the template is assigned to an order. This can include shipping addresses, carrier preferences, labeling requirements, and custom instructions.

Template Status​

Templates can be created with active (default) or inactive status. Only active templates can be assigned to orders.

Code Generation​

If no code is provided, a unique code will be automatically generated based on the template name.

Possible Errors​

  • **B2BTemplateError**: When template validation fails or business rules are violated
  • **AuthorizationError**: When user lacks required permissions
ordersCreateTemplate(
input: CreateOrderTemplateInput!
): OrderTemplate

Arguments​

ordersCreateTemplate.input ● CreateOrderTemplateInput! non-null input common​

Parameters for CreateOrderTemplate

Type​

OrderTemplate object orders​

Template for special orders that defines standard parameters