聊天:实时联系人分析区段直播示例 - Amazon Connect

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

聊天:实时联系人分析区段直播示例

本主题提供了聊天联系期间发生的 “已开始”、“分段”、“已完成” 和 “失败” 事件的区段流示例。

示例 STARTED 事件

  • EventType: 已启动

  • 在实时联系人分析会话开始时发布。

{ "Version": "2.0.0", "Channel": "CHAT", "AccountId": "123456789012", // your AWS account ID "InstanceId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", // your Amazon Connect instance ID "ContactId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222", // the ID of the contact "StreamingEventType": "STARTED", "StreamingSettings": { "LanguageCode": "en-US", // the language code of the contact "Output": "RedactedAndRaw", "RedactionTypes": [ "PII" ], "RedactionTypesMetadata": { "PII": { "RedactionMaskMode": "PII" } } } }

示例 SEGMENTS 事件

  • EventType: 细分

  • 在实时联系人分析会话中发布。此事件包含包含已分析信息的RealtimeContactAnalysisSegment对象列表。区段列表可能包括"Transcript""Categories""Issue""Event""Attachment"区段。

{ "Version": "2.0.0", "Channel": "CHAT", "AccountId": "123456789012", // your AWS account ID "InstanceId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", // your Amazon Connect instance ID "ContactId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222", // the ID of the contact "OutputType": "Redacted", "StreamingEventType": "SEGMENTS", "StreamingSettings": { "LanguageCode": "en-US", // the language code of the contact "Output": "RedactedAndRaw", "RedactionTypes": [ "PII" ], "RedactionTypesMetadata": { "PII": { "RedactionMaskMode": "PII" } } }, "Segments": [{ "Transcript": { "Id": "07a2d668-5c9e-4f69-b2fe-986261b0743a", "ParticipantId": "a309ac1e-ca87-44ca-bb5d-197eca8ed77a", "ParticipantRole": "AGENT", "DisplayName": "[PII]", "Content": "Hello, thank you for contacting Amazon. My name is Ray.", "ContentType": "text/markdown", "Time": { "AbsoluteTime": "2024-03-14T19:39:26.715Z" }, "Sentiment": "NEUTRAL" } }, { "Categories": { "MatchedDetails": { "Hi": { "PointsOfInterest": [{ "TranscriptItems": [{ "Id": "5205b050-8aa9-4645-a381-a308801649ab", "CharacterOffsets": { "BeginOffsetChar": 0, "EndOffsetChar": 40 } }] }] } } } }, { "Issues": { "IssuesDetected": [{ "TranscriptItems": [{ "Content": "I have an issue with my bank account", "Id": "0e5574a7-2aeb-4eab-8bb5-3a7f66a2284a", "CharacterOffsets": { "BeginOffsetChar": 7, "EndOffsetChar": 43 } }] }] } }, { "Attachments": { "Id": "06ddc1eb-2302-4a8e-a73f-37687fe41aa9", "ParticipantId": "7810b1de-cca8-4153-b522-2498416255af", "ParticipantRole": "CUSTOMER", "DisplayName": "Customer", "Attachments": [{ "AttachmentName": "Lily.jpg", "ContentType": "image/jpeg", "AttachmentId": "343e34da-391a-4541-8b7e-3909d931fcfa", "Status": "APPROVED" }], "Time": { "AbsoluteTime": "2024-03-14T19:39:26.715Z" } } }, { "Event": { "Id": "fbe61c5f-d0d8-4345-912a-4e81f5734d3b", "ParticipantId": "7810b1de-cca8-4153-b522-2498416255af", "ParticipantRole": "CUSTOMER", "DisplayName": "Customer", "EventType": "application/vnd.amazonaws.connect.event.participant.left", "Time": { "AbsoluteTime": "2024-03-14T19:40:00.614Z" } } }] }

示例 COMPLETED 事件

  • EventType: 已完成

  • 如果分析成功完成,则在实时联系人分析会话结束时发布。

{ "Version": "2.0.0", "Channel": "CHAT", "AccountId": "123456789012", // your AWS account ID "InstanceId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", // your Amazon Connect instance ID "ContactId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222", // the ID of the contact "StreamingEventType": "COMPLETED", "StreamingEventSettings": { "LanguageCode": "en-US", // the language code of the contact "Output": "RedactedAndRaw", "RedactionTypes": ["PII"], "RedactionTypesMetadata": { "PII": { "RedactionMaskMode": "PII" } } } }

示例 FAILED 事件

  • EventType: 失败

  • 如果分析失败,则在实时联系人分析会话结束时发布。

{ "Version": "2.0.0", "Channel": "CHAT", "AccountId": "123456789012", // your AWS account ID "InstanceId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", // your Amazon Connect instance ID "ContactId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222", // the ID of the contact "StreamingEventType": "FAILED", "StreamingEventSettings": { "LanguageCode": "en-US", "Output": "RedactedAndRaw", "RedactionTypes": ["PII"], "RedactionTypesMetadata": { "PII": { "RedactionMaskMode": "PII" } } } }