D365 CE Integration: Auto Remove Shopify Webhook Registration

Introduction

In earlier blogs, we discussed Dynamics 365 CE and Shopify integration. While testing our integration which we implemented using Azure Function and Shopify Webhook, we found Shopify Webhook registrations are automatically removed after some time. In this blog post, we’ll delve into troubleshooting steps to address this challenge and ensure a stable and reliable integration between Dynamics 365 CE and Shopify.

Details

During the testing phase of our integration, we encountered an issue where no new records were being created in Dynamics 365 (D365) across various use cases. Our initial investigation led us to check our error log entity, which revealed no new logs. Subsequently, we examined the Azure Function logs and discovered that the Azure Function wasn’t triggering. Taking a closer look at the authentication details, we then turned our attention to the Webhook registration, only to find that it was empty—none of the registered Webhooks were present.

Further exploration brought us to Shopify community threads addressing a similar issue. According to these discussions, Shopify considers webhook delivery notifications to fail if it doesn’t receive an “OK” response within a specific time frame. Simply put, Shopify expects an immediate “OK” response upon receiving the request. However, in our case, creating a set of records involved different logic and operations that needed to be executed before the actual record creation.

To address this challenge, we implemented a solution involving Logic Apps. This approach enabled us to promptly send an “OK” response to Shopify and subsequently call the Azure Function for further processing, resolving the issue and ensuring the successful creation of records in Dynamics 365.

Shopify

We re-registered Webhook in Shopify using the logic app URL and it solved our issue.

Hope it will help someone !!

Keep learning and Keep Sharing !!

HIMBAP
We are expert in Microsoft Power Platform.