I am building an Order Management Tool where Orders progress orders through a number of production stages (Order Received, In Production, Delivery, etc).
I want to trigger an email to be sent whenever a particular Order (which is a thing in my app) moves into the ‘Delivery’ stage. There are a number of ways in which people can move Orders between production stages, including dragging and dropping the order on a Trello style board, changing it from the Order Details Page (a page which displays all the details of an order), or changing it from a mobile-optimized page that is accessed by scanning a QR code on the paper order form.
Is there a way to watch the database for particular changes (remember, I only want to send this email when Stage = Delivery) and then trigger a workflow when it meets that criteria? Or am I better off architecting this in a different way?
I’ve spent hours working on this and am stumped, so would love some help if you have any ideas.