> ## 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.

# PFEvent

> Event to be uploaded to PlayFab.

Event to be uploaded to PlayFab.

## Syntax

```cpp theme={null}
struct PFEvent {  
    PFEntityKey const* entity;  
    const char* eventNamespace;  
    const char* name;  
    const char* clientId;  
    const char* payloadJson;  
}  
```

### Members

**`entity`**   PFEntityKey const\*<br />*may be nullptr*

Entity associated with the event. If null, the event will apply to the calling entity.

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

The namespace in which the event is defined.

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

The name of the event.

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

Client assigned identifier associated with event. Not required but may be useful for tracking or tracing. If a clientId is not provided, the SDK will automatically assign one.

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

Arbitrary JSON data associated with the event.

## Requirements

**Header:** PFEventPipeline.h

## See also

[PFEventPipeline members](/services/playfab/api-references/c/pfeventpipeline/pfeventpipeline_members)


## Related topics

- [Services C API overview - PFEvents.h](/services/playfab/api-references/c/pfevents/pfevents_members.md)
- [PFEventPipelineEmitEvent](/services/playfab/api-references/c/pfeventpipeline/functions/pfeventpipelineemitevent.md)
- [PFEventsWriteEventsAsync](/services/playfab/api-references/c/pfevents/functions/pfeventswriteeventsasync.md)
- [PFEventsWriteEventsGetResult](/services/playfab/api-references/c/pfevents/functions/pfeventswriteeventsgetresult.md)
- [PFEventsWriteTelemetryEventsAsync](/services/playfab/api-references/c/pfevents/functions/pfeventswritetelemetryeventsasync.md)
