:doc:`Connect <../../connect>` / Client / start_outbound_email_contact

****************************
start_outbound_email_contact
****************************



.. py:method:: Connect.Client.start_outbound_email_contact(**kwargs)

  

  Initiates a flow to send an agent reply or outbound email contact (created from the CreateContact API) to a customer.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/connect-2017-08-08/StartOutboundEmailContact>`_  


  **Request Syntax**
  ::

    response = client.start_outbound_email_contact(
        InstanceId='string',
        ContactId='string',
        FromEmailAddress={
            'EmailAddress': 'string',
            'DisplayName': 'string'
        },
        DestinationEmailAddress={
            'EmailAddress': 'string',
            'DisplayName': 'string'
        },
        AdditionalRecipients={
            'CcEmailAddresses': [
                {
                    'EmailAddress': 'string',
                    'DisplayName': 'string'
                },
            ]
        },
        EmailMessage={
            'MessageSourceType': 'TEMPLATE'|'RAW',
            'TemplatedMessageConfig': {
                'KnowledgeBaseId': 'string',
                'MessageTemplateId': 'string',
                'TemplateAttributes': {
                    'CustomAttributes': {
                        'string': 'string'
                    },
                    'CustomerProfileAttributes': 'string'
                }
            },
            'RawMessage': {
                'Subject': 'string',
                'Body': 'string',
                'ContentType': 'string'
            }
        },
        ClientToken='string'
    )
    
  :type InstanceId: string
  :param InstanceId: **[REQUIRED]** 

    The identifier of the Amazon Connect instance. You can `find the instance ID <https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html>`__ in the Amazon Resource Name (ARN) of the instance.

    

  
  :type ContactId: string
  :param ContactId: **[REQUIRED]** 

    The identifier of the contact in this instance of Amazon Connect.

    

  
  :type FromEmailAddress: dict
  :param FromEmailAddress: 

    The email address associated with the Amazon Connect instance.

    

  
    - **EmailAddress** *(string) --* **[REQUIRED]** 

      The email address, including the domain.

      

    
    - **DisplayName** *(string) --* 

      The display name of email address.

      

    
  
  :type DestinationEmailAddress: dict
  :param DestinationEmailAddress: **[REQUIRED]** 

    The email address of the customer.

    

  
    - **EmailAddress** *(string) --* **[REQUIRED]** 

      The email address, including the domain.

      

    
    - **DisplayName** *(string) --* 

      The display name of email address.

      

    
  
  :type AdditionalRecipients: dict
  :param AdditionalRecipients: 

    The additional recipients address of email in CC.

    

  
    - **CcEmailAddresses** *(list) --* 

      Information about the **additional** CC email address recipients. Email recipients are limited to 50 total addresses: 1 required recipient in the `DestinationEmailAddress <https://docs.aws.amazon.com/connect/latest/APIReference/API_SendOutboundEmail.html#API_SendOutboundEmail_RequestBody>`__ field and up to 49 recipients in the 'CcEmailAddresses' field.

      

    
      - *(dict) --* 

        Contains information about a source or destination email address.

        

      
        - **EmailAddress** *(string) --* **[REQUIRED]** 

          The email address, including the domain.

          

        
        - **DisplayName** *(string) --* 

          The display name of email address.

          

        
      
  
  
  :type EmailMessage: dict
  :param EmailMessage: **[REQUIRED]** 

    The email message body to be sent to the newly created email.

    

  
    - **MessageSourceType** *(string) --* **[REQUIRED]** 

      The message source type, that is, ``RAW`` or ``TEMPLATE``.

      

    
    - **TemplatedMessageConfig** *(dict) --* 

      Information about template message configuration.

      

    
      - **KnowledgeBaseId** *(string) --* **[REQUIRED]** 

        The identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.

        

      
      - **MessageTemplateId** *(string) --* **[REQUIRED]** 

        The identifier of the message template Id.

        

      
      - **TemplateAttributes** *(dict) --* **[REQUIRED]** 

        Information about template attributes, that is, CustomAttributes or CustomerProfileAttributes.

        

      
        - **CustomAttributes** *(dict) --* 

          An object that specifies the custom attributes values to use for variables in the message template. This object contains different categories of key-value pairs. Each key defines a variable or placeholder in the message template.

          

        
          - *(string) --* 

          
            - *(string) --* 

            
      
    
        - **CustomerProfileAttributes** *(string) --* 

          An object that specifies the customer profile attributes values to use for variables in the message template. This object contains different categories of key-value pairs. Each key defines a variable or placeholder in the message template.

          

        
      
    
    - **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`` or ``text/html``.

        

      
    
  
  :type ClientToken: string
  :param ClientToken: 

    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 <https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/>`__.

    This field is autopopulated if not provided.

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'ContactId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **ContactId** *(string) --* 

        The identifier of the contact in this instance of Amazon Connect.

        
  
  **Exceptions**
  
  *   :py:class:`Connect.Client.exceptions.InvalidRequestException`

  
  *   :py:class:`Connect.Client.exceptions.ServiceQuotaExceededException`

  
  *   :py:class:`Connect.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`Connect.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`Connect.Client.exceptions.ThrottlingException`

  
  *   :py:class:`Connect.Client.exceptions.InternalServiceException`

  
  *   :py:class:`Connect.Client.exceptions.IdempotencyException`

  