Do you need exactly every 8th call or just about 1/8 of the calls to do this?
If it's the 1st, your counter will need to keep track of the calls using some external data source. An instance of a flow running has no idea what other instances of the flow are doing. You could use a data table to keep track of it, but that takes 2 steps--a data table lookup to get the value then a data action to increment it. If your data source is something else, use a data action to get/update the value. You can probably do that with a single action.
If it's the 2nd you can use the random function, for example Random() < 0.125
. This expression checks if a randomly generated value between 0 & 1 is less than 1/8. Note about randomness: on average, this will work but it's not guaranteed to get exactly 7 false, 1 true, 7 false, 1 true. You could get 3 true, 20 false, 1 true, 8 false . . .
------------------------------
Melissa Bailey
Software Engineer
------------------------------
Original Message:
Sent: 11-07-2024 10:00
From: Sean Osborne
Subject: Call Flow routing to divert every 8th call down a different call path
I'm trying to build a call flow in Architect that would route every 8th call down a different call path. I can build everything but am having problems/questions with building the counter variable. How do I do that and increment the counter? Of course, once that's done I need a decision component to identify every 8th call.
Any advance or help would be appreciated.
#ArchitectureandDesign
------------------------------
Sean Osborne
NA
------------------------------