listRealtimeContactAnalysisSegmentsV2 method
Provides a list of analysis segments for a real-time chat analysis session. This API supports CHAT channels only.
May throw AccessDeniedException.
May throw InternalServiceException.
May throw InvalidRequestException.
May throw OutputTypeNotFoundException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter contactId :
The identifier of the contact in this instance of Connect Customer.
Parameter instanceId :
The identifier of the Connect Customer instance. You can find
the instance ID in the Amazon Resource Name (ARN) of the instance.
Parameter outputType :
The Contact Lens output type to be returned.
Parameter segmentTypes :
Enum with segment types . Each value corresponds to a segment type
returned in the segments list of the API. Each segment type has its own
structure. Different channels may have different sets of supported segment
types.
Parameter maxResults :
The maximum number of results to return per page.
Parameter nextToken :
The token for the next set of results. Use the value returned in the
previous response in the next request to retrieve the next set of results.
Implementation
Future<ListRealtimeContactAnalysisSegmentsV2Response>
listRealtimeContactAnalysisSegmentsV2({
required String contactId,
required String instanceId,
required RealTimeContactAnalysisOutputType outputType,
required List<RealTimeContactAnalysisSegmentType> segmentTypes,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final $payload = <String, dynamic>{
'OutputType': outputType.value,
'SegmentTypes': segmentTypes.map((e) => e.value).toList(),
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/contact/list-real-time-analysis-segments-v2/${Uri.encodeComponent(instanceId)}/${Uri.encodeComponent(contactId)}',
exceptionFnMap: _exceptionFns,
);
return ListRealtimeContactAnalysisSegmentsV2Response.fromJson(response);
}