聊天:實時聯繫人分析細分流樣本 - 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" } } } }