Shopify: Improve efficiency of the webhook processing #1849
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes several changes to improve the handling of Shopify webhook events and the integration with Shopify. The most important changes include adding return messages for various webhook handlers, modifying the
orderPaid
function to handle different cases ofclickId
, and renaming and updating the Shopify pixel route.Shopify Webhook Improvements:
apps/web/app/api/shopify/integration/webhook/app-uninstalled.ts
,apps/web/app/api/shopify/integration/webhook/customers-data-request.ts
,apps/web/app/api/shopify/integration/webhook/customers-redact.ts
,apps/web/app/api/shopify/integration/webhook/shop-redact.ts
) [1] [2] [3] [4]orderPaid
function to handle different cases ofclickId
, including when it is empty, found, or not found. (apps/web/app/api/shopify/integration/webhook/order-paid.ts
) [1] [2] [3]apps/web/app/api/shopify/integration/webhook/route.ts
) [1] [2]Shopify Pixel Route:
clickId
if provided. (apps/web/app/api/shopify/pixel/route.ts
renamed fromapps/web/app/api/track/shopify/route.ts
) [1] [2]Environment Configuration:
SHOPIFY_WEBHOOK_SECRET
to the environment configuration example file. (apps/web/.env.example
)