Developer Docs

Web SDK Reference | Create order from configuration

The createOrderFromConfiguration() method creates an order based on a previously saved configuration.

This is typically used after calling saveConfiguration() to persist a configuration and then convert it into an order.


Parameters

Name

Type

Required

Description

configurationUuid

string

yes

UUID of the saved configuration to create an order from


Returns

Promise<{ orderId: string }> – Resolves with the created order ID.


Example

try {
  const configuration = await window.twikit.saveConfiguration();

  const order = await window.twikit.createOrderFromConfiguration(
    configuration.uuid
  );

  console.log('Order created:', order.orderId);
} catch (error) {
  console.error('Order creation failed:', error);
}

Notes

  • The configuration must exist and be accessible within the organization.

  • The method will throw an error if the API request fails.

  • This method does not validate configuration completeness; ensure required parameters are set before calling.