Skip to main content

contacts

Creates, updates, deletes, gets or lists a contacts resource.

Overview

Namecontacts
TypeResource
Idaws.connect.contacts

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
additional_email_recipientsobjectList of additional email addresses for an email contact.
agent_infoobjectInformation about the agent who accepted the contact.
answering_machine_detection_statusstringIndicates how an outbound campaign call is actually disposed if the contact is connected to Connect Customer. (ANSWERED, UNDETECTED, ERROR, HUMAN_ANSWERED, SIT_TONE_DETECTED, SIT_TONE_BUSY, SIT_TONE_INVALID_NUMBER, FAX_MACHINE_DETECTED, VOICEMAIL_BEEP, VOICEMAIL_NO_BEEP, AMD_UNRESOLVED, AMD_UNANSWERED, AMD_ERROR, AMD_NOT_APPLICABLE)
arnstringThe Amazon Resource Name (ARN) for the contact.
attributesobjectThe attributes of the contact.
campaignobjectInformation associated with a campaign.
channelstringHow the contact reached your contact center. (VOICE, CHAT, TASK, EMAIL)
chat_metricsobjectInformation about how agent, bot, and customer interact in a chat contact.
connected_to_system_timestampstring (date-time)The timestamp when customer endpoint connected to Connect Customer.
contact_association_idstringThis is the root contactId which is used as a unique identifier for all subsequent contacts in a contact tree.
contact_detailsobjectA map of string key/value pairs that contain user-defined attributes which are lightly typed within the contact. This object is used only for task contacts.
contact_evaluationsobjectInformation about the contact evaluations where the key is the FormId, which is a unique identifier for the form.
customerobjectInformation about the Customer on the contact.
customer_endpointobjectThe customer or external third party participant endpoint.
customer_idstringThe customer's identification number. For example, the CustomerId may be a customer number from your CRM. You can create a Lambda function to pull the unique customer ID of the caller from your CRM system. If you enable Connect Customer Voice ID capability, this attribute is populated with the CustomerSpeakerId of the caller.
customer_voice_activityobjectInformation about customer’s voice activity.
descriptionstringThe description of the contact.
disconnect_detailsobjectInformation about the call disconnect experience.
disconnect_reasonstringThe disconnect reason for the contact. For a list and description of all the possible disconnect reasons by channel, see DisconnectReason under ContactTraceRecord in the Connect Customer Administrator Guide.
disconnect_timestampstring (date-time)The date and time that the customer endpoint disconnected from the current contact, in UTC time. In transfer scenarios, the DisconnectTimestamp of the previous contact indicates the date and time when that contact ended.
global_resiliency_metadataobjectInformation about the global resiliency configuration for the contact, including traffic distribution details.
idstringThe identifier for the contact.
initial_contact_idstringIf this contact is related to other contacts, this is the ID of the initial contact.
initiation_methodstringIndicates how the contact was initiated. (INBOUND, OUTBOUND, TRANSFER, QUEUE_TRANSFER, CALLBACK, API, DISCONNECT, MONITOR, EXTERNAL_OUTBOUND, WEBRTC_API, AGENT_REPLY, FLOW)
initiation_timestampstring (date-time)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.
last_paused_timestampstring (date-time)The timestamp when the contact was last paused.
last_resumed_timestampstring (date-time)The timestamp when the contact was last resumed.
last_update_timestampstring (date-time)The timestamp when contact was last updated.
namestringThe name of the contact.
next_contactsarrayList of next contact entries for the contact.
outbound_strategyobjectInformation about the outbound strategy.
previous_contact_idstringIf this contact is not the first contact, this is the ID of the previous contact.
quality_metricsobjectInformation about the quality of the participant's media connection.
queue_infoobjectIf this contact was queued, this contains information about the queue.
queue_priorityinteger (int64)An integer that represents the queue priority to be applied to the contact (lower priorities are routed preferentially). Cannot be specified if the QueueTimeAdjustmentSeconds is specified. Must be statically defined, must be larger than zero, and a valid integer value. Default Value is 5.
queue_time_adjustment_secondsintegerAn integer that represents the queue time adjust to be applied to the contact, in seconds (longer / larger queue time are routed preferentially). Cannot be specified if the QueuePriority is specified. Must be statically defined and a valid integer value.
recordingsarrayIf recording was enabled, this is information about the recordings.
related_contact_idstringThe contactId that is related to this contact.
ring_start_timestampstring (date-time)The timestamp when ringing started for a campaign call.
routing_criteriaobjectLatest routing criteria on the contact.
scheduled_timestampstring (date-time)The timestamp, in Unix epoch time format, at which to start running the inbound flow.
segment_attributesobjectA set of system defined key-value pairs stored on individual contact segments using an attribute map. The attributes are standard Connect Customer attributes and can be accessed in flows. Attribute keys can include only alphanumeric, -, and _ characters. This field can be used to show channel subtype. For example, connect:Guide or connect:SMS.
system_endpointobjectThe system endpoint. For INBOUND, this is the phone number or email address that the customer dialed. For OUTBOUND and EXTERNAL_OUTBOUND, this is the outbound caller ID number assigned to the outbound queue that is used to dial the customer. For callback, this shows up as Softphone for calls handled by agents with softphone.
tagsobjectTags associated with the contact. This contains both Amazon Web Services generated and user-defined tags.
task_template_infoobjectIf this contact was created using a task template, this contains information about the task template.
total_pause_countintegerTotal pause count for a contact.
total_pause_duration_in_secondsintegerTotal pause duration for a contact in seconds.
wisdom_infoobjectInformation about Connect Customer Wisdom.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_contactselectinstance_id, contact_id, regionThis API is in preview release for Connect Customer and is subject to change. Describes the specified contact. Use cases Following are common uses cases for this API: Retrieve contact information such as the caller's phone number and the specific number the caller dialed to integrate into custom monitoring or custom agent experience solutions. Detect when a customer chat session disconnects due to a network issue on the agent's end. Use the DisconnectReason field in the ContactTraceRecord to detect this event and then re-queue the chat for followup. Identify after contact work (ACW) duration and call recordings information when a COMPLETED event is received by using the contact event stream. Important things to know SystemEndpoint is not populated for contacts with initiation method of MONITOR, QUEUE_TRANSFER, or CALLBACK Contact information remains available in Connect Customer for 24 months from the InitiationTimestamp, and then it is deleted. Only contact information that is available in Connect Customer is returned by this API. Endpoints: See Connect Customer endpoints and quotas.
search_contactsselectregionSearches contacts in an Connect Customer instance.
create_contactinsertregion, InstanceId, InitiationMethodOnly the VOICE, EMAIL, and TASK channels are supported. For VOICE: The supported initiation method is TRANSFER. The contacts created with this initiation method have a subtype connect:ExternalAudio. For EMAIL: The supported initiation methods are OUTBOUND, AGENT_REPLY, and FLOW. For TASK: The supported initiation method is API. Contacts created with this API have a sub-type of connect:ExternalTask. Creates a new VOICE, EMAIL, or TASK contact. After a contact is created, you can move it to the desired state by using the InitiateAs parameter. While you can use API to create task contacts that are in the COMPLETED state, you must contact Amazon Web Services Support before using it for bulk import use cases. Bulk import causes your requests to be throttled or fail if your CreateContact limits aren't high enough.
update_contact_scheduleupdateregion, InstanceId, ContactId, ScheduledTimeUpdates the scheduled time of a task contact that is already scheduled.
update_contactupdateinstance_id, contact_id, regionThis API is in preview release for Connect Customer and is subject to change. Adds or updates user-defined contact information associated with the specified contact. At least one field to be updated must be present in the request. You can add or update user-defined contact information for both ongoing and completed contacts.
update_queue_max_contactsupdateinstance_id, queue_id, regionUpdates the maximum number of contacts allowed in a queue before it is considered full.
delete_contact_datadeleteinstance_id, contact_id, regionDeletes the specified fields containing personally identifiable information (PII) from a contact in the specified Connect Customer instance. We redact PII (such as customer endpoints, additional email recipients, and the email subject) from the contact and its associated contact trace record (CTR). The contact must be in a terminated state. This deletion is permanent and cannot be undone. Performing this operation permanently deletes the specified PII. There is no retention period; you cannot recover the data after deletion. We remove only the fields that Connect Customer identifies and stores as PII. Any PII that you place in fields outside the scope of this operation remains your responsibility to remove.
start_contact_evaluationexecinstance_id, region, ContactId, EvaluationFormIdStarts an empty evaluation in the specified Connect Customer instance, using the given evaluation form for the particular contact. The evaluation form version used for the contact evaluation corresponds to the currently activated version. If no version is activated for the evaluation form, the contact evaluation cannot be started. Evaluations created through the public API do not contain answer values suggested from automation.
resume_contact_recordingexecregion, InstanceId, ContactId, InitialContactIdWhen a contact is being recorded, and the recording has been suspended using SuspendContactRecording, this API resumes recording whatever recording is selected in the flow configuration: call, screen, or both. If only call recording or only screen recording is enabled, then it would resume. Voice and screen recordings are supported.
start_contact_conversational_analytics_jobexecinstance_id, contact_id, region, AnalyticsModes, AnalyticsConfigurationStarts a Contact Lens post-call analytics job for the specified contact. This API runs Conversational Analytics post-contact analysis on a voice recording that is already attached to the contact, generating transcription, sentiment analysis, redaction, and summarization results based on the provided configuration. A voice recording must already be attached to the contact before calling this API. Use CreateAttachedFile to attach a recording from an S3 source URI. For example, you can call CreateContact, then CreateAttachedFile, then StartContactConversationalAnalyticsJob to create a contact, attach a recording, and run post-call analytics.
start_contact_media_processingexecregionEnables in-flight message processing for an ongoing chat session. Message processing will stay active for the rest of the chat, even if an individual contact segment ends.
start_contact_recordingexecregion, InstanceId, ContactId, InitialContactId, VoiceRecordingConfigurationStarts recording the contact: If the API is called before the agent joins the call, recording starts when the agent joins the call. If the API is called after the agent joins the call, recording starts at the time of the API call. StartContactRecording is a one-time action. For example, if you use StopContactRecording to stop recording an ongoing call, you can't use StartContactRecording to restart it. For scenarios where the recording has started and you want to suspend and resume it, such as when collecting sensitive information (for example, a credit card number), use SuspendContactRecording and ResumeContactRecording. You can use this API to override the recording behavior configured in the Set recording behavior block. Only voice recordings are supported at this time.
start_contact_streamingexecregion, InstanceId, ContactId, ChatStreamingConfiguration, ClientTokenInitiates real-time message streaming for a new chat contact. For more information about message streaming, see Enable real-time chat message streaming in the Connect Customer Administrator Guide. For more information about chat, see the following topics in the Connect Customer Administrator Guide: Concepts: Web and mobile messaging capabilities in Connect Customer Connect Customer Chat security best practices
stop_contact_media_processingexecregionStops in-flight message processing for an ongoing chat session.
stop_contact_recordingexecregion, InstanceId, ContactId, InitialContactIdStops recording a call when a contact is being recorded. StopContactRecording is a one-time action. If you use StopContactRecording to stop recording an ongoing call, you can't use StartContactRecording to restart it. For scenarios where the recording has started and you want to suspend it for sensitive information (for example, to collect a credit card number), and then restart it, use SuspendContactRecording and ResumeContactRecording. Only voice recordings are supported at this time.
stop_contact_streamingexecregion, InstanceId, ContactId, StreamingIdEnds message streaming on a specified contact. To restart message streaming on that contact, call the StartContactStreaming API.
submit_contact_evaluationexecinstance_id, evaluation_id, regionSubmits a contact evaluation in the specified Connect Customer instance. Answers included in the request are merged with existing answers for the given evaluation. If no answers or notes are passed, the evaluation is submitted with the existing answers and notes. You can delete an answer or note by passing an empty object ({}) to the question identifier. If a contact evaluation is already in submitted state, this operation will trigger a resubmission.
update_contact_routing_dataexecinstance_id, contact_id, regionUpdates routing priority and age on the contact (QueuePriority and QueueTimeAdjustmentInSeconds). These properties can be used to change a customer's position in the queue. For example, you can move a contact to the back of the queue by setting a lower routing priority relative to other contacts in queue; or you can move a contact to the front of the queue by increasing the routing age which will make the contact look artificially older and therefore higher up in the first-in-first-out routing order. Note that adjusting the routing age of a contact affects only its position in queue, and not its actual queue wait time as reported through metrics. These properties can also be updated by using the Set routing priority / age flow block. Either QueuePriority or QueueTimeAdjustmentInSeconds should be provided within the request body, but not both.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
contact_idstringThe identifier of the contact in this instance of Connect Customer.
evaluation_idstringA unique identifier for the contact evaluation.
instance_idstringThe identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
queue_idstringThe identifier for the queue.
regionstringAWS region (default: us-east-1)

SELECT examples

This API is in preview release for Connect Customer and is subject to change. Describes the specified contact. Use cases Following are common uses cases for this API: Retrieve contact information such as the caller's phone number and the specific number the caller dialed to integrate into custom monitoring or custom agent experience solutions. Detect when a customer chat session disconnects due to a network issue on the agent's end. Use the DisconnectReason field in the ContactTraceRecord to detect this event and then re-queue the chat for followup. Identify after contact work (ACW) duration and call recordings information when a COMPLETED event is received by using the contact event stream. Important things to know SystemEndpoint is not populated for contacts with initiation method of MONITOR, QUEUE_TRANSFER, or CALLBACK Contact information remains available in Connect Customer for 24 months from the InitiationTimestamp, and then it is deleted. Only contact information that is available in Connect Customer is returned by this API. Endpoints: See Connect Customer endpoints and quotas.

SELECT
additional_email_recipients,
agent_info,
answering_machine_detection_status,
arn,
attributes,
campaign,
channel,
chat_metrics,
connected_to_system_timestamp,
contact_association_id,
contact_details,
contact_evaluations,
customer,
customer_endpoint,
customer_id,
customer_voice_activity,
description,
disconnect_details,
disconnect_reason,
disconnect_timestamp,
global_resiliency_metadata,
id,
initial_contact_id,
initiation_method,
initiation_timestamp,
last_paused_timestamp,
last_resumed_timestamp,
last_update_timestamp,
name,
next_contacts,
outbound_strategy,
previous_contact_id,
quality_metrics,
queue_info,
queue_priority,
queue_time_adjustment_seconds,
recordings,
related_contact_id,
ring_start_timestamp,
routing_criteria,
scheduled_timestamp,
segment_attributes,
system_endpoint,
tags,
task_template_info,
total_pause_count,
total_pause_duration_in_seconds,
wisdom_info
FROM aws.connect.contacts
WHERE instance_id = '{{ instance_id }}' -- required
AND contact_id = '{{ contact_id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Only the VOICE, EMAIL, and TASK channels are supported. For VOICE: The supported initiation method is TRANSFER. The contacts created with this initiation method have a subtype connect:ExternalAudio. For EMAIL: The supported initiation methods are OUTBOUND, AGENT_REPLY, and FLOW. For TASK: The supported initiation method is API. Contacts created with this API have a sub-type of connect:ExternalTask. Creates a new VOICE, EMAIL, or TASK contact. After a contact is created, you can move it to the desired state by using the InitiateAs parameter. While you can use API to create task contacts that are in the COMPLETED state, you must contact Amazon Web Services Support before using it for bulk import use cases. Bulk import causes your requests to be throttled or fail if your CreateContact limits aren't high enough.

INSERT INTO aws.connect.contacts (
InstanceId,
ClientToken,
RelatedContactId,
Attributes,
References,
Channel,
InitiationMethod,
ExpiryDurationInMinutes,
UserInfo,
InitiateAs,
Name,
Description,
SegmentAttributes,
PreviousContactId,
region
)
SELECT
'{{ InstanceId }}' /* required */,
'{{ ClientToken }}',
'{{ RelatedContactId }}',
'{{ Attributes }}',
'{{ References }}',
'{{ Channel }}',
'{{ InitiationMethod }}' /* required */,
{{ ExpiryDurationInMinutes }},
'{{ UserInfo }}',
'{{ InitiateAs }}',
'{{ Name }}',
'{{ Description }}',
'{{ SegmentAttributes }}',
'{{ PreviousContactId }}',
'{{ region }}'
RETURNING
contact_arn,
contact_id
;

UPDATE examples

Updates the scheduled time of a task contact that is already scheduled.

UPDATE aws.connect.contacts
SET
InstanceId = '{{ InstanceId }}',
ContactId = '{{ ContactId }}',
ScheduledTime = '{{ ScheduledTime }}'
WHERE
region = '{{ region }}' --required
AND InstanceId = '{{ InstanceId }}' --required
AND ContactId = '{{ ContactId }}' --required
AND ScheduledTime = '{{ ScheduledTime }}' --required;

DELETE examples

Deletes the specified fields containing personally identifiable information (PII) from a contact in the specified Connect Customer instance. We redact PII (such as customer endpoints, additional email recipients, and the email subject) from the contact and its associated contact trace record (CTR). The contact must be in a terminated state. This deletion is permanent and cannot be undone. Performing this operation permanently deletes the specified PII. There is no retention period; you cannot recover the data after deletion. We remove only the fields that Connect Customer identifies and stores as PII. Any PII that you place in fields outside the scope of this operation remains your responsibility to remove.

DELETE FROM aws.connect.contacts
WHERE instance_id = '{{ instance_id }}' --required
AND contact_id = '{{ contact_id }}' --required
AND region = '{{ region }}' --required
;

Lifecycle Methods

Starts an empty evaluation in the specified Connect Customer instance, using the given evaluation form for the particular contact. The evaluation form version used for the contact evaluation corresponds to the currently activated version. If no version is activated for the evaluation form, the contact evaluation cannot be started. Evaluations created through the public API do not contain answer values suggested from automation.

EXEC aws.connect.contacts.start_contact_evaluation
@instance_id='{{ instance_id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"ContactId": "{{ ContactId }}",
"EvaluationFormId": "{{ EvaluationFormId }}",
"AutoEvaluationConfiguration": "{{ AutoEvaluationConfiguration }}",
"ClientToken": "{{ ClientToken }}",
"Tags": "{{ Tags }}"
}'
;