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

匹配票据达到终止状态时（例如匹配成功或被取消）触发此事件。

## 属性

| 名称                 | 类型                                                                           | 说明                                                                                                |
| :----------------- | :--------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------ |
| CancellationReason | String                                                                       | 如果票据结果为 Canceled，则此字符串提供票据被取消的原因；否则为 null。可能的值：Requested、Internal、Timeout、ServerAllocationFailed。 |
| CompletionTime     | DateTime                                                                     | 此票据完成的时间。                                                                                         |
| CreationTime       | DateTime                                                                     | 此票据创建的时间。                                                                                         |
| MatchId            | String                                                                       | 该票据被匹配到的匹配的标识符。仅当票据成功匹配时才设置此字段，否则为 null。                                                          |
| QueueName          | String                                                                       | 创建票据所在的队列名称。                                                                                      |
| Result             | String                                                                       | 票据的最终状态。可能为 Matched 或 Canceled。                                                                   |
| SubmissionTime     | DateTime                                                                     | 此票据提交到匹配队列的时间。                                                                                    |
| TicketEntities     | [EntityKey](/services/playfab/api-references/events/data-types/entitykey)\[] | 属于此票据的实体列表。                                                                                       |
| TicketId           | String                                                                       | 已完成的票据 ID。                                                                                        |

## 通用属性

所有 V2 PlayStream 事件都被格式化为 JSON 对象，且大多数共享以下通用属性：

| 名称                 | 类型                                                                            | 说明                                          |
| :----------------- | :---------------------------------------------------------------------------- | :------------------------------------------ |
| SchemaVersion      | String                                                                        | PlayStream 事件格式版本，遵循语义化版本方案。                |
| FullName           | [Object](/services/playfab/api-references/events/data-types/fullnameobject)   | 事件名称和事件命名空间的组合，用于完全指定事件类型。                  |
| Id                 | String                                                                        | 由 PlayFab 分配的此事件的唯一标识符。                     |
| Timestamp          | DateTime                                                                      | 与此事件关联的时间（UTC）。                             |
| Entity             | [Object](/services/playfab/api-references/events/data-types/entityobject)     | 此事件所应用于的实体的详细信息，包括 Entity Id 和 Entity type。 |
| Originator         | [Object](/services/playfab/api-references/events/data-types/originatorobject) | 描述发起此事件的来源和来源类型的对象。                         |
| PayloadContentType | String                                                                        | 指定事件负载的内容。默认为 "JSON"。                       |
| Origin Info        | Object                                                                        | 可选字段，包含来自 PlayFab 外部的事件的相关信息。               |


## Related topics

- [PlayFab 的 PlayStream 事件模型参考](/zh-CN/services/playfab/api-references/events/index.md)
- [PFMatchmakingTicketCompletedStateChange](/zh-CN/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/structs/pfmatchmakingticketcompletedstatechange.md)
- [PFMultiplayer C/C++ API 概述 - PFMatchmaking.h](/zh-CN/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/pfmatchmaking_members.md)
- [PFMatchmakingStateChangeType](/zh-CN/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/enums/pfmatchmakingstatechangetype.md)
- [使用服务器回填工单 - Multiplayer SDK](/zh-CN/services/playfab/multiplayer/matchmaking/backfill-tickets-multiplayer-sdk.md)
