If you are using order management, do you bump into the error a lot?: Order Start Date can’t be later than its products’ start dates.
It is a standard validation rule that prevents us from having an order product date that is out of the range of order start and end date. It is great for maintaining the data integrity, but not so good when we need to edit the dates because the steps will be different:
This also makes the flow design more challenging as the sequence of the actions depends on how the order dates change. Fortunately, the solution I developed allows us to ignore this issue, and let us update all dates at once. Let’s dive into how to build this up!
Lulu Mobile uses order management to handle the orders of sim cards. They use order start date and end date to indicate the orders’ validity, and order product start date and end date for the sim cards’ validity. Sometimes the customer might request to change the dates, and Lulu Mobile wants a solution to quickly update all four dates at once.
Though it’s possible to use Decision elements to replicate the logic, we want to develop a solution that is easy to understand and maintain. To achieve this, we will first expand the order period, update all the product dates, and then update the order to the right dates. (As Scenario 4 above)
So the first step is to find a range that is big enough to avoid hitting the validation error. Once we have the new order dates, we can get the oldest start date and the latest end date. To get the new order dates, we will use a Screen Flow along with a Quick Action.
Does the solution solve your problem? If not, write us what your problem is and we will build the flow for you!