What is a webhook and why do you need it
This guide is relevant only for Shopify users.
If your brand uses Shopify as its eCommerce platform, you probably know that Ometria receives information on which contacts are opted-in or opted-out, through Shopify.
However, it does not provide Ometria with a timestamp of when a contact opted out, or opted-in.
So let’s suppose a contact subscribes via your eCommerce platform. Since they don’t have the ‘when did the contact subscribe’ information attached to the contact, Ometria would not be able to trigger a welcome campaign for that new subscriber! This is where webhooks come in.
A webhook is a way in which Shopify can talk to Ometria. It is much like how APIs work, however, an API talks only when you specifically ask it too. A webhook, on the other hand, can send information automatically when an event happens.
So when a contact opts in, the webhook automatically sends the contact details with opt-in value true and a time for ‘when did the contact subscribe’.
Set up a subscription webhook for Shopify
To set up a Shopify webhook you would first require a webhook URL. Please contact your CSM so that they can procure one for you.
1. Login to your Shopify account and click Settings
2. In the Settings page click on Notifications as shown below.
Figure 1: Go to Notifications in Settings to set up a webhook.
3. Please scroll down the page that opens to where it says Webhooks.
4. Click Create webhook.
Figure 2: Scroll down the Notifications page to Webhooks and click on Create webhook
5. Select 'Customer creation' and insert the supplied by Ometria.
Note: The URL in the screenshot below is for illustration purposes only.
Figure 3: Add a new webhook for a ‘Customer creation’ by the URL provided by Ometria
6. Repeat the above step for 'Customer update', inserting the supplied (So in total, you need to add 2 webhooks).
Note: URL in screen-grab below is for illustration purposes only.
Figure 4: Add another webhook for ‘Customer Update’
7. Select the ‘Save webhook’ option.