Skip to main content

ordersAssignTemplate

Assigns a template to an existing order. This mutation applies predefined enrichment data from a template to streamline order processing with consistent enriched information.

Templates contain preset values for shipping details, packaging requirements, billing information, and routing instructions that are commonly used for specific customers or order types.

Required Permission

  • orders:assign_template

Order Status Requirements

Templates can only be assigned to orders with the following statuses:

  • ordered
  • pending
  • allocated

Processing

This mutation executes asynchronously and returns a processing status. The template assignment happens in the background to avoid blocking the API response.

Possible Errors

  • **B2BTemplateError**: When order or template validation fails, or operation is not allowed
  • **AuthorizationError**: When user lacks required permissions
  • **RecordNotFoundError**: When the specified order or template does not exist
ordersAssignTemplate(
input: AssignOrderTemplateInput!
): AsynchronousActionResponse!

Arguments

ordersAssignTemplate.input ● AssignOrderTemplateInput! non-null input

Parameters for AssignOrderTemplate

Type

AsynchronousActionResponse object

Asynchronous action response type