Setting up Wonderment's Webhooks
Webhooks are a popular way to access event data as it happens. You can use Wonderment's webhooks to send tracking data to your other tools, such as Zapier, Slack or your Data Warehouse.
See our end-to-end example with Zapier here.
Setting Up Wonderment Webhooks
Create a Webhook
Webhooks can be registered in the Admin, by going to Integrations > Webhooks and clicking "Create a Webhook"
Give your webhook a name and enter the URL where Wonderment should send the data.
Wonderment sends data for many types of shipping related events. You can learn more about them here. By default, all events will be sent to your URL, but you can also choose to limit sending to only specific events.
Test Your Webhook
Confirm you have the correct URL, and test your server response by using the "Send Test" button. This will send a test event to the webhook URL. The response status should be 200, other codes such as 404, 403, and others, indicate an error sending data to the webhook endpoint.
Wonderment expects the webhook destination to return an HTTP 200 status code to confirm receipt. If your destination returns a non-200 response, Wonderment will try to deliver the webhook again.
Webhooks can be reactivated in Wonderment Settings when your destination is operating again.
Webhooks are delivered with a header of
X-Wonderment-Token to validate that the source of the webhook is legitimate. The token is found on the main integration page.
Monitor Your Webhooks
The list of webhooks on your account will also let you know the most recent HTTP response status for that webhook.
All Wonderment Webhooks come with the same data attached as our Klaviyo and Postscript integrations. As a summary of the fields:
The tracking number's current status
The Wonderment security token
The Tracking Number
The Carrier Tracking URL
Shopify Order Number
Shopify Order ID
Carrier Name (such as USPS, UPS, DHL, FedEx)
The Carrier’s Package ETA
The Carrier’s Service Level (encoded)
A title-cased version of the service level name
The two-character country code for the destination country
The business days since fulfilled
The total hours the package has been stalled over its journey
The last update time from the carrier
Line Item Data
Shopify order ID
how many items were purchased in this order
list price of the item
dollar amount discount
true or false
name of the product
primary image of the product
description of the product image
product variant ID
the name of the product variant
the URL of the variant product image
how much the item weighs
such as grams, pounds, etc