Skip to content

Order Created (orders.created)

Description

This event triggers when a new order is created in the system. This webhook ensures that all relevant systems receive real-time updates whenever a new order is created.

Trigger Conditions

This webhook is triggered when a new order is created in the system.

Purpose

Provides an opportunity for external systems to take action when a new order is created, ensuring proper tracking and notification mechanisms.

Use Case

  • External systems can update inventory records to reflect the new order.
  • Order tracking systems can be synchronized to monitor the new order.
  • Third-party tools, such as logistics providers or customer management platforms, can be notified about the new order.

Example Payload

{
  "event": "orders.created",
  "data": {
    "id": "89",
    "orgId": "2",
    "templateUrl": "https://api.openletterconnect.com/api/v1/download/s3/openletterconnect/org-1/user-2/orders/upload/html/html/1702390862727-index.json",
    "backTemplateUrl": "https://api.openletterconnect.com/api/v1/download/s3/openletterconnect/org-1/user-2/orders/upload/html/html/1702390862727-index.json",
    "status": "Scheduled",
    "metaData": {
      "account_id": "123-1234-12342355-12323534634"
    },
    "isLiveMode": false,
    "createdAt": "2024-01-10T15:06:29.204Z",
    "updatedAt": "2024-01-10T15:06:29.204Z"
  },
  "token": "YOUR_WEBHOOK_SECRET_KEY"
}

Parameters:

  • event (String): The type of event that triggered the webhook.
  • data (Object): Contains information about the created order.

    • id (String): Unique identifier for the order.
    • orgId (String): Identifier for the organization associated with the order.
    • templateUrl (String): URL for the order’s template.
    • backTemplateUrl (String): URL for the back template of the order.
    • status (String): Current status of the order (e.g., "On Hold", "Processing").
    • metaData (Object): Additional details about the order.
    • isLiveMode (Boolean): Indicates whether the order was created in live mode.
    • createdAt (Timestamp): Date and time when the order was created.
    • updatedAt (Timestamp): Date and time when the order was last updated.
  • token (String): Your secret webhook token.

Conclusion

The orders.created webhook provides vital information about new orders being created within Open Letter Connect, allowing external systems to respond effectively. By following best practices regarding security, error handling, and testing, you can ensure a smooth integration experience.