We are trying to get more information on which experiments are currently available for a player via cloud code.
There seems to be very little support for this and what is available is not very straight forward.
At the moment we only seem to be able to retrieve
getExperimentId() and getSegmentName() from a player's experiment segments. In addition, getSegmentName() returns the Player Pool Variant Configuration name instead of the Experiment name itself which was a bit confusing.
We require a way to know exactly what experiment is running for a player, which virtual goods the experiment affect and which percentage values on the virtual good currencies the experiment has modified.
Ideally, we would have a sparks function to retrieve all this info. Having to resort to ListVirtualGoodsRequest and compare segment costs to base costs just seems a long way to get what we want.
It would also be really useful to have a way to notify the player when an experiment has started, or when an experience has ended.
All of this would make it easier for us to be able to display the correct information on the client UI.
Apologies for the delayed response here. Only SparkPlayerExperimentSegment can return info about what experiment the player is in currently. You could use the value returned from the getExperimentId with this REST call to return the values that you require. You'd need to use it on conjunction with a SparkHttp call in Cloud Code but it should return all of the relevant data that you need here. Will that suffice for now ? I assume the main requirement here would be to use the experiment id to return some sort of SparkExperiment object that contains all of the relevant data from the experiment in it. Is that correct ?