- Title-level: Aggregates all player updates into a single title-wide statistic. Ideal for global goals shared across the entire player base.
- Group-level: Aggregates player updates into a group entity statistic. Ideal for clan challenges, guild goals, or team-based objectives where subsets of players work toward a shared target.
Title-level community statistics
Creating the source statistic definition
First, create a statistic definition for players, which acts as the aggregation source:Creating the destination statistic definition
Next, create a statistic definition for the title, which acts as the aggregation destination. Specify the player statistic definition as the aggregation source for the title statistic definition:NOTE: Set
EntityType to title and AggregationSources to reference the statistic defined at the player level.
After you create the community statistic, any updates made at the player level start aggregating at the title level. The system aggregates only new updates. If the source statistic exists for a while, the system doesn’t backfill those historical values at the title level.
Reading title community statistics
To get the current scores for the statistic at the title level, read the statistics for the title entity:Group-level community statistics
Group-level community statistics let you aggregate player actions within a specific group, such as a clan or guild. This aggregation is useful for scenarios like a clan challenge where members collectively work toward a shared goal.Creating the destination statistic definition
Create a statistic definition withEntityType set to group. Specify the player statistic definition as the aggregation source:
The source statistic definition (player-level) is the same as the one used for title-level community statistics. You can reuse an existing source statistic definition.
Updating the source statistic
When updating a player’s source statistic for group-level aggregation, specify the target group entity in theAggregationTargetEntityKeys property of the StatisticUpdate object. This property tells PlayFab which group entity to aggregate the update to.
For title-level community statistics,
AggregationTargetEntityKeys isn’t required because the title is the default aggregation target. For group-level community statistics, you must specify the group entity key. Currently, you can specify only one entity key in AggregationTargetEntityKeys.Reading group community statistics
To get the current scores for the group community statistic, read the statistics for the group entity:Restrictions
- You can specify only one aggregation source for the community statistic.
- You can’t specify version configuration for the community statistic. The version configuration you specify for the source statistic also applies to the community statistic.
- The
EntityTypefor the community statistic must betitleorgroup. - You can’t use
Lastaggregation for any of the columns. - You can specify only one entity key in
AggregationTargetEntityKeyswhen updating the source statistic.
