2024/01/12 - Amazon Connect Service - 6 updated api methods
Changes Supervisor Barge for Chat is now supported through the MonitorContact API.
{'ParticipantDetails': {'ParticipantRole': {'SUPERVISOR'}}}
Adds a new participant into an on-going chat contact. For more information, see Customize chat flow experiences by integrating custom participants .
See also: AWS API Documentation
Request Syntax
client.create_participant( InstanceId='string', ContactId='string', ClientToken='string', ParticipantDetails={ 'ParticipantRole': 'AGENT'|'CUSTOMER'|'SYSTEM'|'CUSTOM_BOT'|'SUPERVISOR', 'DisplayName': 'string' } )
string
[REQUIRED]
The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
string
[REQUIRED]
The identifier of the contact in this instance of Amazon Connect. Only contacts in the CHAT channel are supported.
string
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs .
This field is autopopulated if not provided.
dict
[REQUIRED]
Information identifying the participant.
Warning
The only Valid value for ParticipantRole is CUSTOM_BOT .
DisplayName is Required .
ParticipantRole (string) --
The role of the participant being added.
DisplayName (string) --
The display name of the participant.
dict
Response Syntax
{ 'ParticipantCredentials': { 'ParticipantToken': 'string', 'Expiry': 'string' }, 'ParticipantId': 'string' }
Response Structure
(dict) --
ParticipantCredentials (dict) --
The token used by the chat participant to call CreateParticipantConnection . The participant token is valid for the lifetime of a chat participant.
ParticipantToken (string) --
The token used by the chat participant to call CreateParticipantConnection . The participant token is valid for the lifetime of a chat participant.
Expiry (string) --
The expiration of the token. It's specified in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.
ParticipantId (string) --
The identifier for a chat participant. The participantId for a chat participant is the same throughout the chat lifecycle.
{'AttributeType': {'ENHANCED_CHAT_MONITORING'}}Response
{'Attribute': {'AttributeType': {'ENHANCED_CHAT_MONITORING'}}}
This API is in preview release for Amazon Connect and is subject to change.
Describes the specified instance attribute.
See also: AWS API Documentation
Request Syntax
client.describe_instance_attribute( InstanceId='string', AttributeType='INBOUND_CALLS'|'OUTBOUND_CALLS'|'CONTACTFLOW_LOGS'|'CONTACT_LENS'|'AUTO_RESOLVE_BEST_VOICES'|'USE_CUSTOM_TTS_VOICES'|'EARLY_MEDIA'|'MULTI_PARTY_CONFERENCE'|'HIGH_VOLUME_OUTBOUND'|'ENHANCED_CONTACT_MONITORING'|'ENHANCED_CHAT_MONITORING' )
string
[REQUIRED]
The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
string
[REQUIRED]
The type of attribute.
dict
Response Syntax
{ 'Attribute': { 'AttributeType': 'INBOUND_CALLS'|'OUTBOUND_CALLS'|'CONTACTFLOW_LOGS'|'CONTACT_LENS'|'AUTO_RESOLVE_BEST_VOICES'|'USE_CUSTOM_TTS_VOICES'|'EARLY_MEDIA'|'MULTI_PARTY_CONFERENCE'|'HIGH_VOLUME_OUTBOUND'|'ENHANCED_CONTACT_MONITORING'|'ENHANCED_CHAT_MONITORING', 'Value': 'string' } }
Response Structure
(dict) --
Attribute (dict) --
The type of attribute.
AttributeType (string) --
The type of attribute.
Value (string) --
The value of the attribute.
{'Attributes': {'AttributeType': {'ENHANCED_CHAT_MONITORING'}}}
This API is in preview release for Amazon Connect and is subject to change.
Returns a paginated list of all attribute types for the given instance.
See also: AWS API Documentation
Request Syntax
client.list_instance_attributes( InstanceId='string', NextToken='string', MaxResults=123 )
string
[REQUIRED]
The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
string
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.
integer
The maximum number of results to return per page.
dict
Response Syntax
{ 'Attributes': [ { 'AttributeType': 'INBOUND_CALLS'|'OUTBOUND_CALLS'|'CONTACTFLOW_LOGS'|'CONTACT_LENS'|'AUTO_RESOLVE_BEST_VOICES'|'USE_CUSTOM_TTS_VOICES'|'EARLY_MEDIA'|'MULTI_PARTY_CONFERENCE'|'HIGH_VOLUME_OUTBOUND'|'ENHANCED_CONTACT_MONITORING'|'ENHANCED_CHAT_MONITORING', 'Value': 'string' }, ], 'NextToken': 'string' }
Response Structure
(dict) --
Attributes (list) --
The attribute types.
(dict) --
A toggle for an individual feature at the instance level.
AttributeType (string) --
The type of attribute.
Value (string) --
The value of the attribute.
NextToken (string) --
If there are additional results, this is the token for the next set of results.
{'Segments': {'Attachments': {'ParticipantRole': {'SUPERVISOR'}}, 'Event': {'ParticipantRole': {'SUPERVISOR'}}, 'Transcript': {'ParticipantRole': {'SUPERVISOR'}}}}
Provides a list of analysis segments for a real-time analysis session.
See also: AWS API Documentation
Request Syntax
client.list_realtime_contact_analysis_segments_v2( InstanceId='string', ContactId='string', MaxResults=123, NextToken='string', OutputType='Raw'|'Redacted', SegmentTypes=[ 'Transcript'|'Categories'|'Issues'|'Event'|'Attachments', ] )
string
[REQUIRED]
The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
string
[REQUIRED]
The identifier of the contact in this instance of Amazon Connect.
integer
The maximum number of results to return per page.
string
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.
string
[REQUIRED]
The Contact Lens output type to be returned.
list
[REQUIRED]
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.
(string) --
dict
Response Syntax
{ 'Channel': 'VOICE'|'CHAT', 'Status': 'IN_PROGRESS'|'FAILED'|'COMPLETED', 'Segments': [ { 'Transcript': { 'Id': 'string', 'ParticipantId': 'string', 'ParticipantRole': 'AGENT'|'CUSTOMER'|'SYSTEM'|'CUSTOM_BOT'|'SUPERVISOR', 'DisplayName': 'string', 'Content': 'string', 'ContentType': 'string', 'Time': { 'AbsoluteTime': datetime(2015, 1, 1) }, 'Redaction': { 'CharacterOffsets': [ { 'BeginOffsetChar': 123, 'EndOffsetChar': 123 }, ] }, 'Sentiment': 'POSITIVE'|'NEGATIVE'|'NEUTRAL' }, 'Categories': { 'MatchedDetails': { 'string': { 'PointsOfInterest': [ { 'TranscriptItems': [ { 'Id': 'string', 'CharacterOffsets': { 'BeginOffsetChar': 123, 'EndOffsetChar': 123 } }, ] }, ] } } }, 'Issues': { 'IssuesDetected': [ { 'TranscriptItems': [ { 'Content': 'string', 'Id': 'string', 'CharacterOffsets': { 'BeginOffsetChar': 123, 'EndOffsetChar': 123 } }, ] }, ] }, 'Event': { 'Id': 'string', 'ParticipantId': 'string', 'ParticipantRole': 'AGENT'|'CUSTOMER'|'SYSTEM'|'CUSTOM_BOT'|'SUPERVISOR', 'DisplayName': 'string', 'EventType': 'string', 'Time': { 'AbsoluteTime': datetime(2015, 1, 1) } }, 'Attachments': { 'Id': 'string', 'ParticipantId': 'string', 'ParticipantRole': 'AGENT'|'CUSTOMER'|'SYSTEM'|'CUSTOM_BOT'|'SUPERVISOR', 'DisplayName': 'string', 'Attachments': [ { 'AttachmentName': 'string', 'ContentType': 'string', 'AttachmentId': 'string', 'Status': 'APPROVED'|'REJECTED'|'IN_PROGRESS' }, ], 'Time': { 'AbsoluteTime': datetime(2015, 1, 1) } } }, ], 'NextToken': 'string' }
Response Structure
(dict) --
Channel (string) --
The channel of the contact. Voice will not be returned.
Status (string) --
Status of real-time contact analysis.
Segments (list) --
An analyzed transcript or category.
(dict) --
An analyzed segment for a real-time analysis session.
Transcript (dict) --
The analyzed transcript segment.
Id (string) --
The identifier of the transcript.
ParticipantId (string) --
The identifier of the participant.
ParticipantRole (string) --
The role of the participant. For example, is it a customer, agent, or system.
DisplayName (string) --
The display name of the participant.
Content (string) --
The content of the transcript. Can be redacted.
ContentType (string) --
The type of content of the item. For example, text/plain .
Time (dict) --
Field describing the time of the event. It can have different representations of time.
AbsoluteTime (datetime) --
Time represented in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.
Redaction (dict) --
Object describing redaction that was applied to the transcript. If transcript has the field it means part of the transcript was redacted.
CharacterOffsets (list) --
List of character intervals each describing a part of the text that was redacted. For OutputType.Raw , part of the original text that contains data that can be redacted. For OutputType.Redacted , part of the string with redaction tag.
(dict) --
Begin and end offsets for a part of text.
BeginOffsetChar (integer) --
The beginning of the character interval.
EndOffsetChar (integer) --
The end of the character interval.
Sentiment (string) --
The sentiment detected for this piece of transcript.
Categories (dict) --
The matched category rules.
MatchedDetails (dict) --
Map between the name of the matched rule and RealTimeContactAnalysisCategoryDetails.
(string) --
(dict) --
Provides information about the category rule that was matched.
PointsOfInterest (list) --
List of PointOfInterest - objects describing a single match of a rule.
(dict) --
The section of the contact transcript segment that category rule was detected.
TranscriptItems (list) --
List of the transcript items (segments) that are associated with a given point of interest.
(dict) --
Transcript representation containing Id and list of character intervals that are associated with analysis data. For example, this object within a RealTimeContactAnalysisPointOfInterest in Category.MatchedDetails would have character interval describing part of the text that matched category.
Id (string) --
Transcript identifier. Matches the identifier from one of the TranscriptSegments.
CharacterOffsets (dict) --
List of character intervals within transcript content/text.
BeginOffsetChar (integer) --
The beginning of the character interval.
EndOffsetChar (integer) --
The end of the character interval.
Issues (dict) --
Segment type containing a list of detected issues.
IssuesDetected (list) --
List of the issues detected.
(dict) --
Potential issues that are detected based on an artificial intelligence analysis of each turn in the conversation.
TranscriptItems (list) --
List of the transcript items (segments) that are associated with a given issue.
(dict) --
Transcript representation containing Id, Content and list of character intervals that are associated with analysis data. For example, this object within an issue detected would describe both content that contains identified issue and intervals where that content is taken from.
Content (string) --
Part of the transcript content that contains identified issue. Can be redacted
Id (string) --
Transcript identifier. Matches the identifier from one of the TranscriptSegments.
CharacterOffsets (dict) --
Begin and end offsets for a part of text.
BeginOffsetChar (integer) --
The beginning of the character interval.
EndOffsetChar (integer) --
The end of the character interval.
Event (dict) --
Segment type describing a contact event.
Id (string) --
The identifier of the contact event.
ParticipantId (string) --
The identifier of the participant.
ParticipantRole (string) --
The role of the participant. For example, is it a customer, agent, or system.
DisplayName (string) --
The display name of the participant. Can be redacted.
EventType (string) --
Type of the event. For example, application/vnd.amazonaws.connect.event.participant.left .
Time (dict) --
Field describing the time of the event. It can have different representations of time.
AbsoluteTime (datetime) --
Time represented in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.
Attachments (dict) --
The analyzed attachments.
Id (string) --
The identifier of the segment.
ParticipantId (string) --
The identifier of the participant.
ParticipantRole (string) --
The role of the participant. For example, is it a customer, agent, or system.
DisplayName (string) --
The display name of the participant. Can be redacted.
Attachments (list) --
List of objects describing an individual attachment.
(dict) --
Object that describes attached file.
AttachmentName (string) --
A case-sensitive name of the attachment being uploaded. Can be redacted.
ContentType (string) --
Describes the MIME file type of the attachment. For a list of supported file types, see Feature specifications in the Amazon Connect Administrator Guide .
AttachmentId (string) --
A unique identifier for the attachment.
Status (string) --
Status of the attachment.
Time (dict) --
Field describing the time of the event. It can have different representations of time.
AbsoluteTime (datetime) --
Time represented in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.
NextToken (string) --
If there are additional results, this is the token for the next set of results.
{'SearchCriteria': {'ContactAnalysis': {'Transcript': {'Criteria': {'ParticipantRole': {'SUPERVISOR'}}}}}}
Searches contacts in an Amazon Connect instance.
See also: AWS API Documentation
Request Syntax
client.search_contacts( InstanceId='string', TimeRange={ 'Type': 'INITIATION_TIMESTAMP'|'SCHEDULED_TIMESTAMP'|'CONNECTED_TO_AGENT_TIMESTAMP'|'DISCONNECT_TIMESTAMP', 'StartTime': datetime(2015, 1, 1), 'EndTime': datetime(2015, 1, 1) }, SearchCriteria={ 'AgentIds': [ 'string', ], 'AgentHierarchyGroups': { 'L1Ids': [ 'string', ], 'L2Ids': [ 'string', ], 'L3Ids': [ 'string', ], 'L4Ids': [ 'string', ], 'L5Ids': [ 'string', ] }, 'Channels': [ 'VOICE'|'CHAT'|'TASK', ], 'ContactAnalysis': { 'Transcript': { 'Criteria': [ { 'ParticipantRole': 'AGENT'|'CUSTOMER'|'SYSTEM'|'CUSTOM_BOT'|'SUPERVISOR', 'SearchText': [ 'string', ], 'MatchType': 'MATCH_ALL'|'MATCH_ANY' }, ], 'MatchType': 'MATCH_ALL'|'MATCH_ANY' } }, 'InitiationMethods': [ 'INBOUND'|'OUTBOUND'|'TRANSFER'|'QUEUE_TRANSFER'|'CALLBACK'|'API'|'DISCONNECT'|'MONITOR'|'EXTERNAL_OUTBOUND', ], 'QueueIds': [ 'string', ], 'SearchableContactAttributes': { 'Criteria': [ { 'Key': 'string', 'Values': [ 'string', ] }, ], 'MatchType': 'MATCH_ALL'|'MATCH_ANY' } }, MaxResults=123, NextToken='string', Sort={ 'FieldName': 'INITIATION_TIMESTAMP'|'SCHEDULED_TIMESTAMP'|'CONNECTED_TO_AGENT_TIMESTAMP'|'DISCONNECT_TIMESTAMP'|'INITIATION_METHOD'|'CHANNEL', 'Order': 'ASCENDING'|'DESCENDING' } )
string
[REQUIRED]
The identifier of Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
dict
[REQUIRED]
Time range that you want to search results.
Type (string) -- [REQUIRED]
The type of timestamp to search.
StartTime (datetime) -- [REQUIRED]
The start time of the time range.
EndTime (datetime) -- [REQUIRED]
The end time of the time range.
dict
The search criteria to be used to return contacts.
AgentIds (list) --
The identifiers of agents who handled the contacts.
(string) --
AgentHierarchyGroups (dict) --
The agent hierarchy groups of the agent at the time of handling the contact.
L1Ids (list) --
The identifiers for level 1 hierarchy groups.
(string) --
L2Ids (list) --
The identifiers for level 2 hierarchy groups.
(string) --
L3Ids (list) --
The identifiers for level 3 hierarchy groups.
(string) --
L4Ids (list) --
The identifiers for level 4 hierarchy groups.
(string) --
L5Ids (list) --
The identifiers for level 5 hierarchy groups.
(string) --
Channels (list) --
The list of channels associated with contacts.
(string) --
ContactAnalysis (dict) --
Search criteria based on analysis outputs from Amazon Connect Contact Lens.
Transcript (dict) --
Search criteria based on transcript analyzed by Amazon Connect Contact Lens.
Criteria (list) -- [REQUIRED]
The list of search criteria based on Contact Lens conversational analytics transcript.
(dict) --
A structure that defines search criteria base on words or phrases, participants in the Contact Lens conversational analytics transcript.
ParticipantRole (string) -- [REQUIRED]
The participant role in a transcript
SearchText (list) -- [REQUIRED]
The words or phrases used to search within a transcript.
(string) --
MatchType (string) -- [REQUIRED]
The match type combining search criteria using multiple search texts in a transcript criteria.
MatchType (string) --
The match type combining search criteria using multiple transcript criteria.
InitiationMethods (list) --
The list of initiation methods associated with contacts.
(string) --
QueueIds (list) --
The list of queue IDs associated with contacts.
(string) --
SearchableContactAttributes (dict) --
The search criteria based on user-defined contact attributes that have been configured for contact search. For more information, see Search by customer contact attributes in the Amazon Connect Administrator Guide .
Warning
To use SearchableContactAttributes in a search request, the GetContactAttributes action is required to perform an API request. For more information, see https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonconnect.html#amazonconnect-actions-as-permissions Actions defined by Amazon Connect.
Criteria (list) -- [REQUIRED]
The list of criteria based on user-defined contact attributes that are configured for contact search.
(dict) --
The search criteria based on user-defned contact attribute key and values to search on.
Key (string) -- [REQUIRED]
The key containing a searchable user-defined contact attribute.
Values (list) -- [REQUIRED]
The list of values to search for within a user-defined contact attribute.
(string) --
MatchType (string) --
The match type combining search criteria using multiple searchable contact attributes.
integer
The maximum number of results to return per page.
string
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.
dict
Specifies a field to sort by and a sort order.
FieldName (string) -- [REQUIRED]
The name of the field on which to sort.
Order (string) -- [REQUIRED]
An ascending or descending sort.
dict
Response Syntax
{ 'Contacts': [ { 'Arn': 'string', 'Id': 'string', 'InitialContactId': 'string', 'PreviousContactId': 'string', 'InitiationMethod': 'INBOUND'|'OUTBOUND'|'TRANSFER'|'QUEUE_TRANSFER'|'CALLBACK'|'API'|'DISCONNECT'|'MONITOR'|'EXTERNAL_OUTBOUND', 'Channel': 'VOICE'|'CHAT'|'TASK', 'QueueInfo': { 'Id': 'string', 'EnqueueTimestamp': datetime(2015, 1, 1) }, 'AgentInfo': { 'Id': 'string', 'ConnectedToAgentTimestamp': datetime(2015, 1, 1) }, 'InitiationTimestamp': datetime(2015, 1, 1), 'DisconnectTimestamp': datetime(2015, 1, 1), 'ScheduledTimestamp': datetime(2015, 1, 1) }, ], 'NextToken': 'string', 'TotalCount': 123 }
Response Structure
(dict) --
Contacts (list) --
Information about the contacts.
(dict) --
Information of returned contact.
Arn (string) --
The Amazon Resource Name (ARN) of the contact.
Id (string) --
The identifier of the contact summary.
InitialContactId (string) --
If this contact is related to other contacts, this is the ID of the initial contact.
PreviousContactId (string) --
If this contact is not the first contact, this is the ID of the previous contact.
InitiationMethod (string) --
Indicates how the contact was initiated.
Channel (string) --
How the contact reached your contact center.
QueueInfo (dict) --
If this contact was queued, this contains information about the queue.
Id (string) --
The unique identifier for the queue.
EnqueueTimestamp (datetime) --
The timestamp when the contact was added to the queue.
AgentInfo (dict) --
Information about the agent who accepted the contact.
Id (string) --
The identifier of the agent who accepted the contact.
ConnectedToAgentTimestamp (datetime) --
The timestamp when the contact was connected to the agent.
InitiationTimestamp (datetime) --
The date and time this contact was initiated, in UTC time. For INBOUND , this is when the contact arrived. For OUTBOUND , this is when the agent began dialing. For CALLBACK , this is when the callback contact was created. For TRANSFER and QUEUE_TRANSFER , this is when the transfer was initiated. For API, this is when the request arrived. For EXTERNAL_OUTBOUND , this is when the agent started dialing the external participant. For MONITOR , this is when the supervisor started listening to a contact.
DisconnectTimestamp (datetime) --
The timestamp when the customer endpoint disconnected from Amazon Connect.
ScheduledTimestamp (datetime) --
The timestamp, in Unix epoch time format, at which to start running the inbound flow.
NextToken (string) --
If there are additional results, this is the token for the next set of results.
TotalCount (integer) --
The total number of contacts which matched your search query.
{'AttributeType': {'ENHANCED_CHAT_MONITORING'}}
This API is in preview release for Amazon Connect and is subject to change.
Updates the value for the specified attribute type.
See also: AWS API Documentation
Request Syntax
client.update_instance_attribute( InstanceId='string', AttributeType='INBOUND_CALLS'|'OUTBOUND_CALLS'|'CONTACTFLOW_LOGS'|'CONTACT_LENS'|'AUTO_RESOLVE_BEST_VOICES'|'USE_CUSTOM_TTS_VOICES'|'EARLY_MEDIA'|'MULTI_PARTY_CONFERENCE'|'HIGH_VOLUME_OUTBOUND'|'ENHANCED_CONTACT_MONITORING'|'ENHANCED_CHAT_MONITORING', Value='string' )
string
[REQUIRED]
The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
string
[REQUIRED]
The type of attribute.
Note
Only allowlisted customers can consume USE_CUSTOM_TTS_VOICES. To access this feature, contact Amazon Web Services Support for allowlisting.
string
[REQUIRED]
The value for the attribute. Maximum character limit is 100.
None