Skip to main content

contact_flows

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

Overview

Namecontact_flows
TypeResource
Idaws.connect.contact_flows

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
arnstringThe Amazon Resource Name (ARN) of the flow.
contentstringThe JSON string that represents the content of the flow. For an example, see Example flow in Connect Customer Flow language. Length Constraints: Minimum length of 1. Maximum length of 256000.
descriptionstringThe description of the flow.
flow_content_sha_256stringIndicates the checksum value of the flow content. (pattern: <code>^[a-zA-Z0-9]{64}$</code>)
idstringThe identifier of the flow.
last_modified_regionstringThe region in which the flow was last modified (pattern: <code>[a-z]{2}(-[a-z]+){1,2}(-[0-9])?</code>)
last_modified_timestring (date-time)The time at which the flow was last modified.
namestringThe name of the flow.
statestringThe type of flow. (ACTIVE, ARCHIVED)
statusstringThe status of the flow. (PUBLISHED, SAVED)
tagsobjectThe tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.
typestringThe type of the flow. For descriptions of the available types, see Choose a flow type in the Connect Customer Administrator Guide. (CONTACT_FLOW, CUSTOMER_QUEUE, CUSTOMER_HOLD, CUSTOMER_WHISPER, AGENT_HOLD, AGENT_WHISPER, OUTBOUND_WHISPER, AGENT_TRANSFER, QUEUE_TRANSFER, CAMPAIGN)
versioninteger (int64)The identifier of the flow version.
version_descriptionstringThe description of the flow version.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_contact_flowselectinstance_id, contact_flow_id, regionDescribes the specified flow. You can also create and update flows using the Connect Customer Flow language. Use the $SAVED alias in the request to describe the SAVED content of a Flow. For example, arn:aws:.../contact-flow/{id}:$SAVED. After a flow is published, $SAVED needs to be supplied to view saved content that has not been published. Use arn:aws:.../contact-flow/{id}:{version} to retrieve the content of a specific flow version. In the response, Status indicates the flow status as either SAVED or PUBLISHED. The PUBLISHED status will initiate validation on the content. SAVED does not initiate validation of the content. SAVED | PUBLISHED
list_contact_flowsselectinstance_id, regioncontactFlowTypes, nextToken, maxResultsProvides information about the flows for the specified Connect Customer instance. You can also create and update flows using the Connect Customer Flow language. For more information about flows, see Flows in the Connect Customer Administrator Guide.
search_contact_flowsselectregionSearches the flows in an Connect Customer instance, with optional filtering.
create_contact_flowinsertinstance_id, regionCreates a flow for the specified Connect Customer instance. You can also create and update flows using the Connect Customer Flow language.
associate_phone_number_contact_flowupdatephone_number_id, region, InstanceId, ContactFlowIdAssociates a flow with a phone number claimed to your Connect Customer instance. If the number is claimed to a traffic distribution group, and you are calling this API using an instance in the Amazon Web Services Region where the traffic distribution group was created, you can use either a full phone number ARN or UUID value for the PhoneNumberId URI request parameter. However, if the number is claimed to a traffic distribution group and you are calling this API using an instance in the alternate Amazon Web Services Region associated with the traffic distribution group, you must provide a full phone number ARN. If a UUID is provided in this scenario, you will receive a ResourceNotFoundException.
update_contact_flow_contentupdateinstance_id, contact_flow_id, regionUpdates the specified flow. You can also create and update flows using the Connect Customer Flow language. Use the $SAVED alias in the request to describe the SAVED content of a Flow. For example, arn:aws:.../contact-flow/{id}:$SAVED. After a flow is published, $SAVED needs to be supplied to view saved content that has not been published.
disassociate_phone_number_contact_flowupdatephone_number_id, regioninstanceIdRemoves the flow association from a phone number claimed to your Connect Customer instance. If the number is claimed to a traffic distribution group, and you are calling this API using an instance in the Amazon Web Services Region where the traffic distribution group was created, you can use either a full phone number ARN or UUID value for the PhoneNumberId URI request parameter. However, if the number is claimed to a traffic distribution group and you are calling this API using an instance in the alternate Amazon Web Services Region associated with the traffic distribution group, you must provide a full phone number ARN. If a UUID is provided in this scenario, you will receive a ResourceNotFoundException.
delete_contact_flowdeleteinstance_id, contact_flow_id, regionDeletes a flow for the specified Connect Customer instance.
start_chat_contactexecregion, InstanceId, ContactFlowId, ParticipantDetailsInitiates a flow to start a new chat for the customer. Response of this API provides a token required to obtain credentials from the CreateParticipantConnection API in the Connect Customer Participant Service. When a new chat contact is successfully created, clients must subscribe to the participant’s connection for the created chat within 5 minutes. This is achieved by invoking CreateParticipantConnection with WEBSOCKET and CONNECTION_CREDENTIALS. A 429 error occurs in the following situations: API rate limit is exceeded. API TPS throttling returns a TooManyRequests exception. The quota for concurrent active chats is exceeded. Active chat throttling returns a LimitExceededException. If you use the ChatDurationInMinutes parameter and receive a 400 error, your account may not support the ability to configure custom chat durations. For more information, contact Amazon Web Services Support. 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
start_outbound_chat_contactexecregion, SourceEndpoint, DestinationEndpoint, InstanceId, SegmentAttributes, ContactFlowIdInitiates a new outbound SMS or WhatsApp contact to a customer. Response of this API provides the ContactId of the outbound SMS or WhatsApp contact created. SourceEndpoint only supports Endpoints with CONNECT_PHONENUMBER_ARN as Type and DestinationEndpoint only supports Endpoints with TELEPHONE_NUMBER as Type. ContactFlowId initiates the flow to manage the new contact created. This API can be used to initiate outbound SMS or WhatsApp contacts for an agent, or it can also deflect an ongoing contact to an outbound SMS or WhatsApp contact by using the StartOutboundChatContact Flow Action. For more information about using SMS or WhatsApp in Connect Customer, see the following topics in the Connect Customer Administrator Guide: Set up SMS messaging Request an SMS-enabled phone number through Amazon Web Services End User Messaging SMS Set up WhatsApp Business messaging
start_outbound_voice_contactexecregion, DestinationPhoneNumber, ContactFlowId, InstanceIdPlaces an outbound call to a contact, and then initiates the flow. It performs the actions in the flow that's specified (in ContactFlowId). Agents do not initiate the outbound API, which means that they do not dial the contact. If the flow places an outbound call to a contact, and then puts the contact in queue, the call is then routed to the agent, like any other inbound case. Dialing timeout for this operation can be configured with the “RingTimeoutInSeconds” parameter. If not specified, the default dialing timeout will be 60 seconds which means if the call is not connected within 60 seconds, it fails. UK numbers with a 447 prefix are not allowed by default. Before you can dial these UK mobile numbers, you must submit a service quota increase request. For more information, see Connect Customer Service Quotas in the Connect Customer Administrator Guide. Campaign calls are not allowed by default. Before you can make a call with TrafficType = CAMPAIGN, you must submit a service quota increase request to the quota Connect Customer campaigns. For Preview dialing mode, only the Amazon Connect outbound campaigns service principal is allowed to assume a role in your account and call this API with OutboundStrategy.
start_web_rtc_contactexecregion, ContactFlowId, InstanceId, ParticipantDetailsPlaces an inbound in-app, web, or video call to a contact, and then initiates the flow. It performs the actions in the flow that are specified (in ContactFlowId) and present in the Connect Customer instance (specified as InstanceId).
transfer_contactexecregion, InstanceId, ContactId, ContactFlowIdTransfers TASK or EMAIL contacts from one agent or queue to another agent or queue at any point after a contact is created. You can transfer a contact to another queue by providing the flow which orchestrates the contact to the destination queue. This gives you more control over contact handling and helps you adhere to the service level agreement (SLA) guaranteed to your customers. Note the following requirements: Transfer is only supported for TASK and EMAIL contacts. Do not use both QueueId and UserId in the same call. The following flow types are supported: Inbound flow, Transfer to agent flow, and Transfer to queue flow. The TransferContact API can be called only on active contacts. A contact cannot be transferred more than 11 times.
update_contact_flow_metadataexecinstance_id, contact_flow_id, regionUpdates metadata about specified flow.
update_contact_flow_nameexecinstance_id, contact_flow_id, regionThe name of the flow. You can also create and update flows using the Connect Customer Flow language.

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_flow_idstringThe identifier of the flow.
instance_idstringThe identifier of the Connect Customer instance.
phone_number_idstringA unique identifier for the phone number.
regionstringAWS region (default: us-east-1)
contactFlowTypesarrayThe type of flow.
instanceIdstringThe identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
maxResultsintegerThe maximum number of results to return per page. The default MaxResult size is 100.
nextTokenstringThe 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.

SELECT examples

Describes the specified flow. You can also create and update flows using the Connect Customer Flow language. Use the $SAVED alias in the request to describe the SAVED content of a Flow. For example, arn:aws:.../contact-flow/{id}:$SAVED. After a flow is published, $SAVED needs to be supplied to view saved content that has not been published. Use arn:aws:.../contact-flow/{id}:{version} to retrieve the content of a specific flow version. In the response, Status indicates the flow status as either SAVED or PUBLISHED. The PUBLISHED status will initiate validation on the content. SAVED does not initiate validation of the content. SAVED | PUBLISHED

SELECT
arn,
content,
description,
flow_content_sha_256,
id,
last_modified_region,
last_modified_time,
name,
state,
status,
tags,
type,
version,
version_description
FROM aws.connect.contact_flows
WHERE instance_id = '{{ instance_id }}' -- required
AND contact_flow_id = '{{ contact_flow_id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a flow for the specified Connect Customer instance. You can also create and update flows using the Connect Customer Flow language.

INSERT INTO aws.connect.contact_flows (
Name,
Type,
Description,
Content,
Status,
Tags,
instance_id,
region
)
SELECT
'{{ Name }}',
'{{ Type }}',
'{{ Description }}',
'{{ Content }}',
'{{ Status }}',
'{{ Tags }}',
'{{ instance_id }}',
'{{ region }}'
RETURNING
contact_flow_arn,
contact_flow_id,
flow_content_sha_256
;

UPDATE examples

Associates a flow with a phone number claimed to your Connect Customer instance. If the number is claimed to a traffic distribution group, and you are calling this API using an instance in the Amazon Web Services Region where the traffic distribution group was created, you can use either a full phone number ARN or UUID value for the PhoneNumberId URI request parameter. However, if the number is claimed to a traffic distribution group and you are calling this API using an instance in the alternate Amazon Web Services Region associated with the traffic distribution group, you must provide a full phone number ARN. If a UUID is provided in this scenario, you will receive a ResourceNotFoundException.

UPDATE aws.connect.contact_flows
SET
InstanceId = '{{ InstanceId }}',
ContactFlowId = '{{ ContactFlowId }}'
WHERE
phone_number_id = '{{ phone_number_id }}' --required
AND region = '{{ region }}' --required
AND InstanceId = '{{ InstanceId }}' --required
AND ContactFlowId = '{{ ContactFlowId }}' --required;

DELETE examples

Deletes a flow for the specified Connect Customer instance.

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

Lifecycle Methods

Initiates a flow to start a new chat for the customer. Response of this API provides a token required to obtain credentials from the CreateParticipantConnection API in the Connect Customer Participant Service. When a new chat contact is successfully created, clients must subscribe to the participant’s connection for the created chat within 5 minutes. This is achieved by invoking CreateParticipantConnection with WEBSOCKET and CONNECTION_CREDENTIALS. A 429 error occurs in the following situations: API rate limit is exceeded. API TPS throttling returns a TooManyRequests exception. The quota for concurrent active chats is exceeded. Active chat throttling returns a LimitExceededException. If you use the ChatDurationInMinutes parameter and receive a 400 error, your account may not support the ability to configure custom chat durations. For more information, contact Amazon Web Services Support. 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

EXEC aws.connect.contact_flows.start_chat_contact
@region='{{ region }}' --required
@@json=
'{
"InstanceId": "{{ InstanceId }}",
"ContactFlowId": "{{ ContactFlowId }}",
"Attributes": "{{ Attributes }}",
"ParticipantDetails": "{{ ParticipantDetails }}",
"ParticipantConfiguration": "{{ ParticipantConfiguration }}",
"InitialMessage": "{{ InitialMessage }}",
"ClientToken": "{{ ClientToken }}",
"ChatDurationInMinutes": {{ ChatDurationInMinutes }},
"SupportedMessagingContentTypes": "{{ SupportedMessagingContentTypes }}",
"PersistentChat": "{{ PersistentChat }}",
"RelatedContactId": "{{ RelatedContactId }}",
"SegmentAttributes": "{{ SegmentAttributes }}",
"CustomerId": "{{ CustomerId }}",
"DisconnectOnCustomerExit": "{{ DisconnectOnCustomerExit }}"
}'
;