Hi @A.B ,
Thanks for writing into Amplitude Community! Always great to see the community being used!
This is a good question. In order to answer your question, can you provide some more info of what you are trying to do exactly? You want to get a variant based on the variant you get back? This should be possible. Can you elaborate a little more on the scenario and what the flow of your current set up is and what you are expecting to happen? This will give me more context of what you are trying to achieve,
Thank you, @A.B !
In my backend service I am calling performing action where I am making a post request to an endpoint A.
Now, I want to be able to send 10% of my requests to endpoint B. This distribution of traffic to endpoint B has nothing to with a ‘user’ or for that matter any other criteria. I just want 10% of the requests to randomly go to endpoint B.
Can I use amplitude flags for implementing this ? If so, how do it do it ? I as “how” because the documentation says that I need to provide a “user” object to the `experiment.fetch()` method and I don’t have any user as such. I am randomly distributing requests to another endpoint. I wanna use amplitude, because it gives me the ability to change the distribution, without having to change my code or deploy/rollback my code for any changes.
Hi @A.B !
Apologies, I was OOO Friday and I am back in today! Let me speak to my team internally about this and I will get back to you as soon as I can, thank you!
Hi @A.B ,
I have contacted the team internally about this question for an answer. Unfortunately, Amplitude was not built for this use case. If you want to randomly assign based on some percentage, you would need to implement this yourself with a Math.random() function or something similar to this yourself to do this!
I hope this helps!