> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PFStatisticsCreateStatisticDefinitionRequest

> Reference for the PFStatisticsCreateStatisticDefinitionRequest struct in the PlayFab Services C API, with members to define a new statistic.

PFStatisticsCreateStatisticDefinitionRequest data model.

## Syntax

```cpp theme={null}
typedef struct PFStatisticsCreateStatisticDefinitionRequest {  
    const char* const* aggregationSources;  
    uint32_t aggregationSourcesCount;  
    PFStatisticsStatisticColumn const* columns;  
    uint32_t columnsCount;  
    PFStringDictionaryEntry const* customTags;  
    uint32_t customTagsCount;  
    const char* entityType;  
    PFStatisticsStatisticsEventEmissionConfig const* eventEmissionConfig;  
    const char* name;  
    PFVersionConfiguration const* versionConfiguration;  
} PFStatisticsCreateStatisticDefinitionRequest;  
```

### Members

**`aggregationSources`**   const char\* const\*<br />*may be nullptr*

(Optional) \[In Preview]: The list of statistic definition names whose scores must be aggregated towards this stat. If AggregationSource is specified, the entityType of this definition MUST be Title (making it a CommunityStat). Currently, only one aggregation source can be specified.

**`aggregationSourcesCount`**   uint32\_t

Count of aggregationSources

**`columns`**   [PFStatisticsStatisticColumn](/services/playfab/api-references/c/pfstatisticstypes/structs/pfstatisticsstatisticcolumn) const\*<br />*may be nullptr*

(Optional) The columns for the statistic defining the aggregation method for each column. A maximum of 5 columns are allowed.

**`columnsCount`**   uint32\_t

Count of columns

**`customTags`**   [PFStringDictionaryEntry](/services/playfab/api-references/c/pftypes/structs/pfstringdictionaryentry) const\*<br />*may be nullptr*

(Optional) The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).

**`customTagsCount`**   uint32\_t

Count of customTags

**`entityType`**   const char\*<br />*is null-terminated*

(Optional) The entity type allowed to have score(s) for this statistic.

**`eventEmissionConfig`**   [PFStatisticsStatisticsEventEmissionConfig](/services/playfab/api-references/c/pfstatisticstypes/structs/pfstatisticsstatisticseventemissionconfig) const\*<br />*may be nullptr*

(Optional) \[In Preview]: Configurations for different Statistics events that can be emitted by the service.

**`name`**   const char\*<br />*is null-terminated*

Name of the statistic. Must be less than 150 characters. Restricted to a-Z, 0-9, '(', ')', '\_', '-' and '.'.

**`versionConfiguration`**   PFVersionConfiguration const\*<br />*may be nullptr*

(Optional) The version reset configuration for the statistic definition.

## Requirements

**Header:** PFStatisticsTypes.h

## See also

[PFStatisticsTypes members](/services/playfab/api-references/c/pfstatisticstypes/pfstatisticstypes_members)


## Related topics

- [PFStatisticsCreateStatisticDefinitionAsync](/services/playfab/api-references/c/pfstatistics/functions/pfstatisticscreatestatisticdefinitionasync.md)
- [Services C API overview - PFStatisticsTypes.h](/services/playfab/api-references/c/pfstatisticstypes/pfstatisticstypes_members.md)
- [PFStatisticsGetStatisticDefinitionRequest](/services/playfab/api-references/c/pfstatisticstypes/structs/pfstatisticsgetstatisticdefinitionrequest.md)
- [PFStatisticsUpdateStatisticDefinitionRequest](/services/playfab/api-references/c/pfstatisticstypes/structs/pfstatisticsupdatestatisticdefinitionrequest.md)
- [PFStatisticsDeleteStatisticDefinitionRequest](/services/playfab/api-references/c/pfstatisticstypes/structs/pfstatisticsdeletestatisticdefinitionrequest.md)
