Order Monitoring and Notification Solution in VTEX Legacy CMS

Good morning everyone! How’s it going?

To help fellow store owners and developers who, like me, face challenges with VTEX stores still on the Legacy version, I’d like to share a project I built that monitors orders in the OMS and uses Master Data as a “bridge” to enable simple and effective integrations with any external webhook.

If you still have a VTEX Legacy store, you’ve probably felt this pain:

In VTEX Legacy, we don’t have native tools like EventBridge, apps that handle order events, or even webhooks configurable directly through the platform. This means that to automate important actions (like sending a WhatsApp message to the customer when an order is approved), the only option VTEX gives us is to keep “asking” the API at intervals whether there’s a new or updated order — what we call API Polling. This limitation makes real-time communication and integration with other systems really difficult.

With that in mind, I built an application in Python that acts as an order “monitor”. It’s simple, effective, and I’ve made it open source for the community.

How it works:

This Python app connects to VTEX’s OMS API. It runs a configurable polling cycle (in my case, set to every 30 minutes) to look for orders with the status payment-approved or ready-for-handling. Once identified, it saves them to a custom data entity in Master Data v1 (in my project, I called it OrderEvents).

The clever part is using Master Data Triggers to, upon saving that data, fire POST webhooks to external services (like a WhatsApp gateway or CRM). I personally used this approach to send an order confirmation via WhatsApp to the customer right after their purchase.

This feature opens up even more possibilities: I can create recurring message flows for customer segmentation (like customers who haven’t bought in a while), for example through BotConversa or a similar tool. The cool thing is that if the customer makes a purchase during one of these flows, BotConversa — in my case — receives a webhook with the purchase info and can automatically stop the sequential messages based on your configuration, ensuring communication is always relevant and timely.

Saving to MasterData v1:

Trigger Configuration:


Sending a message to the Customer on WhatsApp via BotConversa:

Benefits:

  • Low Cost / Free: You don’t need specific apps requiring custom development to pull off this integration.
  • Improves Communication: Notify your customers at key moments in their purchase journey.

Important Limitations:

  • Not real-time: Since it relies on polling, notification speed depends on the frequency you configure.
  • Best for Small/Medium Volume: While the VTEX API is robust, this solution is ideal for stores with small to medium order volumes, where the polling frequency won’t overload the API. The app currently fetches 25 orders per page, but that can be adjusted.

Future Improvements:

This is an initial prototype, but my goal is to keep evolving it! I want to integrate additional order statuses into Master Data and create triggers for the entire purchase journey (order shipped, delivered, etc.).

I invite everyone to check out the project, and if you need help getting it up and running, or have ideas to take this solution further, feel free to share your thoughts! All contributions are very welcome.

Check out the project and the full code on my GitHub: https://github.com/nathvegi/vtexlegacy_order_tracker.git

I hope this can be useful to everyone dealing with the same pain I was.

2 Likes