Step 3: Set up Webhooks in your BigCommerce Account
To ensure that your product information stays up to date, you can set up a webhook so that whenever product data is changed or updated in BigCommerce, your product connector re-runs automatically and the change is reflected in near-real time in Yext. If webhooks are not configured, your connector will still run and sync updates every hour.
Follow the below steps to set up webhooks:
- You will need to create a Yext Developer App. From within your Yext Account, navigate to the Developer Console and create an app with with Read/Write Permission for the Management API > Connectors endpoint. For full steps to create an app, visit Step 2 of our Get Started with the API guide Get Started with the API guide.
- Click the “eye” icon to reveal the API Key and copy this value. You will need to enter it in the POST request below (YOUR_API_KEY).
- Create a POST request in the API interface of your choice to this request URL:
https://api.bigcommerce.com/stores/[store-hash]/v3/hooks
.- Note: Update
[store-hash]
with the 10 character store hash string from your BigCommerce store.
- Note: Update
In the body of the POST request, add the below code. Remember to add your Yext API key in the destination URL below (you can find and reveal this API Key under the API Credentials tab in the Yext App you created).
{ "scope": "store/product/*", "destination": "https://api.yext.com/v2/accounts/me/connectors/bigCommerce_ProductsConnector/trigger?v=20230221&runMode=COMPREHENSIVE&api_key=YOUR_API_KEY", "is_active": true, "events_history_enabled": true, "headers": { "custom": "string" } }
You have now created a webhook to trigger a new run of your connector any time product data is changed in your BigCommerce account. You can go ahead and make a change to one of your products in BigCommerce to test if the webhook is working as expected.