Amazon Connect Service

2024/05/14 - Amazon Connect Service - 2 new 3 updated api methods

Changes  Amazon Connect provides enhanced search capabilities for flows & flow modules on the Connect admin website and programmatically using APIs. You can search for flows and flow modules by name, description, type, status, and tags, to filter and identify a specific flow in your Connect instances.

SearchContactFlowModules (new) Link ¶

Searches the flow modules in an Amazon Connect instance, with optional filtering.

See also: AWS API Documentation

Request Syntax

client.search_contact_flow_modules(
    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'
        }
    }
)
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 contact flow modules.

Note

The name and description fields support "contains" queries with a minimum of 2 characters and a maximum of 25 characters. Any queries with character lengths outside of this range will result in invalid results.

  • OrConditions (list) --

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

    • (dict) --

      The search criteria to be used to return flow modules.

  • AndConditions (list) --

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

    • (dict) --

      The search criteria to be used to return flow modules.

  • StringCondition (dict) --

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

    Note

    The currently supported values for FieldName are name and description .

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

rtype

dict

returns

Response Syntax

{
    'ContactFlowModules': [
        {
            'Arn': 'string',
            'Id': 'string',
            'Name': 'string',
            'Content': 'string',
            'Description': 'string',
            'State': 'ACTIVE'|'ARCHIVED',
            'Status': 'PUBLISHED'|'SAVED',
            'Tags': {
                'string': 'string'
            }
        },
    ],
    'NextToken': 'string',
    'ApproximateTotalCount': 123
}

Response Structure

  • (dict) --

    • ContactFlowModules (list) --

      The search criteria to be used to return contact flow modules.

      • (dict) --

        Contains information about a flow module.

        • Arn (string) --

          The Amazon Resource Name (ARN).

        • Id (string) --

          The identifier of the flow module.

        • Name (string) --

          The name of the flow module.

        • Content (string) --

          The JSON string that represents the content of the flow. For an example, see Example flow in Amazon Connect Flow language.

        • Description (string) --

          The description of the flow module.

        • State (string) --

          The type of flow module.

        • Status (string) --

          The status of the flow module.

        • Tags (dict) --

          The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.

          • (string) --

            • (string) --

    • NextToken (string) --

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

    • ApproximateTotalCount (integer) --

      The total number of contact flows which matched your search query.

SearchContactFlows (new) Link ¶

Searches the contact flows in an Amazon Connect instance, with optional filtering.

See also: AWS API Documentation

Request Syntax

client.search_contact_flows(
    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'
        },
        'TypeCondition': 'CONTACT_FLOW'|'CUSTOMER_QUEUE'|'CUSTOMER_HOLD'|'CUSTOMER_WHISPER'|'AGENT_HOLD'|'AGENT_WHISPER'|'OUTBOUND_WHISPER'|'AGENT_TRANSFER'|'QUEUE_TRANSFER',
        'StateCondition': 'ACTIVE'|'ARCHIVED',
        '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 flows.

Note

The name and description fields support "contains" queries with a minimum of 2 characters and a maximum of 25 characters. Any queries with character lengths outside of this range will result in invalid results.

  • OrConditions (list) --

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

    • (dict) --

      The search criteria to be used to return contact flows.

  • AndConditions (list) --

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

    • (dict) --

      The search criteria to be used to return contact flows.

  • StringCondition (dict) --

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

    Note

    The currently supported values for FieldName are name and description .

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

  • TypeCondition (string) --

    The type of flow.

  • StateCondition (string) --

    The state of the flow.

  • StatusCondition (string) --

    The status of the flow.

rtype

dict

returns

Response Syntax

{
    'ContactFlows': [
        {
            'Arn': 'string',
            'Id': 'string',
            'Name': 'string',
            'Type': 'CONTACT_FLOW'|'CUSTOMER_QUEUE'|'CUSTOMER_HOLD'|'CUSTOMER_WHISPER'|'AGENT_HOLD'|'AGENT_WHISPER'|'OUTBOUND_WHISPER'|'AGENT_TRANSFER'|'QUEUE_TRANSFER',
            'State': 'ACTIVE'|'ARCHIVED',
            'Status': 'PUBLISHED'|'SAVED',
            'Description': 'string',
            'Content': 'string',
            'Tags': {
                'string': 'string'
            }
        },
    ],
    'NextToken': 'string',
    'ApproximateTotalCount': 123
}

Response Structure

  • (dict) --

    • ContactFlows (list) --

      Information about the contact flows.

      • (dict) --

        Contains information about a flow.

        • Arn (string) --

          The Amazon Resource Name (ARN) of the flow.

        • Id (string) --

          The identifier of the flow.

        • Name (string) --

          The name of the flow.

        • Type (string) --

          The type of the flow. For descriptions of the available types, see Choose a flow type in the Amazon Connect Administrator Guide .

        • State (string) --

          The type of flow.

        • Status (string) --

          The status of the contact flow.

        • Description (string) --

          The description of the flow.

        • Content (string) --

          The JSON string that represents the content of the flow. For an example, see Example flow in Amazon Connect Flow language.

          Length Constraints: Minimum length of 1. Maximum length of 256000.

        • Tags (dict) --

          The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.

          • (string) --

            • (string) --

    • NextToken (string) --

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

    • ApproximateTotalCount (integer) --

      The total number of contact flows which matched your search query.

CreateContactFlow (updated) Link ¶
Changes (request)
{'Status': 'PUBLISHED | SAVED'}

Creates a flow for the specified Amazon Connect instance.

You can also create and update flows using the Amazon Connect Flow language.

See also: AWS API Documentation

Request Syntax

client.create_contact_flow(
    InstanceId='string',
    Name='string',
    Type='CONTACT_FLOW'|'CUSTOMER_QUEUE'|'CUSTOMER_HOLD'|'CUSTOMER_WHISPER'|'AGENT_HOLD'|'AGENT_WHISPER'|'OUTBOUND_WHISPER'|'AGENT_TRANSFER'|'QUEUE_TRANSFER',
    Description='string',
    Content='string',
    Status='PUBLISHED'|'SAVED',
    Tags={
        'string': 'string'
    }
)
type InstanceId

string

param InstanceId

[REQUIRED]

The identifier of the Amazon Connect instance.

type Name

string

param Name

[REQUIRED]

The name of the flow.

type Type

string

param Type

[REQUIRED]

The type of the flow. For descriptions of the available types, see Choose a flow type in the Amazon Connect Administrator Guide .

type Description

string

param Description

The description of the flow.

type Content

string

param Content

[REQUIRED]

The JSON string that represents the content of the flow. For an example, see Example flow in Amazon Connect Flow language.

Length Constraints: Minimum length of 1. Maximum length of 256000.

type Status

string

param Status

Indicates the flow 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. SAVED | PUBLISHED .

type Tags

dict

param Tags

The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.

  • (string) --

    • (string) --

rtype

dict

returns

Response Syntax

{
    'ContactFlowId': 'string',
    'ContactFlowArn': 'string'
}

Response Structure

  • (dict) --

    • ContactFlowId (string) --

      The identifier of the flow.

    • ContactFlowArn (string) --

      The Amazon Resource Name (ARN) of the flow.

DescribeContactFlow (updated) Link ¶
Changes (response)
{'ContactFlow': {'Status': 'PUBLISHED | SAVED'}}

Describes the specified flow.

You can also create and update flows using the Amazon Connect Flow language.

Use the $SAVED alias in the request to describe the SAVED content of a Flow. For example, arn:aws:.../contact-flow/{id}:$SAVED . Once a contact flow is published, $SAVED needs to be supplied to view saved content that has not been published.

In the response, Status indicates the flow status as either SAVED or PUBLISHED . The PUBLISHED status will initiate validation on the content. SAVED does not initiate validation of the content. SAVED | PUBLISHED

See also: AWS API Documentation

Request Syntax

client.describe_contact_flow(
    InstanceId='string',
    ContactFlowId='string'
)
type InstanceId

string

param InstanceId

[REQUIRED]

The identifier of the Amazon Connect instance.

type ContactFlowId

string

param ContactFlowId

[REQUIRED]

The identifier of the flow.

rtype

dict

returns

Response Syntax

{
    'ContactFlow': {
        'Arn': 'string',
        'Id': 'string',
        'Name': 'string',
        'Type': 'CONTACT_FLOW'|'CUSTOMER_QUEUE'|'CUSTOMER_HOLD'|'CUSTOMER_WHISPER'|'AGENT_HOLD'|'AGENT_WHISPER'|'OUTBOUND_WHISPER'|'AGENT_TRANSFER'|'QUEUE_TRANSFER',
        'State': 'ACTIVE'|'ARCHIVED',
        'Status': 'PUBLISHED'|'SAVED',
        'Description': 'string',
        'Content': 'string',
        'Tags': {
            'string': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • ContactFlow (dict) --

      Information about the flow.

      • Arn (string) --

        The Amazon Resource Name (ARN) of the flow.

      • Id (string) --

        The identifier of the flow.

      • Name (string) --

        The name of the flow.

      • Type (string) --

        The type of the flow. For descriptions of the available types, see Choose a flow type in the Amazon Connect Administrator Guide .

      • State (string) --

        The type of flow.

      • Status (string) --

        The status of the contact flow.

      • Description (string) --

        The description of the flow.

      • Content (string) --

        The JSON string that represents the content of the flow. For an example, see Example flow in Amazon Connect Flow language.

        Length Constraints: Minimum length of 1. Maximum length of 256000.

      • Tags (dict) --

        The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.

        • (string) --

          • (string) --

ListContactFlows (updated) Link ¶
Changes (response)
{'ContactFlowSummaryList': {'ContactFlowStatus': 'PUBLISHED | SAVED'}}

Provides information about the flows for the specified Amazon Connect instance.

You can also create and update flows using the Amazon Connect Flow language.

For more information about flows, see Flows in the Amazon Connect Administrator Guide .

See also: AWS API Documentation

Request Syntax

client.list_contact_flows(
    InstanceId='string',
    ContactFlowTypes=[
        'CONTACT_FLOW'|'CUSTOMER_QUEUE'|'CUSTOMER_HOLD'|'CUSTOMER_WHISPER'|'AGENT_HOLD'|'AGENT_WHISPER'|'OUTBOUND_WHISPER'|'AGENT_TRANSFER'|'QUEUE_TRANSFER',
    ],
    NextToken='string',
    MaxResults=123
)
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 ContactFlowTypes

list

param ContactFlowTypes

The type of flow.

  • (string) --

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. The default MaxResult size is 100.

rtype

dict

returns

Response Syntax

{
    'ContactFlowSummaryList': [
        {
            'Id': 'string',
            'Arn': 'string',
            'Name': 'string',
            'ContactFlowType': 'CONTACT_FLOW'|'CUSTOMER_QUEUE'|'CUSTOMER_HOLD'|'CUSTOMER_WHISPER'|'AGENT_HOLD'|'AGENT_WHISPER'|'OUTBOUND_WHISPER'|'AGENT_TRANSFER'|'QUEUE_TRANSFER',
            'ContactFlowState': 'ACTIVE'|'ARCHIVED',
            'ContactFlowStatus': 'PUBLISHED'|'SAVED'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • ContactFlowSummaryList (list) --

      Information about the flows.

      • (dict) --

        Contains summary information about a flow.

        You can also create and update flows using the Amazon Connect Flow language.

        • Id (string) --

          The identifier of the flow.

        • Arn (string) --

          The Amazon Resource Name (ARN) of the flow.

        • Name (string) --

          The name of the flow.

        • ContactFlowType (string) --

          The type of flow.

        • ContactFlowState (string) --

          The type of flow.

        • ContactFlowStatus (string) --

          The status of the contact flow.

    • NextToken (string) --

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