Webhooks

This feature allows you to stay in sync with Shopify or execute code after a specific event occurs on a shop. The following guide helps you configure a webhook using the API.

* Note:

  • Notification to activate REST API to ensure proper functioning of the webhook feature. You can see this WooCommerce documentation.
  • If you want to only import new order when one is created at your Shopify store, create a webhook with event Order Creation and use this URL for the webhook URL.
  • If you want to both create new order when one is created and update existing order when one is updated at your Shopify store, create a webhook with event Order Update and use this URL for the webhook URL.
  • Similarly, the above notes with Product and Customer creation and update are the same.

Important note: Normally the REST API on a website is enabled, but in some cases, access to the REST API may be disabled by a third-party plugin. If the webhook feature is not functioning properly, it could be due to the REST API being disabled, and you must verify and re-enable it accordingly.

  1. Get Webhooks shared secret by following steps in the next part
  2. Configure settings

 

HOW TO GET WEBHOOK SHARED SECRET KEY

1. From your Shopify admin, go to Settings > Notifications.

2. In the Webhooks section, click Create a webhook.

3. Select the event type you want to listen for, the format (JSON or XML), and the URL where you want to receive notifications.

Event: You can choose one of these event as your need: Order creation, Order update, Product creation, Product update, Customer creation; Customer update.

4. URL: Copy respective URL in S2W plugin to URL field in shopify and save the webhook.

5. Save the webhooks.

6. Copy the Order webhook URL from Import Shopify to WooCommerce and paste it to the URL in the Add Webhook area in Shopify dashboard.

7. Copy the Secret key you have just created on Shopify and paste to the Webhooks shared secret field in S2W and save the settings.

To verify data synchronization via webhook, please access the Logs section where you can review and debug errors in syncing with Webhook.