DEV Community

Mike Sedzielewski
Mike Sedzielewski

Posted on • Originally published at Medium on

Decoding Commercetools Integration: A Peek Behind the Scenes

This week Voucherify announced the commercetools connector. Integrating with another MACH tool gave us a unique chance to assess our product. By using APIs for a concrete use case, we could explore two POVs:

👉 What we can learn from MACH Alliance founders & leaders

👉 Is our API as dev-friendly as we want it to be?

Re 1) I talked to our devs about what they like about CT API. Among other things, the API Extension model was praised as “webhooks on steroids’’. Unlike webhooks, the synchronous and time-sensitive nature of API Extension makes it more predictable to work with (and boy we have been struggling with some pain-in-the-neck webhook mechanisms for some time).

The flexibility of this model and the requests chaining policy are also well thought of. You can do pretty much everything with an active order and pass all the relevant info further to subsequent call-outs.

commercetools API has some learning curve for sure, but once you grasp the basics and install the SDK you don’t need docs on the side to understand what’s in the “cart” and other objects passed with a request. When you add to it a CLI task that registers a local ngrok instance as a target endpoint for API Extensions, you — as Michał Moczulski puts it — “forget you’re working with external SaaS.”

Hats off to Kelly Goetsch and the team 👌

Re 2) The connector highlighted some gaps in our docs and SDKs. One thing that was clearly missing are sequence diagrams showing the order of API calls (like this one 👇)

BTW I learned about mermaid ( which gives you grammar for building diagrams in your editor (and github can render it right away). Cool thing for automating product marketing too.

As for the connector itself, it’s open source so you can see how we implemented a few unique discounting features such as applying many promo codes/gift cards/etc at the same time.

But our integration team (Marcin Ślęzak, Tomasz Łochmańczyk, Michał Moczulski) is pushing new features. If you want to stay updated, star ⭐️ the repo on Github or join our Slack channel.


Top comments (0)