Setting up Wonderment's Webhooks
You can use Wonderment’s webhook integration to send data to any other platforms that might consume it - such as Zapier, Slack, or other apps.
Setting Up Wonderment Webhooks
Webhooks are a popular way to access event data as it happens. Webhook support is available on all Wonderment paid plans and free trials. As of the time of publishing, to use Zapier, a Zapier Premium account is required as well. Other services may have their own requirements for webhook support.
Wonderment expects the webhook destination to return a 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 a non-200 response 20 times in a row for a webhook, your webhook will be deactivated temporarily until the issue is resolved. Webhooks can be reactivated in Wonderment Settings when your destination is operating again.
Example: Setting Up Webhooks With Zapier
The first step when setting up webhook support is to create your destination address for the data. Using a webhook involves supplying Where’s My Order with the URL to send data to. Open a window to Wonderment’s Settings screen, and the webhook screen of your app.
In our example, we’ll use Zapier’s Webhooks by Zapier trigger to receive data about a stalled shipment, parse it for a verification key, and then send it to a Google Spreadsheet.
First, create a new Zap and pick “Webhook” as the Zap trigger. When you need to select a Trigger Event, pick “Catch Hook”.
Click Continue, and Zapier will give you the URL to post to for your webhooks. Copy this URL using the button provided. You don’t need to configure anything else on this step.
Return to Wonderment’s settings screen. Pick the event type that you’re interested in, and paste in the URL. Click “Add Webhook”
The webhook will be listed in the space below. Click “Send Test Request” to send an example request on to the destination platform, to ensure that everything is entered properly. Note - If you’d like to receive data at this webhook address for multiple shipping events, repeat this step for each event you are interested in. You can use the same URL for each event.
Each webhook request comes with a security token attached to it as a data field. This can be used to validate that a request was sent from Wonderment to your webhook URL, and not from another source (potentially spam, bot, or whatever etc.) You’re not required to use it, but it can be useful if you’re concerned about data validation.
Return to Zapier and click “Test Trigger”. If you sent a test request from Wonderment, it should appear here immediately!
Here’s a successful test in Zapier:
If you’d like to use the secret to filter out any potentially incorrect data, add a Filter Action step below, like this one:
Click “Continue” and you can validate that the secret key is the same in your request and your filter. You should see the green status message here. If you don’t, check and make sure you have the same key in the Filter step as shown in your Settings screen. The key is the same for all your webhooks. It is unique per store.
Finally, add whatever action steps you’d like to use with this data. For example, you can populate a spreadsheet with data about stalled shipments:
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