Per the documentation for CreateChallengeRequest, I can set a series of Segments in the eligibilityCriteria for a CreateChallengeRequest. I would like to create open challenges for people in the same segment (where segment may be country, language, but also "level"). However, how would my client side know which segments the current player is in? It's not in the AccountDetailsResponse, for example. Would I need to create a custom event just to figure out which segment I'm in before creating the CreateChallengeRequest? Or would I need to duplicate the logic that segments my players in the Cloud Code into my game client in some way?
Best Answer
C
Customer Support
said
almost 7 years ago
Hi Rene,
You could use some custom cloud code in an AuthenticationRequest to pull in the Segments data from a collection. I’d recommend pulling it in on Authentication as all users will have to do this and you won’t have to trigger and event later to get this data onto the client side. Then when you are ready to send a request, add the local Segment data to the Request as required and send as normal.
Thanks,
Liam
1 Comment
Customer Support
said
almost 7 years ago
Answer
Hi Rene,
You could use some custom cloud code in an AuthenticationRequest to pull in the Segments data from a collection. I’d recommend pulling it in on Authentication as all users will have to do this and you won’t have to trigger and event later to get this data onto the client side. Then when you are ready to send a request, add the local Segment data to the Request as required and send as normal.
Rene van den Berg
Hi all,
Per the documentation for CreateChallengeRequest, I can set a series of Segments in the eligibilityCriteria for a CreateChallengeRequest. I would like to create open challenges for people in the same segment (where segment may be country, language, but also "level"). However, how would my client side know which segments the current player is in? It's not in the AccountDetailsResponse, for example. Would I need to create a custom event just to figure out which segment I'm in before creating the CreateChallengeRequest? Or would I need to duplicate the logic that segments my players in the Cloud Code into my game client in some way?
Hi Rene,
You could use some custom cloud code in an AuthenticationRequest to pull in the Segments data from a collection. I’d recommend pulling it in on Authentication as all users will have to do this and you won’t have to trigger and event later to get this data onto the client side. Then when you are ready to send a request, add the local Segment data to the Request as required and send as normal.
Thanks,
Liam
Customer Support
Hi Rene,
You could use some custom cloud code in an AuthenticationRequest to pull in the Segments data from a collection. I’d recommend pulling it in on Authentication as all users will have to do this and you won’t have to trigger and event later to get this data onto the client side. Then when you are ready to send a request, add the local Segment data to the Request as required and send as normal.
Thanks,
Liam
-
Documentation Notes
-
Design issues with user events
-
Using NoSQL
-
Runtime Collections vs Metadata Collections
-
Anonymous authentication from browser app
-
Modules
-
Movement With Unity
-
Problem with url parameters for downloadables
-
Querying NoSql GameSparks database
-
Challenge accesType
See all 2487 topics