Surveying customers when their order is delivered gives you a far more accurate read on the experience than surveying when the order is placed or shipped. The customer has the product in hand, so their score reflects the whole journey: checkout, shipping speed, packaging, and the product itself.
Shopify does not offer an "order delivered" webhook. Its webhook events stop at order creation and fulfillment, which fire when you ship, not when the carrier drops the package off. Klaviyo fills that gap: it tracks a Delivered Shipment metric for Shopify stores, fired when a fulfillment's shipping status is marked as delivered. You can use that metric as a flow trigger and have the flow call Retently through a webhook.
This article is the delivery-specific version of Trigger transactional surveys based on Klaviyo Flow events. The mechanics are the same, the trigger and the order matching are what change.
Carrier limitation. Klaviyo only receives delivery events that Shopify provides, and Shopify only provides delivery notifications for certain shipping carriers. Before building the flow, open Metrics in Klaviyo and confirm that Delivered Shipment exists and is receiving recent events for your store. If it is empty, your carrier does not report delivery status and this setup will not fire.
What you need
A Retently account with permission to create campaigns and inbound webhooks
A Klaviyo account with the Shopify integration connected and the Delivered Shipment metric receiving events
Admin access to your Shopify store (to create a webhook notification)
You will end up with two connections into Retently, and both are required:
A campaign trigger webhook (Klaviyo) that sends the survey.
An import-only inbound webhook (Shopify) that feeds order data into Retently so responses can be matched to orders.
Step 1: Create the transactional campaign in Retently
Go to the Campaigns page and create a new campaign.
Pick your metric (NPS, CSAT, CES, 5-STAR) and set the channel to Email.
Set the campaign type to Transactional.
Configure the survey template, audience, reminders, alerts, and autoreplies as needed.
Open the Trigger section and select Klaviyo from the services menu.
Copy the generated webhook URL. This is the URL Klaviyo will call.
Selecting Klaviyo matters: the webhook URL only appears once a service is chosen, and the payload Retently expects depends on that choice.
Save the campaign and switch it ON. Nothing will be sent yet, because no external event is connected to it.
Consider adding a Delay or a Throttle in the Trigger section. A short delay (a day or two after delivery) gives the customer time to actually open the box, and throttling prevents repeat buyers from being surveyed on every single delivery.
Step 2: Build the Klaviyo flow with a delivery trigger
In Klaviyo, go to Flows and click Create Flow, then start from scratch.
For the trigger, choose Metric.
Search for and select Delivered Shipment.
Save the trigger.
Three related Shopify metrics exist in Klaviyo, and they are not interchangeable:
Fulfilled Order fires when you mark the order fulfilled in Shopify, which is when it ships.
Confirmed Shipment fires when the carrier scans the package into their system.
Delivered Shipment fires when the carrier reports the package as delivered. This is the one you want.
You can also add a wait step (for example, 2 days) after the trigger before the webhook action, as an alternative to the delay in the Retently campaign. Use one or the other, not both.
Step 3: Add the webhook action
From the flow builder sidebar, drag the Webhook action into the flow.
In Destination URL, paste the Klaviyo webhook URL you copied from your Retently campaign's Trigger section.
In the Body field, enter the JSON payload Retently will receive.
At minimum, the payload must contain the customer's email address and the Shopify order ID:
{
"email": "{{ person.email|default:'' }}",
"first_name": "{{ person.first_name|default:'' }}",
"last_name": "{{ person.last_name|default:'' }}",
"order_id": "{{ event.extra.order_id|default:'' }}"
}
Click View profile and event variables in the webhook action to open Klaviyo's variable preview panel, and copy the exact order ID variable from there. The panel shows the real variables carried by the Delivered Shipment event in your account, which is the only reliable source. Do not assume the example above matches your store.
Pass the order ID, not the order number or order name. The order ID is the long numeric value (around 13 digits) that Shopify assigns internally. The order number (#1001) and order name are much shorter and will not match anything in Retently. See Order Properties from Shopify for the full explanation.
Klaviyo requires two-step authentication on your account before a webhook action can be saved. Save the flow, but leave it in Draft until the next step is done.
Sending additional properties
You can pass any other Klaviyo data to Retently in the same payload. For each extra field:
Create the property in Retently first, on the Attributes page. Use lowercase names with underscores instead of spaces (
register_date, notRegister Date).Add that exact property name as a key in the Klaviyo JSON body.
Set its value to the matching Klaviyo variable.
Step 4: Import order data from Shopify
The Klaviyo payload gives Retently the order ID, but not the order itself. To turn that ID into products, order value, shipping details, and the rest, Retently needs the order data pushed directly from Shopify. This is done with a second webhook that only imports data and never sends a survey.
Create the inbound webhook in Retently
Go to Inbound Webhooks and click + Create new webhook.
Set Scope to Create or update contact.
Set Integration to Shopify.
Save and copy the webhook URL.
A webhook with the Create or update contact scope cannot be assigned to a campaign and will never trigger a survey. It only receives and stores what Shopify sends.
Add the webhook notification in Shopify
In your Shopify admin, go to Settings > Notifications and scroll to the Webhooks section.
Click Create webhook.
Set Event to Order update.
Set Format to JSON.
In URL, paste the Retently inbound webhook URL from the previous step.
For Webhook API version, choose the version labeled (Latest).
Save.
Order update is the right event here because a delivery changes the order's shipment status, so Shopify sends a fresh copy of the order (including its current fulfillment and shipping state) at the point the survey is about to be triggered.
Step 5: Activate and verify
Turn the Klaviyo flow from Draft to Live.
Confirm the Retently campaign toggle is ON.
Wait for a real order to be delivered, or use a test order with a carrier that reports delivery.
When it works, the sequence is:
The carrier marks the package delivered.
Shopify records the order update and pushes the order to Retently through the inbound webhook.
Klaviyo fires Delivered Shipment and the flow calls the Retently campaign webhook with the email and order ID.
Retently sends the survey.
When the customer responds, Retently matches the order ID on the response against the stored orders and attaches the full order details.
You can confirm the survey went out on the Outbox page, and confirm the order match by opening an individual response and checking that the order properties appear.
Matching only applies to responses collected after the setup is live. Responses received before the order ID was being passed will not get order data attached retroactively.
Troubleshooting
No surveys are sent. Check that the Klaviyo flow is Live, the Retently campaign is ON, and the Delivered Shipment metric is actually receiving events in Klaviyo. If the metric has no recent activity, your shipping carrier does not report delivery status to Shopify.
Surveys are sent but responses have no order data. The order ID is either missing from the Klaviyo payload or is the wrong value. Confirm the key is named exactly order_id, and that its value is the long numeric Shopify order ID and not the order number. Also confirm the Shopify Order update webhook exists and points at the import-only inbound webhook.
The webhook action will not save in Klaviyo. Klaviyo requires two-step authentication on the account before webhook actions can be used.
Customers are surveyed too often. Enable Throttle survey in the Retently campaign's Trigger section to skip customers who were surveyed recently in the same campaign.
📚 Related articles
