Topics covering webhook creation & management, event handling, Pub/Sub, and Eventbridge, in Shopify apps.
We're in the process of providing affiliate offers for some of our products. In order to attribute the referral, we need to collect a cookie containing a token from the customers browser, and then use that token value to send off to a third party API to attribute the affiliate purchase during the order create webhook request.
I've seen a few mentions of providing webhooks with metafields, but I'm unsure how to connect the dots so that this cookie value is stored as a metafield for that order.
What are others doing in similar situations?
We have a custom app that subscribes to cart, checkout and order webhooks. So a combination of those should get me pretty close.
Many thanks.