Best way to display results in modal with multiple conditional outputs

Hey all -

I'm just about done building our app, which has a somewhat uncommon use case in that I'm not performing writes but rather evaluating customer order conditions and outputting custom instructions, slack messages to send via webhooks, and replies to our customers to paste into our chat tool.

The context is a production environment with many points of failure. First the queries and some additional code categorize the order after search - this is all already done. For example, we have two different production locations - all other conditions are the same besides the Slack channel used. There are other orders where if they've progressed beyond a certain point, the actions and slack channels will change, etc.

My end goal is a window that would fill in the appropriate slack(s), message to send to the customer, and a set of instructions for the agent to follow in editing the order. My question is - given there are about 100 different possible outcomes here, is it better to make a single modal where the fields have complex if statements to determine what they output? Or should I make a different one for each combination and have it more hard coded?

I need to have it done tonight and I've been stuck at this step for a while. Any advice would be appreciated!

@Luke_Lakatosh Welcome to the forum!
Honestly, without more detail it's hard for me to give you some direction.
The only thing I would avoid is hardcoding anything at all.... :slight_smile:

@ScottR That's totally fair. :slight_smile:

Let's say I have the following conditions stored in variables:

The agent would choose an action, let's say:
Add Stock

For each combination of conditions, the output will vary - a different Slack message, slack channel, set of instructions, and text to send the customer. So if, say, we wanted to Add Stock, the output would be different if the order is due in less than 48 hours, condition1 was "A", condition2 was "B", etc. Again, all of this is already stored in variables in my app, with the exception of one item that we manually prompt the customer for.

By the way, all of these items are also stored, pulled from a Google Sheet.

I hope this helps give some context on what I'm looking to do.

Sure then one modal for sure and using an Change event handler for the Action select dropdown would work fine in one modal