start_outbound_chat_contact
async
¶
start_outbound_chat_contact(
source_endpoint: Endpoint,
destination_endpoint: Endpoint,
instance_id: InstanceId,
segment_attributes: SegmentAttributes,
contact_flow_id: ContactFlowId,
*,
config_overrides: Optional[AsyncConnectClientConfig] = None,
attributes: Optional[Attributes] = None,
chat_duration_in_minutes: Optional[ChatDurationInMinutes] = None,
participant_details: Optional[ParticipantDetails] = None,
initial_system_message: Optional[ChatMessage] = None,
initial_templated_system_message: Optional[TemplatedMessageConfig] = None,
related_contact_id: Optional[ContactId] = None,
supported_messaging_content_types: Optional[SupportedMessagingContentTypes] = None,
client_token: Optional[ClientToken] = None,
) -> StartOutboundChatContactResponse
Initiates 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:
Parameters:
-
instance_id(InstanceId) –The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
-
segment_attributes(SegmentAttributes) –A set of system defined key-value pairs stored on individual contact segments using an attribute map. The attributes are standard Connect Customer attributes. They can be accessed in flows.
-
Attribute keys can include only alphanumeric,
-, and_. -
This field can be used to show channel subtype, such as
connect:SMSandconnect:WhatsApp.
-
-
attributes(Optional[Attributes], default:None) –A custom key-value pair using an attribute map. The attributes are standard Connect Customer attributes, and can be accessed in flows just like any other contact attributes.
-
contact_flow_id(ContactFlowId) –The identifier of the flow for the call. To see the ContactFlowId in the Connect Customer console user interface, on the navigation menu go to Routing, Contact Flows. Choose the flow. On the flow page, under the name of the flow, choose Show additional flow information. The ContactFlowId is the last part of the ARN, shown here in bold:
-
arn:aws:connect:us-west-2:xxxxxxxxxxxx:instance/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/contact-flow/123ec456-a007-89c0-1234-xxxxxxxxxxxx
-
-
chat_duration_in_minutes(Optional[ChatDurationInMinutes], default:None) –The total duration of the newly started chat session. If not specified, the chat session duration defaults to 25 hour. The minimum configurable time is 60 minutes. The maximum configurable time is 10,080 minutes (7 days).
-
related_contact_id(Optional[ContactId], default:None) –The unique identifier for an Connect Customer contact. This identifier is related to the contact starting.
-
supported_messaging_content_types(Optional[SupportedMessagingContentTypes], default:None) –The supported chat message content types. Supported types are:
-
text/plain -
text/markdown -
application/json, application/vnd.amazonaws.connect.message.interactive -
application/vnd.amazonaws.connect.message.interactive.response
Content types must always contain
text/plain. You can then put any other supported type in the list. For example, all the following lists are valid because they containtext/plain:-
[text/plain, text/markdown, application/json] -
[text/markdown, text/plain] -
[text/plain, application/json, application/vnd.amazonaws.connect.message.interactive.response]
-
-
client_token(Optional[ClientToken], default:None) –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. The token is valid for 7 days after creation. If a contact is already started, the contact ID is returned.
Raises:
-
AccessDeniedException–You do not have sufficient permissions to perform this action.
-
ConflictException–Operation cannot be performed at this time as there is a conflict with another operation or contact state.
-
InternalServiceException–Request processing failed because of an error or failure with the service.
-
InvalidRequestException–The request is not valid.
-
LimitExceededException–The allowed limit for the resource has been exceeded.
-
ResourceNotFoundException–The specified resource was not found.
-
ThrottlingException–The throttling limit has been exceeded.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_connect/_services/async_connect.py
24147 24148 24149 24150 24151 24152 24153 24154 24155 24156 24157 24158 24159 24160 24161 24162 24163 24164 24165 24166 24167 24168 24169 24170 24171 24172 24173 24174 24175 24176 24177 24178 24179 24180 24181 24182 24183 24184 24185 24186 24187 24188 24189 24190 24191 24192 24193 24194 24195 24196 24197 24198 24199 24200 24201 24202 24203 24204 24205 24206 24207 24208 24209 24210 24211 24212 24213 24214 24215 24216 24217 24218 24219 24220 24221 24222 24223 24224 24225 24226 24227 24228 24229 24230 24231 24232 24233 24234 24235 24236 24237 24238 24239 24240 24241 24242 24243 24244 24245 24246 24247 24248 24249 24250 24251 | |