In the previous step, the scenario publishes a message in the telegram channel. Next, there are two different options. I would like to make sure that they are reproduced in a given percentage. For example, 70/30 or in the range of 70-80/30-20.
I understanding. If I am not wrong, what you are want to doing is a balance for the cases to distribuite it between the options. This solution is more complex. You need a datastore again and do some calculation based on the message history. Its a very complex coding to build. It will takes some hours to you find the better solution. The router is part of the process but the balance must be a custom code with 1 or several other steps. I hope you can find this solution soon.
Please don’t hesitate to contact us if you need any additional help.
If you are considering the entire data that keeps on coming to the scenario, then you can simply use modulus function in filter - based on percentage you can use the mod value to apply.
Eg: (Increment value)mod(4 - for 75%)
In the work of this scenario, I noticed the following feature. If, for example, you run the scenario 8 times, then option A always works the first 3 times, as well as on the 5th, 6th and 7th time. Option B always works on the 4th and 8th time.
For clarity:
1 - A
2 - A
3 - A 4 - B
5 - A
6 - A
7 - A 8 - B
Can you please tell me how can I set up the scenario in such a way that option B can work in any of the 8 cases in the range from 1 to 8? In other words, so that both options (A and B) work randomly in a given proportion (75% / 25%), and not predictably.
Make the second module a “Set Variable” instead of the Increment one, and apply the filters as shown. This should rendomise it and give on average 75/30 split
@Rory
Ah ok it’s because it’s based on every 100 runs. Are you trying split 70/30 for every run of the scenario. Rather than over a period of time and multiple runs.
In that case the random seed will need to be altered to match the number or bundles in the particular run of the scenario. You would also need to amend the filters so they run 75% or 25% of the bundle number. Does that make sense