Connect / Client / start_email_contact
start_email_contact#
- Connect.Client.start_email_contact(**kwargs)#
Creates an inbound email contact and initiates a flow to start the email contact for the customer. Response of this API provides the ContactId of the email contact created.
See also: AWS API Documentation
Request Syntax
response = client.start_email_contact( InstanceId='string', FromEmailAddress={ 'EmailAddress': 'string', 'DisplayName': 'string' }, DestinationEmailAddress='string', Description='string', References={ 'string': { 'Value': 'string', 'Type': 'URL'|'ATTACHMENT'|'CONTACT_ANALYSIS'|'NUMBER'|'STRING'|'DATE'|'EMAIL'|'EMAIL_MESSAGE', 'Status': 'AVAILABLE'|'DELETED'|'APPROVED'|'REJECTED'|'PROCESSING'|'FAILED', 'Arn': 'string', 'StatusReason': 'string' } }, Name='string', EmailMessage={ 'MessageSourceType': 'RAW', 'RawMessage': { 'Subject': 'string', 'Body': 'string', 'ContentType': 'string', 'Headers': { 'string': 'string' } } }, AdditionalRecipients={ 'ToAddresses': [ { 'EmailAddress': 'string', 'DisplayName': 'string' }, ], 'CcAddresses': [ { 'EmailAddress': 'string', 'DisplayName': 'string' }, ] }, Attachments=[ { 'FileName': 'string', 'S3Url': 'string' }, ], ContactFlowId='string', RelatedContactId='string', Attributes={ 'string': 'string' }, SegmentAttributes={ 'string': { 'ValueString': 'string', 'ValueMap': { 'string': {'... recursive ...'} }, 'ValueInteger': 123 } }, ClientToken='string' )
- Parameters:
InstanceId (string) –
[REQUIRED]
The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
FromEmailAddress (dict) –
[REQUIRED]
The email address of the customer.
EmailAddress (string) – [REQUIRED]
The email address with the instance, in [^s@]+@[^s@]+.[^s@]+ format.
DisplayName (string) –
The display name of email address.
DestinationEmailAddress (string) –
[REQUIRED]
The email address associated with the instance.
Description (string) – A description of the email contact.
References (dict) –
A formatted URL that is shown to an agent in the Contact Control Panel (CCP). Emails can have the following reference types at the time of creation:
URL
|NUMBER
|STRING
|DATE
.EMAIL
|EMAIL_MESSAGE
|ATTACHMENT
are not a supported reference type during email creation.(string) –
(dict) –
Well-formed data on a contact, used by agents to complete a contact request. You can have up to 4,096 UTF-8 bytes across all references for a contact.
Value (string) –
A valid value for the reference. For example, for a URL reference, a formatted URL that is displayed to an agent in the Contact Control Panel (CCP).
Type (string) – [REQUIRED]
The type of the reference.
DATE
must be of type Epoch timestamp.Status (string) –
Status of the attachment reference type.
Arn (string) –
The Amazon Resource Name (ARN) of the reference
StatusReason (string) –
Relevant details why the reference was not successfully created.
Name (string) – The name of a email that is shown to an agent in the Contact Control Panel (CCP).
EmailMessage (dict) –
[REQUIRED]
The email message body to be sent to the newly created email.
MessageSourceType (string) – [REQUIRED]
The message source type, that is,
RAW
.RawMessage (dict) –
The raw email body content.
Subject (string) – [REQUIRED]
The email subject.
Body (string) – [REQUIRED]
The email message body.
ContentType (string) – [REQUIRED]
Type of content, that is,
text/plain
ortext/html
.Headers (dict) –
Headers present in inbound email.
(string) –
(string) –
AdditionalRecipients (dict) –
The addtional recipients address of the email.
ToAddresses (list) –
The additional recipients information present in to list.
(dict) –
Contains information about a source or destination email address
EmailAddress (string) – [REQUIRED]
The email address with the instance, in [^s@]+@[^s@]+.[^s@]+ format.
DisplayName (string) –
The display name of email address.
CcAddresses (list) –
The additional recipients information present in cc list.
(dict) –
Contains information about a source or destination email address
EmailAddress (string) – [REQUIRED]
The email address with the instance, in [^s@]+@[^s@]+.[^s@]+ format.
DisplayName (string) –
The display name of email address.
Attachments (list) –
List of S3 presigned URLs of email attachments and their file name.
(dict) –
Information about the email attachment files.
FileName (string) – [REQUIRED]
A case-sensitive name of the attached file being uploaded.
S3Url (string) – [REQUIRED]
The pre-signed URLs for the S3 bucket where the email attachment is stored.
ContactFlowId (string) –
The identifier of the flow for initiating the emails. To see the ContactFlowId in the Amazon Connect admin website, on the navigation menu go to Routing, 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/846ec553-a005-41c0-8341-xxxxxxxxxxxx
RelatedContactId (string) – The contactId that is related to this contact. Linking emails together by using
RelatedContactID
copies over contact attributes from the related email contact to the new email contact. All updates to user-defined attributes in the new email contact are limited to the individual contact ID. There are no limits to the number of contacts that can be linked by usingRelatedContactId
.Attributes (dict) –
A custom key-value pair using an attribute map. The attributes are standard Amazon Connect attributes, and can be accessed in flows just like any other contact attributes.
There can be up to 32,768 UTF-8 bytes across all key-value pairs per contact. Attribute keys can include only alphanumeric, dash, and underscore characters.
(string) –
(string) –
SegmentAttributes (dict) –
A set of system defined key-value pairs stored on individual contact segments using an attribute map. The attributes are standard Amazon Connect 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:Guide
.Note
To set contact expiry, a
ValueMap
must be specified containing the integer number of minutes the contact will be active for before expiring, withSegmentAttributes
like {"connect:ContactExpiry": {"ValueMap" : { "ExpiryDuration": { "ValueInteger":135}}}}
.(string) –
(dict) –
A value for a segment attribute. This is structured as a map where the key is
valueString
and the value is a string.ValueString (string) –
The value of a segment attribute.
ValueMap (dict) –
The value of a segment attribute.
(string) –
(dict) –
A value for a segment attribute. This is structured as a map where the key is
valueString
and the value is a string.
ValueInteger (integer) –
The value of a segment attribute.
ClientToken (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.
- Return type:
dict
- Returns:
Response Syntax
{ 'ContactId': 'string' }
Response Structure
(dict) –
ContactId (string) –
The identifier of this contact within the Amazon Connect instance.
Exceptions
Connect.Client.exceptions.InvalidRequestException
Connect.Client.exceptions.ServiceQuotaExceededException
Connect.Client.exceptions.AccessDeniedException
Connect.Client.exceptions.ResourceNotFoundException
Connect.Client.exceptions.ThrottlingException
Connect.Client.exceptions.InternalServiceException
Connect.Client.exceptions.IdempotencyException