Skip to main content

Set up Shopify v2 webhooks: one webhook per store, events chosen in Retently

Create a Shopify v2 webhook in Retently, add it to your Shopify admin on the Order update event, and choose the event that sends each transactional survey.

Written by Alex Bitca

A Shopify v2 webhook connects one Shopify store to Retently through a single URL. Shopify sends every order update to that URL. Retently creates or updates the customer's contact on each update and sends a transactional survey when an order reaches the event a campaign is set to. One webhook can trigger any number of campaigns, each on its own event.

1. Create the webhook in Retently

  1. Go to Settings > Inbound webhooks and click + Create new webhook.

  2. Select Shopify as the Integration. The Action is set to Survey & contact update.

  3. Keep the name Shopify order updates or enter your own, then click Create.

  4. In the Webhook created dialog, copy the webhook URL. It looks like https://wh.retently.com/v2/...

Create one v2 webhook per Shopify store. You can also create one from a campaign: on the Trigger tab, open the webhook list and click Create a v2 webhook.

2. Add the webhook in your Shopify admin

In your Shopify admin, go to Settings > Notifications, scroll down to the Webhooks section and click Create webhook:

  • Event: Order update

  • Format: JSON

  • URL: the webhook URL you copied from Retently

  • Webhook API version: the latest version

Important: select Order update only. A v2 webhook ignores every other Shopify event. Shopify does not let you change the event after the webhook is created, so if you picked the wrong one, delete it and create it again.

Until the first order update arrives, the webhook's row in Settings > Inbound webhooks reads "Waiting for the first order update from Shopify". After that, it shows when the last update arrived.

3. Choose the event for each campaign

  1. Open your transactional email campaign and go to the Trigger tab.

  2. Under Survey trigger method, set Survey triggered by to Shopify and select your v2 webhook.

  3. In Send this survey when, choose the event:

    1. Order fulfilled

    2. Order delivered

    3. Ready for pickup

    4. Delivery attempted

    5. Delivery delayed

    6. Delivery problem

    7. Customer action required

    8. Returning to sender

    9. Cancelled by customer

    10. Order refunded

    11. Order restocked

    12. Return completed.

  4. Save the campaign.

Order fulfilled means every item in the order is fulfilled. A partial fulfillment does not send the survey.

A survey is sent only for events that happen after you choose or change the event. Earlier activity on an order does not trigger it.

One survey per order, or one per item

For the delivery events, Order refunded and Return completed, Limit to one survey per order is ticked by default. Untick it to send one survey per parcel, per refund or per return. Repeat updates about the same parcel, refund or return do not send another survey. Order fulfilled, Cancelled by customer and Order restocked always send at most one survey per order.

The campaign's throttle, delay, sampling and audience filters still apply.

Use one webhook in several campaigns

Repeat step 3 in every campaign that should use this store's webhook, each with its own event. The Trigger tab lists the other campaigns using the same webhook and their events.

4. Send a test survey

  1. Make sure the campaign is switched ON.

  2. Place a test order in your Shopify store and move it to the event you chose. For Order fulfilled, fulfill every item.

  3. The customer is created as a contact in Retently, or updated if they already exist.

  4. The survey is sent according to the campaign's Trigger settings. Check it on the Outbox page. If a delay is set, the survey goes out once the delay has passed.

The Trigger tab shows when Shopify last sent an order update and whether this campaign has sent a survey yet.

v2 and legacy Shopify webhooks

v2 webhooks support more events and need less setup in Shopify:

  • More events. A legacy webhook sends the survey every time Shopify sends the event chosen in Shopify, such as Order creation or Order fulfillment. It can't send surveys on delivery, refunds, returns or cancellations. A v2 webhook checks every order update and sends the survey on any of the 12 events in step 3, including Order delivered and Order refunded.

  • One webhook per store. Legacy webhooks need a separate webhook in Shopify for every campaign. A v2 webhook is added to Shopify once, and each campaign chooses its own event in Retently.

  • No repeat surveys. A v2 webhook sends at most one survey per order for the chosen event, or one per parcel, refund or return if you choose.

Legacy webhooks

v2 webhooks

Webhooks in Shopify

One per campaign

One per store

Where the event is chosen

In Shopify

In each Retently campaign

Delivery, refund, return and cancellation events

Not available

Available

Legacy webhooks are still supported. Every Shopify webhook you create in Retently is a v2 webhook.

Did this answer your question?