Connect / Client / batch_put_contact

batch_put_contact#

Connect.Client.batch_put_contact(**kwargs)#

Note

Only the Amazon Connect outbound campaigns service principal is allowed to assume a role in your account and call this API.

Allows you to create a batch of contacts in Amazon Connect. The outbound campaigns capability ingests dial requests via the PutDialRequestBatch API. It then uses BatchPutContact to create contacts corresponding to those dial requests. If agents are available, the dial requests are dialed out, which results in a voice call. The resulting voice call uses the same contactId that was created by BatchPutContact.

See also: AWS API Documentation

Request Syntax

response = client.batch_put_contact(
    ClientToken='string',
    InstanceId='string',
    ContactDataRequestList=[
        {
            'SystemEndpoint': {
                'Type': 'TELEPHONE_NUMBER'|'VOIP'|'CONTACT_FLOW',
                'Address': 'string'
            },
            'CustomerEndpoint': {
                'Type': 'TELEPHONE_NUMBER'|'VOIP'|'CONTACT_FLOW',
                'Address': 'string'
            },
            'RequestIdentifier': 'string',
            'QueueId': 'string',
            'Attributes': {
                'string': 'string'
            },
            'Campaign': {
                'CampaignId': 'string'
            }
        },
    ]
)
Parameters:
  • 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.

  • 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.

  • ContactDataRequestList (list) –

    [REQUIRED]

    List of individual contact requests.

    • (dict) –

      Request object with information to create a contact.

      • SystemEndpoint (dict) –

        Endpoint associated with the Amazon Connect instance from which outbound contact will be initiated for the campaign.

        • Type (string) –

          Type of the endpoint.

        • Address (string) –

          Address of the endpoint.

      • CustomerEndpoint (dict) –

        Endpoint of the customer for which contact will be initiated.

        • Type (string) –

          Type of the endpoint.

        • Address (string) –

          Address of the endpoint.

      • RequestIdentifier (string) –

        Identifier to uniquely identify individual requests in the batch.

      • QueueId (string) –

        The identifier of the queue associated with the Amazon Connect instance in which contacts that are created will be queued.

      • Attributes (dict) –

        List of attributes to be stored in a contact.

        • (string) –

          • (string) –

      • Campaign (dict) –

        Structure to store information associated with a campaign.

        • CampaignId (string) –

          A unique identifier for a campaign.

Return type:

dict

Returns:

Response Syntax

{
    'SuccessfulRequestList': [
        {
            'RequestIdentifier': 'string',
            'ContactId': 'string'
        },
    ],
    'FailedRequestList': [
        {
            'RequestIdentifier': 'string',
            'FailureReasonCode': 'INVALID_ATTRIBUTE_KEY'|'INVALID_CUSTOMER_ENDPOINT'|'INVALID_SYSTEM_ENDPOINT'|'INVALID_QUEUE'|'MISSING_CAMPAIGN'|'MISSING_CUSTOMER_ENDPOINT'|'MISSING_QUEUE_ID_AND_SYSTEM_ENDPOINT'|'REQUEST_THROTTLED'|'IDEMPOTENCY_EXCEPTION'|'INTERNAL_ERROR',
            'FailureReasonMessage': 'string'
        },
    ]
}

Response Structure

  • (dict) –

    • SuccessfulRequestList (list) –

      List of requests for which contact was successfully created.

      • (dict) –

        Request for which contact was successfully created.

        • RequestIdentifier (string) –

          Request identifier provided in the API call in the ContactDataRequest to create a contact.

        • ContactId (string) –

          The contactId of the contact that was created successfully.

    • FailedRequestList (list) –

      List of requests for which contact creation failed.

      • (dict) –

        Request for which contact failed to be generated.

        • RequestIdentifier (string) –

          Request identifier provided in the API call in the ContactDataRequest to create a contact.

        • FailureReasonCode (string) –

          Reason code for the failure.

        • FailureReasonMessage (string) –

          Why the request to create a contact failed.

Exceptions