Help: I can't create a function with multiple steps in the flow for


Help: I ​​can’t create a function with multiple steps in the flow to create a flow that allows me to first understand if it is male or female, if it comes from the north of a specific area or south, and if the customer requests one option or the other, since I divide it in this way it goes to a specific person do you have any ways or know a method to make this simpler and more manageable instead of having a huge tree with the same customers etc…

Hey Isma,

what does the incoming bundle look like and what are you trying to achieve?
You can use if() or switch() formulas to process different cases depending on the data.

Hi Stoyan,

I tried as there were many variables to take into consideration because at the beginning the procedure was + agents, an agent and then it branched out into man or woman and later became north and south and this meant that the flow was very structured and had for each combination a dedicated structure

Hi @Isma_Kho

You can achieve this with switch function. Here’s an example to demonstrate how it works:
Sample variables used:

Switch function:


For instance, priority is set based on gender using the following switch function: switch(407.gender; “male”; 1; “female”; 2; 0)

This function checks the value of 407.gender:

If 407.gender is “male”, it returns 1.
If 407.gender is “female”, it returns 2.
If the value is neither “male” nor “female”, it returns 0.
Similarly, the switch function can be applied to other variables like area.

Output:

Best regards,

Msquare Automation
Gold Partner of Make
@Msquare_Automation