Correct usage for NodeJS
Hi, we are trying to use Split in the following two ways into out NodeJS application.
The first one being the common usage, where we try to retrieve the treatment based on a customer/user
The second one being a retrieve of a treatment without a user in context. As example we want to switch a background process algorithm from one to another. This does not have a user tied to it but when trying to retrieve the treatment without the "key" it returns the control statement all times.
Is there any way on accomplishing that, if so which is the recommended way of doing so?
Thanks!
-
Hi Andres, by design, the SDK getTreatment call requires a user id, this is to make sure we can bucket the users when there is a percentage distribution of treatments.
If the background algorithm split does not have percentage distribution, you can use any dummy user for getTreatment call, it will not impact serving the treatment.
Thanks
Bilal
Please sign in to leave a comment.
Comments
1 comment