Side: This is a post in my on going series about Rewriting Has It Shipped Yet in Go.
So for version 2 I changed to original requirements.
Originally I planned on only looking up orders on demand i.e. Customer goes to Track Your Order page puts in their order number and email address.
This way I didn’t need to worry about a little bit of down time (just when I needed to push an update).
It worked. But for version 2, I wanted customer to be able to lookup their order with just an Email Address. This way I could create more value than what is already being offered.
If a customer needed to go through their email just for a order number, why not just look for this receipt and use Shopify’s own order tracker?
Adding email support meant that I couldn’t just rely on looking up orders on demand. Instead I needed to listen for every single order being processed - here’s where webhooks come in.
But in order to support that, I couldn’t suddenly have unexpected downtime. What if I needed to deploy a new build. I would have to stop listening for incoming requests.
Sure it would have worked. But after some testing, I found that the webhooks would be retried at odd times throughout the day. For example, the webhook request might not be retried for 5 hours.
This would mean, if a customer just purchased their item. Tried tracking it’s status - I would reply back saying their order wasn’t being processed.
Enjoyed the article? Subscribe to my newsletter for more.
© Thomas McGoey-Smith (2014-2018). RSS.