Setting up Wonderment's Webhooks

Brian Whalley Updated by Brian Whalley

Webhooks are available on all paid plans

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.

Select Events

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.

If Wonderment encounters any non-200 response 20 times in a row for a webhook it will be deactivated temporarily until the issue is resolved.

Webhooks can be reactivated in Wonderment Settings when your destination is operating again.

Security

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.

...
X-Wonderment-Token: _YOUR TOKEN_
Content-Type: application/json
...
{
...
"token": "_YOUR TOKEN_"
...
}
Monitor Your Webhooks

The list of webhooks on your account will also let you know the most recent HTTP response status for that webhook.

Data Emitted

All Wonderment Webhooks come with the same data attached as our Klaviyo and Postscript integrations. As a summary of the fields: 

status

The tracking number's current status

token

The Wonderment security token

trackingCode

The Tracking Number

trackingURL

The Carrier Tracking URL

orderNumber

Shopify Order Number

orderID

Shopify Order ID

carrierName

Carrier Name (such as USPS, UPS, DHL, FedEx)

estimatedPackageDelivery

The Carrier’s Package ETA

serviceLevel

The Carrier’s Service Level (encoded)

serviceLevelFriendlyName

A title-cased version of the service level name

destinationCountryCode

The two-character country code for the destination country

businessDaysSinceFulfillmentCreated

The business days since fulfilled

hoursStalled

The total hours the package has been stalled over its journey

notUpdatedSince

The last update time from the carrier

Line Item Data

lineItemID

Shopify order ID

sku

product SKU

quantity

how many items were purchased in this order

price

list price of the item

discount

dollar amount discount

taxable

true or false

currencyCode

currency code

productID

product ID

productName

name of the product

productImage

primary image of the product

productImageAltText

description of the product image

variantID

product variant ID

variantName

the name of the product variant

variantImage

the URL of the variant product image

variantImageAltText

weight

how much the item weighs

weightUnit

such as grams, pounds, etc

How did we do?

Webhooks Example: Zapier

Contact