Amazon Connect Service

2026/03/06 - Amazon Connect Service - 4 updated api methods

Changes  Amazon Connect now supports the ability to programmatically configure and run automated tests for contact center experiences for Chat. Integrate testing into CICD pipelines, run multiple tests at scale, and retrieve results via API to automate validation of chat interactions and workflows.

CreateTestCase (updated) Link ¶
Changes (request)
{'EntryPoint': {'ChatEntryPointParameters': {'FlowId': 'string'},
                'Type': {'CHAT'}}}

Creates a test case with its content and metadata for the specified Amazon Connect instance.

See also: AWS API Documentation

Request Syntax

client.create_test_case(
    InstanceId='string',
    Name='string',
    Description='string',
    Content='string',
    EntryPoint={
        'Type': 'VOICE_CALL'|'CHAT',
        'VoiceCallEntryPointParameters': {
            'SourcePhoneNumber': 'string',
            'DestinationPhoneNumber': 'string',
            'FlowId': 'string'
        },
        'ChatEntryPointParameters': {
            'FlowId': 'string'
        }
    },
    InitializationData='string',
    Status='PUBLISHED'|'SAVED',
    TestCaseId='string',
    Tags={
        'string': 'string'
    },
    LastModifiedTime=datetime(2015, 1, 1),
    LastModifiedRegion='string'
)
type InstanceId:

string

param InstanceId:

[REQUIRED]

The identifier of the Amazon Connect instance.

type Name:

string

param Name:

[REQUIRED]

The name of the test.

type Description:

string

param Description:

The description of the test.

type Content:

string

param Content:

[REQUIRED]

The JSON string that represents the content of the test.

type EntryPoint:

dict

param EntryPoint:

Defines the starting point for your test.

  • Type (string) --

    The type of entry point.

  • VoiceCallEntryPointParameters (dict) --

    Parameters for voice call entry point.

    • SourcePhoneNumber (string) --

      The source phone number for the test.

    • DestinationPhoneNumber (string) --

      The destination phone number for the test.

    • FlowId (string) --

      The flow identifier for the test.

  • ChatEntryPointParameters (dict) --

    Parameters for chat entry point.

    • FlowId (string) --

      The flow identifier for the test.

type InitializationData:

string

param InitializationData:

Defines the initial custom attributes for your test.

type Status:

string

param Status:

Indicates the test status as either SAVED or PUBLISHED. The PUBLISHED status will initiate validation on the content. The SAVED status does not initiate validation of the content.

type TestCaseId:

string

param TestCaseId:

Id of the test case if you want to create it in a replica region using Amazon Connect Global Resiliency

type Tags:

dict

param Tags:

The tags used to organize, track, or control access for this resource.

  • (string) --

    • (string) --

type LastModifiedTime:

datetime

param LastModifiedTime:

The time at which the resource was last modified.

type LastModifiedRegion:

string

param LastModifiedRegion:

The region in which the resource was last modified

rtype:

dict

returns:

Response Syntax

{
    'TestCaseId': 'string',
    'TestCaseArn': 'string'
}

Response Structure

  • (dict) --

    • TestCaseId (string) --

      The identifier of the test.

    • TestCaseArn (string) --

      The Amazon Resource Name (ARN) of the test.

DescribeTestCase (updated) Link ¶
Changes (response)
{'TestCase': {'EntryPoint': {'ChatEntryPointParameters': {'FlowId': 'string'},
                             'Type': {'CHAT'}}}}

Describes the specified test case and allows you to get the content and metadata of the test case for the specified Amazon Connect instance.

See also: AWS API Documentation

Request Syntax

client.describe_test_case(
    InstanceId='string',
    TestCaseId='string',
    Status='PUBLISHED'|'SAVED'
)
type InstanceId:

string

param InstanceId:

[REQUIRED]

The identifier of the Amazon Connect instance.

type TestCaseId:

string

param TestCaseId:

[REQUIRED]

The identifier of the test case.

type Status:

string

param Status:

The status of the test case version to retrieve. If not specified, returns the published version if available, otherwise returns the saved version.

rtype:

dict

returns:

Response Syntax

{
    'TestCase': {
        'Arn': 'string',
        'Id': 'string',
        'Name': 'string',
        'Content': 'string',
        'EntryPoint': {
            'Type': 'VOICE_CALL'|'CHAT',
            'VoiceCallEntryPointParameters': {
                'SourcePhoneNumber': 'string',
                'DestinationPhoneNumber': 'string',
                'FlowId': 'string'
            },
            'ChatEntryPointParameters': {
                'FlowId': 'string'
            }
        },
        'InitializationData': 'string',
        'Description': 'string',
        'Status': 'PUBLISHED'|'SAVED',
        'LastModifiedTime': datetime(2015, 1, 1),
        'LastModifiedRegion': 'string',
        'Tags': {
            'string': 'string'
        },
        'TestCaseSha256': 'string'
    }
}

Response Structure

  • (dict) --

    • TestCase (dict) --

      The test case object containing all test case information.

      • Arn (string) --

        The Amazon Resource Name (ARN) of the test case.

      • Id (string) --

        The identifier of the test case.

      • Name (string) --

        The name of the test case.

      • Content (string) --

        The JSON string that represents the content of the test.

      • EntryPoint (dict) --

        Defines the starting point for the test, including channel type and parameters.

        • Type (string) --

          The type of entry point.

        • VoiceCallEntryPointParameters (dict) --

          Parameters for voice call entry point.

          • SourcePhoneNumber (string) --

            The source phone number for the test.

          • DestinationPhoneNumber (string) --

            The destination phone number for the test.

          • FlowId (string) --

            The flow identifier for the test.

        • ChatEntryPointParameters (dict) --

          Parameters for chat entry point.

          • FlowId (string) --

            The flow identifier for the test.

      • InitializationData (string) --

        Defines the test attributes for precise data representation.

      • Description (string) --

        The description of the test case.

      • Status (string) --

        Indicates the test status as either SAVED or PUBLISHED.

      • LastModifiedTime (datetime) --

        The time at which the test case was last modified.

      • LastModifiedRegion (string) --

        The region in which the test case was last modified.

      • Tags (dict) --

        The tags used to organize, track, or control access for this resource.

        • (string) --

          • (string) --

      • TestCaseSha256 (string) --

        The SHA256 hash of the test case content.

SearchTestCases (updated) Link ¶
Changes (response)
{'TestCases': {'EntryPoint': {'ChatEntryPointParameters': {'FlowId': 'string'},
                              'Type': {'CHAT'}}}}

Searches for test cases in the specified Amazon Connect instance, with optional filtering.

See also: AWS API Documentation

Request Syntax

client.search_test_cases(
    InstanceId='string',
    NextToken='string',
    MaxResults=123,
    SearchFilter={
        'TagFilter': {
            'OrConditions': [
                [
                    {
                        'TagKey': 'string',
                        'TagValue': 'string'
                    },
                ],
            ],
            'AndConditions': [
                {
                    'TagKey': 'string',
                    'TagValue': 'string'
                },
            ],
            'TagCondition': {
                'TagKey': 'string',
                'TagValue': 'string'
            }
        }
    },
    SearchCriteria={
        'OrConditions': [
            {'... recursive ...'},
        ],
        'AndConditions': [
            {'... recursive ...'},
        ],
        'StringCondition': {
            'FieldName': 'string',
            'Value': 'string',
            'ComparisonType': 'STARTS_WITH'|'CONTAINS'|'EXACT'
        },
        'StatusCondition': 'PUBLISHED'|'SAVED'
    }
)
type InstanceId:

string

param InstanceId:

[REQUIRED]

The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

type NextToken:

string

param NextToken:

The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

type MaxResults:

integer

param MaxResults:

The maximum number of results to return per page.

type SearchFilter:

dict

param SearchFilter:

Filters to be applied to search results.

  • TagFilter (dict) --

    An object that can be used to specify Tag conditions inside the SearchFilter. This accepts an OR of AND (List of List) input where: Top level list specifies conditions that need to be applied with OR operator. Inner list specifies conditions that need to be applied with AND operator.

    • OrConditions (list) --

      A list of conditions which would be applied together with an OR condition.

      • (list) --

        • (dict) --

          A leaf node condition which can be used to specify a tag condition, for example, HAVE BPO = 123.

          • TagKey (string) --

            The tag key in the tag condition.

          • TagValue (string) --

            The tag value in the tag condition.

    • AndConditions (list) --

      A list of conditions which would be applied together with an AND condition.

      • (dict) --

        A leaf node condition which can be used to specify a tag condition, for example, HAVE BPO = 123.

        • TagKey (string) --

          The tag key in the tag condition.

        • TagValue (string) --

          The tag value in the tag condition.

    • TagCondition (dict) --

      A leaf node condition which can be used to specify a tag condition.

      • TagKey (string) --

        The tag key in the tag condition.

      • TagValue (string) --

        The tag value in the tag condition.

type SearchCriteria:

dict

param SearchCriteria:

The search criteria to be used to return test cases.

  • OrConditions (list) --

    A list of conditions which would be applied together with an OR condition.

    • (dict) --

      The search criteria to be used to return test cases.

  • AndConditions (list) --

    A list of conditions which would be applied together with an AND condition.

    • (dict) --

      The search criteria to be used to return test cases.

  • StringCondition (dict) --

    A leaf node condition which can be used to specify a string condition.

    • FieldName (string) --

      The name of the field in the string condition.

    • Value (string) --

      The value of the string.

    • ComparisonType (string) --

      The type of comparison to be made when evaluating the string condition.

  • StatusCondition (string) --

    The status of the test case.

rtype:

dict

returns:

Response Syntax

{
    'TestCases': [
        {
            'Arn': 'string',
            'Id': 'string',
            'Name': 'string',
            'Content': 'string',
            'EntryPoint': {
                'Type': 'VOICE_CALL'|'CHAT',
                'VoiceCallEntryPointParameters': {
                    'SourcePhoneNumber': 'string',
                    'DestinationPhoneNumber': 'string',
                    'FlowId': 'string'
                },
                'ChatEntryPointParameters': {
                    'FlowId': 'string'
                }
            },
            'InitializationData': 'string',
            'Description': 'string',
            'Status': 'PUBLISHED'|'SAVED',
            'LastModifiedTime': datetime(2015, 1, 1),
            'LastModifiedRegion': 'string',
            'Tags': {
                'string': 'string'
            },
            'TestCaseSha256': 'string'
        },
    ],
    'NextToken': 'string',
    'ApproximateTotalCount': 123
}

Response Structure

  • (dict) --

    • TestCases (list) --

      Information about the test cases.

      • (dict) --

        Contains information about a test case.

        • Arn (string) --

          The Amazon Resource Name (ARN) of the test case.

        • Id (string) --

          The identifier of the test case.

        • Name (string) --

          The name of the test case.

        • Content (string) --

          The JSON string that represents the content of the test.

        • EntryPoint (dict) --

          Defines the starting point for the test, including channel type and parameters.

          • Type (string) --

            The type of entry point.

          • VoiceCallEntryPointParameters (dict) --

            Parameters for voice call entry point.

            • SourcePhoneNumber (string) --

              The source phone number for the test.

            • DestinationPhoneNumber (string) --

              The destination phone number for the test.

            • FlowId (string) --

              The flow identifier for the test.

          • ChatEntryPointParameters (dict) --

            Parameters for chat entry point.

            • FlowId (string) --

              The flow identifier for the test.

        • InitializationData (string) --

          Defines the test attributes for precise data representation.

        • Description (string) --

          The description of the test case.

        • Status (string) --

          Indicates the test status as either SAVED or PUBLISHED.

        • LastModifiedTime (datetime) --

          The time at which the test case was last modified.

        • LastModifiedRegion (string) --

          The region in which the test case was last modified.

        • Tags (dict) --

          The tags used to organize, track, or control access for this resource.

          • (string) --

            • (string) --

        • TestCaseSha256 (string) --

          The SHA256 hash of the test case content.

    • NextToken (string) --

      If there are additional results, this is the token for the next set of results.

    • ApproximateTotalCount (integer) --

      The total number of test cases which matched your search query.

UpdateTestCase (updated) Link ¶
Changes (request)
{'EntryPoint': {'ChatEntryPointParameters': {'FlowId': 'string'},
                'Type': {'CHAT'}}}

Updates any of the metadata for a test case, such as the name, description, and status or content of an existing test case. This API doesn't allow customers to update the tags of the test case resource for the specified Amazon Connect instance.

See also: AWS API Documentation

Request Syntax

client.update_test_case(
    InstanceId='string',
    TestCaseId='string',
    Content='string',
    EntryPoint={
        'Type': 'VOICE_CALL'|'CHAT',
        'VoiceCallEntryPointParameters': {
            'SourcePhoneNumber': 'string',
            'DestinationPhoneNumber': 'string',
            'FlowId': 'string'
        },
        'ChatEntryPointParameters': {
            'FlowId': 'string'
        }
    },
    InitializationData='string',
    Name='string',
    Description='string',
    Status='PUBLISHED'|'SAVED',
    LastModifiedTime=datetime(2015, 1, 1),
    LastModifiedRegion='string'
)
type InstanceId:

string

param InstanceId:

[REQUIRED]

The identifier of the Amazon Connect instance.

type TestCaseId:

string

param TestCaseId:

[REQUIRED]

The identifier of the test case to update.

type Content:

string

param Content:

The JSON string that represents the content of the test.

type EntryPoint:

dict

param EntryPoint:

Defines the starting point for your test.

  • Type (string) --

    The type of entry point.

  • VoiceCallEntryPointParameters (dict) --

    Parameters for voice call entry point.

    • SourcePhoneNumber (string) --

      The source phone number for the test.

    • DestinationPhoneNumber (string) --

      The destination phone number for the test.

    • FlowId (string) --

      The flow identifier for the test.

  • ChatEntryPointParameters (dict) --

    Parameters for chat entry point.

    • FlowId (string) --

      The flow identifier for the test.

type InitializationData:

string

param InitializationData:

Defines the test attributes for precise data representation.

type Name:

string

param Name:

The name of the test case.

type Description:

string

param Description:

The description of the test case.

type Status:

string

param Status:

Indicates the test status as either SAVED or PUBLISHED. The PUBLISHED status will initiate validation on the content. The SAVED status does not initiate validation of the content.

type LastModifiedTime:

datetime

param LastModifiedTime:

The time at which the resource was last modified.

type LastModifiedRegion:

string

param LastModifiedRegion:

The region in which the resource was last modified

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --