Shopify Connector
The Shopify Connector sends automatic push notifications to your app users when something happens in your Shopify store, like a new order, a payment or a shipment.
It connects your Shopify store to Webtonative with a webhook, and links each logged-in customer to their device so every notification reaches the right person.
Where to Find It In Your Dashboard
My Apps ➡️ Edit your app ➡️ Push Notification ➡️ Webhook Connector ➡️ Shopify
Before You Start
-
Your plan must include Webtonative Push.
-
Push must be configured for your app (Android and/or iOS) in the Webtonative dashboard.
-
You need access to your Shopify admin (Settings and Online Store ➡️ Themes).
How It Works
1. Link customers to devices
A small script in your theme calls WTN.Notification.setExternalUserId() with the Shopify customer ID when a customer is logged in, and removeExternalUserId() when they log out.
2. Shopify sends a webhook
When the event happens (for example, an order is created), Shopify sends the order data to your connector's Webhook URL.
3. Webtonative sends the notification
Webtonative reads the customer ID from the webhook (customer.id) and sends your notification to every device linked to that customer.
Add the User Sync Script to Your Theme
Open the Theme Code
-
In Shopify admin, go to Online Store ➡️ Themes.
-
Click ⋯ next to your current theme and choose Edit code.
-
Open layout/theme.liquid.
Paste the Script
Paste this script on the line just above </head>, then click Save.
<script src="https://unpkg.com/webtonative@1.1.33/webtonative.min.js" defer></script>
<script>
window.addEventListener('load', function () {
{% if customer %}
WTN.Notification.setExternalUserId("{{ customer.id }}");
{% endif %}
});
// Remove the external ID when the customer clicks logout
document.addEventListener('click', function (e) {
var link = e.target.closest('a[href*="/account/logout"], a[href*="{{ routes.account_logout_url }}"]');
if (!link || !window.WTN || !WTN.Notification) return;
e.preventDefault();
WTN.Notification.removeExternalUserId();
setTimeout(function () { window.location.href = link.href; }, 300);
});
</script>What the script does
| When | Action |
|---|---|
| A logged-in customer opens any page | setExternalUserId(customer.id) links them to the device |
| A guest opens a page | Nothing |
| The customer taps a logout link | removeExternalUserId() unlinks them, then logs out |
Create the Connector in Webtonative
Open Webhook Connector
Log in to the Webtonative dashboard, go to My Apps, select your app and open Push Notification ➡️ Webhook Connector in the sidebar.
Add a Shopify Connector
-
Click + Connect Webhook (or + Add Connector if you already have connectors).
-
Select Shopify and click Continue.

-
Enter a Connector Name, for example
Order created. -
Copy the Webhook URL.

Create the Webhook in Shopify
Open Shopify Webhooks
In Shopify admin, go to Settings ➡️ Notifications, scroll to the bottom and open Webhooks.
Create the Webhook
Click Create webhook and fill in the form:
| Field | Value |
|---|---|
| Event | The event this connector is for, e.g. Order creation |
| Format | JSON |
| URL | The Webhook URL from your connector |
| API version | The latest version |
Click Save.
Copy the Signing Secret
Below the webhook list, Shopify shows "Your webhooks will be signed with …". Copy that secret.
Verify the Connector
Paste the Secret and Click Verify
-
Back in Webtonative, paste the signing secret into Secret Code.
-
Tick Yes, I have created the webhook in Shopify and pasted its secret code here.
-
Click Verify. The connector is saved and the window shows Waiting for the test event.

Send a Test Webhook From Shopify
-
In Shopify admin, go back to Settings ➡️ Notifications ➡️ Webhooks.
-
Click ⋯ next to your webhook and choose Send test notification.
-
When Webtonative receives the test and the secret matches, the connector status changes to Active.
Create the Notification Template
After the connector is verified, the Create a Template window opens. You can also open it later from the ⋯ menu on the connector row ➡️ Edit Template.
Connector Name
This is filled in for you and can't be changed here.
Title
Enter a title for the notification.
Message
Enter the message. Click Available variables { } to insert values from the Shopify webhook.
Launch URL
(Optional) The page that opens when the user taps the notification. It can be a fixed URL, like https://yourstore.com/orders, or a variable.
Preview & Save
Check the phone preview, then click Save Template.

Using variables
Insert values from the Shopify webhook with {{field}}. Open Available variables in the template to pick one.
| Variable | Value From Shopify | Example |
|---|---|---|
{{id}} | Order ID | 5501234567890 |
{{name}} | Order number | #1001 |
{{total_price}} | Order total | 1499.00 |
{{currency}} | Currency | INR |
{{financial_status}} | Payment status | paid |
{{customer.id}} | Customer ID | 7012345678901 |
{{customer.first_name}} | Customer first name | Asha |
{{order_status_url}} | Customer order status page | https://… |
Example
-
Title: Order received
-
Message: Hi
{{customer.first_name}}, your order{{name}}of{{currency}}{{total_price}}is confirmed. -
Launch URL:
{{order_status_url}}
Manage Your Connectors
Connector status
Pending verification
Created but not verified yet. No notifications are sent.
Active
Verified and sending notifications.
Paused
Turned off with the Enabled toggle. Webhooks are received, but nothing is sent.
Row actions
Open the ⋯ menu on a connector row:
-
Analytics: Events Received, Notification Sent, Notification Skipped and CTR for this connector.
-
Edit Template: change the title, message or Launch URL.
-
Delete: remove the connector. Also delete its webhook in Shopify.
Use the Enabled toggle to pause or resume a connector.
Notes
-
Notifications are sent only to customers who are logged in on the app at least once with the script installed.
-
The customer ID in the webhook (
customer.id) must match the ID linked by the script. This works automatically with the script above.
Frequently Asked Questions
1. My connector stays in Pending verification. What should I do?
Click Verify first, then send the test notification from Shopify (⋯ ➡️ Send test notification). Copy the signing secret again from Settings ➡️ Notifications ➡️ Webhooks and paste it without extra spaces. Make sure the webhook URL in Shopify is exactly the one from your connector.
2. Why do I see the "You don't have any users yet" banner?
Add the user sync script to layout/theme.liquid, then log in on the app once so the customer is linked to the device.
3. I see "setExternalUserId is not a function". What does it mean?
An older Webtonative SDK is loaded on the page. Use version 1.1.23 or later and remove older script tags.
4. Why does Notification Skipped keep increasing?
The order was a guest checkout, so there is no customer to send it to. Or the customer hasn't opened the app while logged in, so their device isn't linked yet. Or the connector is Paused, or it has no template.
5. Why does a customer still receive notifications after logging out?
The customer logged out from Shopify's hosted account page, where the theme script doesn't run. They're unlinked the next time they tap the store's logout link, or replaced when another customer logs in on the device.
