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

# ticket_completed

> ticket_completed event.

This event is triggered when a matchmaking ticket reaches a terminal state (for example, it is matched or canceled).

## Properties

| Name               | Type                                                                         | Description                                                                                                                                                                                    |
| :----------------- | :--------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| CancellationReason | String                                                                       | If the ticket result is Canceled then this string provides the reason why the ticket was canceled otherwise it is null. Possible values: Requested, Internal, Timeout, ServerAllocationFailed. |
| CompletionTime     | DateTime                                                                     | Time at which this ticket was completed.                                                                                                                                                       |
| CreationTime       | DateTime                                                                     | Time at which this ticket was created.                                                                                                                                                         |
| MatchId            | String                                                                       | The identifier for the match that the ticket got matched into. This field is only set if the ticket got matched otherwise it will be null.                                                     |
| QueueName          | String                                                                       | The name of the queue the ticket was created in.                                                                                                                                               |
| Result             | String                                                                       | The final state of the ticket. It could be Matched or Canceled.                                                                                                                                |
| SubmissionTime     | DateTime                                                                     | Time at which this ticket was submitted into the matchmaking queue.                                                                                                                            |
| TicketEntities     | [EntityKey](/services/playfab/api-references/events/data-types/entitykey)\[] | The list of entities that are part of this ticket.                                                                                                                                             |
| TicketId           | String                                                                       | Id of the ticket that was completed.                                                                                                                                                           |

## Common Properties

All V2 PlayStream events are formatted as JSON objects and most share the following common properties:

| Name               | Type                                                                          | Description                                                                               |
| :----------------- | :---------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------- |
| SchemaVersion      | String                                                                        | PlayStream event format version, following a semantic versioning scheme.                  |
| FullName           | [Object](/services/playfab/api-references/events/data-types/fullnameobject)   | Combination of the event name and event namespace to fully specify the event type.        |
| Id                 | String                                                                        | PlayFab-assigned unique identifier for this event.                                        |
| Timestamp          | DateTime                                                                      | The time (in UTC) associated with this event.                                             |
| Entity             | [Object](/services/playfab/api-references/events/data-types/entityobject)     | Details about the entity to which this event applies including Entity Id and Entity type. |
| Originator         | [Object](/services/playfab/api-references/events/data-types/originatorobject) | Object describing the source and source type that initiated this event.                   |
| PayloadContentType | String                                                                        | Specifies the content of the event payload. Default is "JSON".                            |
| Origin Info        | Object                                                                        | Optional field containing info about events originating outside of PlayFab.               |


## Related topics

- [PlayStream event model reference for PlayFab](/services/playfab/api-references/events/index.md)
- [PFMatchmakingTicketCompletedStateChange](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/structs/pfmatchmakingticketcompletedstatechange.md)
- [Using Server Backfill Tickets - Multiplayer SDK](/services/playfab/multiplayer/matchmaking/backfill-tickets-multiplayer-sdk.md)
- [PFMatchmakingStateChangeType](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/enums/pfmatchmakingstatechangetype.md)
- [PFMultiplayer C/C++ API overview - PFMatchmaking.h](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/pfmatchmaking_members.md)
