I want to access all variables assigned using Experiments feature of playfab to player in cloudscript.
Is there any way?
I want to access all variables assigned using Experiments feature of playfab to player in cloudscript.
Is there any way?
You may monitor the TreatmentAssignment property in the callback result of any login API.
In addition, according to the documentation, any APIs that includes ProfileConstraints configuration in the request will be able to retrieve Experiments variables. For example in GetPlayerProfile API, you may call it in the Cloud Script via:
{ "PlayFabId": xxxxxx", "ProfileConstraints":{ "ShowExperimentVariants": true } }
Please feel free to tell us if you have any questions on the usage.
Thanks for the help.
I know about the TreatmentAssignment property in login API.
Yes you are right about the experiment variants, they are presents in GetPlayerProfile API.
But i want all the experiment variables that not the variants.
Just like TreatmentAssignement.Variables.
So is there any way to access them in cloudscript?
Since there is no documentation, here is my solution. You will need to get the Variant ID from the GetPlayerProfile or GetProfile API, then call GetExperiments API and find corresponding variables according to VariantID.
Yes, thought so.
all of the Experiments variables using this API GetTreatmentAssignment.
Both of these APIS requires entity token.
how should i fetch that token in cloudscript?
2 People are following this question.