Order Updated (orders.updated)¶
Description¶
This event occurs when an existing order is updated in the system. This could include changes to the order status, modifications to order details, or updates made by an admin.
Trigger Conditions¶
This webhook is triggered whenever an existing order is updated in the system.
Purpose¶
Notifies external systems about updates to orders, ensuring consistency across platforms.
Use Case¶
- Synchronize updated order data across inventory or logistics systems.
- Trigger workflows in external systems based on order status changes or metadata adjustments.
- Update user-facing dashboards or notifications to reflect the latest order state.
Example Payload¶
{
"event": "orders.updated",
"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": "On Hold",
"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 updated 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.updated webhook provides vital information about changes made to existing orders 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.