

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# Contact Lens を使用して通話を分析するための会話分析セグメントストリームのサンプル
<a name="sample-real-time-contact-analysis-segment-stream"></a>

このトピックでは、音声コンタクト中に発生する可能性のある STARTED、SEGMENTS、COMPLETED、FAILED イベントのサンプルセグメントストリームを示します。

## サンプルの STARTED イベント
<a name="sample-started-event"></a>
+ EventType: STARTED
+ 会話分析セッションの開始時に公開されます。

```
{
    "Version": "1.0.0",
    "Channel": "VOICE",
    "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
    "LanguageCode": "en-US", // the language code of the contact
    "EventType": "STARTED"
}
```

## サンプルの SEGMENTS イベント
<a name="sample-segments-event"></a>
+ EventType: SEGMENTS
+ 会話分析セッション中に公開されます。これらのイベントには、セグメントのリストと分析情報が含まれます。セグメントのリストには、「`Utterance`」、「`Transcript`」、「`Categories`」または「`PostContactSummary`」セグメントが含まれる場合があります。

```
{
    "Version": "1.0.0",
    "Channel": "VOICE",
    "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
    "LanguageCode": "en-US", // the language code of the contact
    "EventType": "SEGMENTS",
    "Segments": [
        {
            "Utterance": {
                "Id": "7b48ca3d-73d3-443a-bf34-a9e8fcc01747",
                "TranscriptId": "121d1581-905f-4169-9804-b841bb4df04a",
                "ParticipantId": "AGENT",
                "ParticipantRole": "AGENT",
                "PartialContent": "Hello, thank you for calling Example Corp. My name is Adam.",
                "BeginOffsetMillis": 19010,
                "EndOffsetMillis": 22980
            }
        },
        {
            "Utterance": {
                "Id": "75acb743-2154-486b-aaeb-c960ae290e88",
                "TranscriptId": "121d1581-905f-4169-9804-b841bb4df04a",
                "ParticipantId": "AGENT",
                "ParticipantRole": "AGENT",
                "PartialContent": "How can I help you?",
                "BeginOffsetMillis": 23000,
                "EndOffsetMillis": 24598
            }
        },
        {
            "Transcript": {
                "Id": "121d1581-905f-4169-9804-b841bb4df04a",
                "ParticipantId": "AGENT",
                "ParticipantRole": "AGENT",
                "Content": "Hello, thank you for calling Example Corp. My name is Adam. How can I help you?",
                "BeginOffsetMillis": 19010,
                "EndOffsetMillis": 24598,
                "Sentiment": "NEUTRAL"
            }
        },
        {
            "Transcript": {
                "Id": "4295e927-43aa-4447-bbfc-8fccc2027530",
                "ParticipantId": "CUSTOMER",
                "ParticipantRole": "CUSTOMER",
                "Content": "I'm having trouble submitting the application, number AX876293 on the portal. I tried but couldn't connect to my POC on the portal. So, I'm calling on this toll free number",
                "BeginOffsetMillis": 19010,
                "EndOffsetMillis": 22690,
                "Sentiment": "NEGATIVE",
                "IssuesDetected": [
                    {
                        "CharacterOffsets": {
                            "BeginOffsetChar": 0,
                            "EndOffsetChar": 81
                        }
                    }
                ]
            }
        },
        {
            "Categories": {
                "MatchedCategories": [
                    "CreditCardRelated",
                    "CardBrokenIssue"
                ],
                "MatchedDetails": {
                    "CreditCardRelated": {
                        "PointsOfInterest": [
                            {
                                "BeginOffsetMillis": 19010,
                                "EndOffsetMillis": 22690
                            }
                        ]
                    },
                    "CardBrokenIssue": {
                        "PointsOfInterest": [
                            {
                                "BeginOffsetMillis": 25000,
                                "EndOffsetMillis": 29690
                            }
                        ]
                    }
                }
            }
        },
        {
            "PostContactSummary": {
                "Content": "Customer contacted Example Corp because of an issue with their application",
                "Status": "COMPLETED"
            }
        }
    ]
}
```

## サンプルの COMPLETED イベント
<a name="sample-completed-event"></a>
+ EventType: COMPLETED
+ 分析が正常に完了した場合、問い合わせ分析セッションの終了時に公開されます。

```
{
    "Version": "1.0.0",
    "Channel": "VOICE",
    "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
    "LanguageCode": "en-US", // the language code of the contact
    "EventType": "COMPLETED"
}
```

## サンプルの FAILED イベント
<a name="sample-failed-event"></a>
+ EventType: FAILED
+ 分析が失敗した場合、会話分析セッションの終了時に公開されます。

```
{
    "Version": "1.0.0",
    "Channel": "VOICE",
    "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
    "LanguageCode": "en-US", // the language code of the contact
    "EventType": "FAILED"
}
```