- Within the create ticket request
- In the player’s entity
Specifying within the create ticket request
For rules configured with the attribute type “User”, attributes are specified in aCreateMatchmakingTicket request, alongside the player entity inside of an attributes DataObject.
DifferenceRule. This rule
contains an attribute path and source that will pick up the value 16.0,
specified by the CreateMatchmakingTicket request above.
Rules can navigate through the
DataObject with a JSON Path. Replacing the Path field with “nestExample.exp” would cause the rule to use the value 1500 for the ticket created above.Specifying through player entities
For rules with the attribute type “Player Entity”, attributes are specified through a separate call to theSetObjects API.
This allows data to be stored for a user, rather than the title needing to specify it on each create ticket call.
This may make more sense for values that persist for a user, or that users cannot be trusted to submit. An example of this SetObjects call is shown below.
DifferenceRule rule, when a ticket is created with this player.
In the
Path field, the first item after the root is the ObjectName, allowing you to choose which stored object to reference.Special formats
Most rules use attributes that are either strings or numeric, and are simply those values in JSON format. Rules that require more complex attributes to be passed in are listed below.Region Selection rule
A Region Selection rule requires an array of latency measurements with the specified schema. The following example is the expected attribute format for a region selection rule, shown alongside the two attributes used in theCreateMatchmakingTicket request example for comparison.
Latencies must match the field referenced by the Path field in the rule. An example of a rule which would use the Latencies field is included in the queue below.
When using the region selection rule for a queue that has server allocation enabled, the regions must be valid Azure Regions. You can find the list of valid Azure Regions here.
