D365 CE Integration – Shopify Webhook Registration Automatically Removed

Introduction
In earlier blogs we discussed about 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 failed 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.

shopify2

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

Hope it will help someone !!
Keep learning and Keep Sharing !!

Leave a Reply

Your email address will not be published. Required fields are marked *