ConnectCampaignServiceV2 / Client / put_outbound_request_batch

put_outbound_request_batch#

ConnectCampaignServiceV2.Client.put_outbound_request_batch(**kwargs)#

Creates outbound requests for the specified campaign Amazon Connect account. This API is idempotent.

See also: AWS API Documentation

Request Syntax

response = client.put_outbound_request_batch(
    id='string',
    outboundRequests=[
        {
            'clientToken': 'string',
            'expirationTime': datetime(2015, 1, 1),
            'channelSubtypeParameters': {
                'telephony': {
                    'destinationPhoneNumber': 'string',
                    'attributes': {
                        'string': 'string'
                    },
                    'connectSourcePhoneNumber': 'string',
                    'answerMachineDetectionConfig': {
                        'enableAnswerMachineDetection': True|False,
                        'awaitAnswerMachinePrompt': True|False
                    }
                },
                'sms': {
                    'destinationPhoneNumber': 'string',
                    'connectSourcePhoneNumberArn': 'string',
                    'templateArn': 'string',
                    'templateParameters': {
                        'string': 'string'
                    }
                },
                'email': {
                    'destinationEmailAddress': 'string',
                    'connectSourceEmailAddress': 'string',
                    'templateArn': 'string',
                    'templateParameters': {
                        'string': 'string'
                    }
                }
            }
        },
    ]
)
Parameters:
  • id (string) –

    [REQUIRED]

    Identifier representing a Campaign

  • outboundRequests (list) –

    [REQUIRED]

    A list of outbound requests.

    • (dict) –

      An outbound request for a campaign.

      • clientToken (string) – [REQUIRED]

        Client provided parameter used for idempotency. Its value must be unique for each request.

      • expirationTime (datetime) – [REQUIRED]

        Timestamp with no UTC offset or timezone

      • channelSubtypeParameters (dict) – [REQUIRED]

        ChannelSubtypeParameters for an outbound request

        Note

        This is a Tagged Union structure. Only one of the following top level keys can be set: telephony, sms, email.

        • telephony (dict) –

          Parameters for the Telephony Channel Subtype

          • destinationPhoneNumber (string) – [REQUIRED]

            The phone number of the customer, in E.164 format.

          • attributes (dict) – [REQUIRED]

            A custom key-value pair using an attribute map. The attributes are standard Amazon Connect attributes, and can be accessed in contact flows just like any other contact attributes.

            • (string) –

              The key of the attribute. Attribute keys can include only alphanumeric, dash, and underscore characters.

              • (string) –

                The value of the attribute.

          • connectSourcePhoneNumber (string) –

            The phone number associated with the Amazon Connect instance, in E.164 format. If you do not specify a source phone number, you must specify a queue.

          • answerMachineDetectionConfig (dict) –

            Answering Machine Detection config

            • enableAnswerMachineDetection (boolean) – [REQUIRED]

              Enable or disable answering machine detection

            • awaitAnswerMachinePrompt (boolean) –

              Enable or disable await answer machine prompt

        • sms (dict) –

          Parameters for the SMS Channel Subtype

          • destinationPhoneNumber (string) – [REQUIRED]

            The phone number of the customer, in E.164 format.

          • connectSourcePhoneNumberArn (string) –

            Amazon Resource Names(ARN)

          • templateArn (string) –

            Amazon Resource Names(ARN)

          • templateParameters (dict) – [REQUIRED]

            A custom key-value pair using an attribute map. The attributes are standard Amazon Connect attributes, and can be accessed in contact flows just like any other contact attributes.

            • (string) –

              The key of the attribute. Attribute keys can include only alphanumeric, dash, and underscore characters.

              • (string) –

                The value of the attribute.

        • email (dict) –

          Parameters for the Email Channel Subtype

          • destinationEmailAddress (string) – [REQUIRED]

            Source/Destination Email address used for Email messages

          • connectSourceEmailAddress (string) –

            Source/Destination Email address used for Email messages

          • templateArn (string) –

            Amazon Resource Names(ARN)

          • templateParameters (dict) – [REQUIRED]

            A custom key-value pair using an attribute map. The attributes are standard Amazon Connect attributes, and can be accessed in contact flows just like any other contact attributes.

            • (string) –

              The key of the attribute. Attribute keys can include only alphanumeric, dash, and underscore characters.

              • (string) –

                The value of the attribute.

Return type:

dict

Returns:

Response Syntax

{
    'successfulRequests': [
        {
            'clientToken': 'string',
            'id': 'string'
        },
    ],
    'failedRequests': [
        {
            'clientToken': 'string',
            'id': 'string',
            'failureCode': 'InvalidInput'|'RequestThrottled'|'UnknownError'|'BufferLimitExceeded'
        },
    ]
}

Response Structure

  • (dict) –

    The response for PutOutboundRequestBatch API.

    • successfulRequests (list) –

      A list of successful requests identified by the unique client token.

      • (dict) –

        A successful request identified by the unique client token.

        • clientToken (string) –

          Client provided parameter used for idempotency. Its value must be unique for each request.

        • id (string) –

          Identifier representing a Dial request

    • failedRequests (list) –

      A list of failed requests.

      • (dict) –

        A failed request identified by the unique client token.

        • clientToken (string) –

          Client provided parameter used for idempotency. Its value must be unique for each request.

        • id (string) –

          Identifier representing a Dial request

        • failureCode (string) –

          A predefined code indicating the error that caused the failure.

Exceptions

  • ConnectCampaignServiceV2.Client.exceptions.InternalServerException

  • ConnectCampaignServiceV2.Client.exceptions.ResourceNotFoundException

  • ConnectCampaignServiceV2.Client.exceptions.ValidationException

  • ConnectCampaignServiceV2.Client.exceptions.ConflictException

  • ConnectCampaignServiceV2.Client.exceptions.InvalidCampaignStateException

  • ConnectCampaignServiceV2.Client.exceptions.AccessDeniedException

  • ConnectCampaignServiceV2.Client.exceptions.ThrottlingException