Amazon Connect Customer Profiles

2023/06/01 - Amazon Connect Customer Profiles - 7 new api methods

Changes  This release introduces calculated attribute related APIs.

CreateCalculatedAttributeDefinition (new) Link ¶

Creates a new calculated attribute definition. After creation, new object data ingested into Customer Profiles will be included in the calculated attribute, which can be retrieved for a profile using the GetCalculatedAttributeForProfile API. Defining a calculated attribute makes it available for all profiles within a domain. Each calculated attribute can only reference one ObjectType and at most, two fields from that ObjectType .

See also: AWS API Documentation

Request Syntax

client.create_calculated_attribute_definition(
    DomainName='string',
    CalculatedAttributeName='string',
    DisplayName='string',
    Description='string',
    AttributeDetails={
        'Attributes': [
            {
                'Name': 'string'
            },
        ],
        'Expression': 'string'
    },
    Conditions={
        'Range': {
            'Value': 123,
            'Unit': 'DAYS'
        },
        'ObjectCount': 123,
        'Threshold': {
            'Value': 'string',
            'Operator': 'EQUAL_TO'|'GREATER_THAN'|'LESS_THAN'|'NOT_EQUAL_TO'
        }
    },
    Statistic='FIRST_OCCURRENCE'|'LAST_OCCURRENCE'|'COUNT'|'SUM'|'MINIMUM'|'MAXIMUM'|'AVERAGE'|'MAX_OCCURRENCE',
    Tags={
        'string': 'string'
    }
)
type DomainName

string

param DomainName

[REQUIRED]

The unique name of the domain.

type CalculatedAttributeName

string

param CalculatedAttributeName

[REQUIRED]

The unique name of the calculated attribute.

type DisplayName

string

param DisplayName

The display name of the calculated attribute.

type Description

string

param Description

The description of the calculated attribute.

type AttributeDetails

dict

param AttributeDetails

[REQUIRED]

Mathematical expression and a list of attribute items specified in that expression.

  • Attributes (list) -- [REQUIRED]

    A list of attribute items specified in the mathematical expression.

    • (dict) --

      The details of a single attribute item specified in the mathematical expression.

      • Name (string) -- [REQUIRED]

        The name of an attribute defined in a profile object type.

  • Expression (string) -- [REQUIRED]

    Mathematical expression that is performed on attribute items provided in the attribute list. Each element in the expression should follow the structure of "{ObjectTypeName.AttributeName}".

type Conditions

dict

param Conditions

The conditions including range, object count, and threshold for the calculated attribute.

  • Range (dict) --

    The relative time period over which data is included in the aggregation.

    • Value (integer) -- [REQUIRED]

      The amount of time of the specified unit.

    • Unit (string) -- [REQUIRED]

      The unit of time.

  • ObjectCount (integer) --

    The number of profile objects used for the calculated attribute.

  • Threshold (dict) --

    The threshold for the calculated attribute.

    • Value (string) -- [REQUIRED]

      The value of the threshold.

    • Operator (string) -- [REQUIRED]

      The operator of the threshold.

type Statistic

string

param Statistic

[REQUIRED]

The aggregation operation to perform for the calculated attribute.

type Tags

dict

param Tags

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

  • (string) --

    • (string) --

rtype

dict

returns

Response Syntax

{
    'CalculatedAttributeName': 'string',
    'DisplayName': 'string',
    'Description': 'string',
    'AttributeDetails': {
        'Attributes': [
            {
                'Name': 'string'
            },
        ],
        'Expression': 'string'
    },
    'Conditions': {
        'Range': {
            'Value': 123,
            'Unit': 'DAYS'
        },
        'ObjectCount': 123,
        'Threshold': {
            'Value': 'string',
            'Operator': 'EQUAL_TO'|'GREATER_THAN'|'LESS_THAN'|'NOT_EQUAL_TO'
        }
    },
    'Statistic': 'FIRST_OCCURRENCE'|'LAST_OCCURRENCE'|'COUNT'|'SUM'|'MINIMUM'|'MAXIMUM'|'AVERAGE'|'MAX_OCCURRENCE',
    'CreatedAt': datetime(2015, 1, 1),
    'LastUpdatedAt': datetime(2015, 1, 1),
    'Tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

    • CalculatedAttributeName (string) --

      The unique name of the calculated attribute.

    • DisplayName (string) --

      The display name of the calculated attribute.

    • Description (string) --

      The description of the calculated attribute.

    • AttributeDetails (dict) --

      Mathematical expression and a list of attribute items specified in that expression.

      • Attributes (list) --

        A list of attribute items specified in the mathematical expression.

        • (dict) --

          The details of a single attribute item specified in the mathematical expression.

          • Name (string) --

            The name of an attribute defined in a profile object type.

      • Expression (string) --

        Mathematical expression that is performed on attribute items provided in the attribute list. Each element in the expression should follow the structure of "{ObjectTypeName.AttributeName}".

    • Conditions (dict) --

      The conditions including range, object count, and threshold for the calculated attribute.

      • Range (dict) --

        The relative time period over which data is included in the aggregation.

        • Value (integer) --

          The amount of time of the specified unit.

        • Unit (string) --

          The unit of time.

      • ObjectCount (integer) --

        The number of profile objects used for the calculated attribute.

      • Threshold (dict) --

        The threshold for the calculated attribute.

        • Value (string) --

          The value of the threshold.

        • Operator (string) --

          The operator of the threshold.

    • Statistic (string) --

      The aggregation operation to perform for the calculated attribute.

    • CreatedAt (datetime) --

      The timestamp of when the calculated attribute definition was created.

    • LastUpdatedAt (datetime) --

      The timestamp of when the calculated attribute definition was most recently edited.

    • Tags (dict) --

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

      • (string) --

        • (string) --

GetCalculatedAttributeDefinition (new) Link ¶

Provides more information on a calculated attribute definition for Customer Profiles.

See also: AWS API Documentation

Request Syntax

client.get_calculated_attribute_definition(
    DomainName='string',
    CalculatedAttributeName='string'
)
type DomainName

string

param DomainName

[REQUIRED]

The unique name of the domain.

type CalculatedAttributeName

string

param CalculatedAttributeName

[REQUIRED]

The unique name of the calculated attribute.

rtype

dict

returns

Response Syntax

{
    'CalculatedAttributeName': 'string',
    'DisplayName': 'string',
    'Description': 'string',
    'CreatedAt': datetime(2015, 1, 1),
    'LastUpdatedAt': datetime(2015, 1, 1),
    'Statistic': 'FIRST_OCCURRENCE'|'LAST_OCCURRENCE'|'COUNT'|'SUM'|'MINIMUM'|'MAXIMUM'|'AVERAGE'|'MAX_OCCURRENCE',
    'Conditions': {
        'Range': {
            'Value': 123,
            'Unit': 'DAYS'
        },
        'ObjectCount': 123,
        'Threshold': {
            'Value': 'string',
            'Operator': 'EQUAL_TO'|'GREATER_THAN'|'LESS_THAN'|'NOT_EQUAL_TO'
        }
    },
    'AttributeDetails': {
        'Attributes': [
            {
                'Name': 'string'
            },
        ],
        'Expression': 'string'
    },
    'Tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

    • CalculatedAttributeName (string) --

      The unique name of the calculated attribute.

    • DisplayName (string) --

      The display name of the calculated attribute.

    • Description (string) --

      The description of the calculated attribute.

    • CreatedAt (datetime) --

      The timestamp of when the calculated attribute definition was created.

    • LastUpdatedAt (datetime) --

      The timestamp of when the calculated attribute definition was most recently edited.

    • Statistic (string) --

      The aggregation operation to perform for the calculated attribute.

    • Conditions (dict) --

      The conditions including range, object count, and threshold for the calculated attribute.

      • Range (dict) --

        The relative time period over which data is included in the aggregation.

        • Value (integer) --

          The amount of time of the specified unit.

        • Unit (string) --

          The unit of time.

      • ObjectCount (integer) --

        The number of profile objects used for the calculated attribute.

      • Threshold (dict) --

        The threshold for the calculated attribute.

        • Value (string) --

          The value of the threshold.

        • Operator (string) --

          The operator of the threshold.

    • AttributeDetails (dict) --

      Mathematical expression and a list of attribute items specified in that expression.

      • Attributes (list) --

        A list of attribute items specified in the mathematical expression.

        • (dict) --

          The details of a single attribute item specified in the mathematical expression.

          • Name (string) --

            The name of an attribute defined in a profile object type.

      • Expression (string) --

        Mathematical expression that is performed on attribute items provided in the attribute list. Each element in the expression should follow the structure of "{ObjectTypeName.AttributeName}".

    • Tags (dict) --

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

      • (string) --

        • (string) --

UpdateCalculatedAttributeDefinition (new) Link ¶

Updates an existing calculated attribute definition. When updating the Conditions, note that increasing the date range of a calculated attribute will not trigger inclusion of historical data greater than the current date range.

See also: AWS API Documentation

Request Syntax

client.update_calculated_attribute_definition(
    DomainName='string',
    CalculatedAttributeName='string',
    DisplayName='string',
    Description='string',
    Conditions={
        'Range': {
            'Value': 123,
            'Unit': 'DAYS'
        },
        'ObjectCount': 123,
        'Threshold': {
            'Value': 'string',
            'Operator': 'EQUAL_TO'|'GREATER_THAN'|'LESS_THAN'|'NOT_EQUAL_TO'
        }
    }
)
type DomainName

string

param DomainName

[REQUIRED]

The unique name of the domain.

type CalculatedAttributeName

string

param CalculatedAttributeName

[REQUIRED]

The unique name of the calculated attribute.

type DisplayName

string

param DisplayName

The display name of the calculated attribute.

type Description

string

param Description

The description of the calculated attribute.

type Conditions

dict

param Conditions

The conditions including range, object count, and threshold for the calculated attribute.

  • Range (dict) --

    The relative time period over which data is included in the aggregation.

    • Value (integer) -- [REQUIRED]

      The amount of time of the specified unit.

    • Unit (string) -- [REQUIRED]

      The unit of time.

  • ObjectCount (integer) --

    The number of profile objects used for the calculated attribute.

  • Threshold (dict) --

    The threshold for the calculated attribute.

    • Value (string) -- [REQUIRED]

      The value of the threshold.

    • Operator (string) -- [REQUIRED]

      The operator of the threshold.

rtype

dict

returns

Response Syntax

{
    'CalculatedAttributeName': 'string',
    'DisplayName': 'string',
    'Description': 'string',
    'CreatedAt': datetime(2015, 1, 1),
    'LastUpdatedAt': datetime(2015, 1, 1),
    'Statistic': 'FIRST_OCCURRENCE'|'LAST_OCCURRENCE'|'COUNT'|'SUM'|'MINIMUM'|'MAXIMUM'|'AVERAGE'|'MAX_OCCURRENCE',
    'Conditions': {
        'Range': {
            'Value': 123,
            'Unit': 'DAYS'
        },
        'ObjectCount': 123,
        'Threshold': {
            'Value': 'string',
            'Operator': 'EQUAL_TO'|'GREATER_THAN'|'LESS_THAN'|'NOT_EQUAL_TO'
        }
    },
    'AttributeDetails': {
        'Attributes': [
            {
                'Name': 'string'
            },
        ],
        'Expression': 'string'
    },
    'Tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

    • CalculatedAttributeName (string) --

      The unique name of the calculated attribute.

    • DisplayName (string) --

      The display name of the calculated attribute.

    • Description (string) --

      The description of the calculated attribute.

    • CreatedAt (datetime) --

      The timestamp of when the calculated attribute definition was created.

    • LastUpdatedAt (datetime) --

      The timestamp of when the calculated attribute definition was most recently edited.

    • Statistic (string) --

      The aggregation operation to perform for the calculated attribute.

    • Conditions (dict) --

      The conditions including range, object count, and threshold for the calculated attribute.

      • Range (dict) --

        The relative time period over which data is included in the aggregation.

        • Value (integer) --

          The amount of time of the specified unit.

        • Unit (string) --

          The unit of time.

      • ObjectCount (integer) --

        The number of profile objects used for the calculated attribute.

      • Threshold (dict) --

        The threshold for the calculated attribute.

        • Value (string) --

          The value of the threshold.

        • Operator (string) --

          The operator of the threshold.

    • AttributeDetails (dict) --

      The mathematical expression and a list of attribute items specified in that expression.

      • Attributes (list) --

        A list of attribute items specified in the mathematical expression.

        • (dict) --

          The details of a single attribute item specified in the mathematical expression.

          • Name (string) --

            The name of an attribute defined in a profile object type.

      • Expression (string) --

        Mathematical expression that is performed on attribute items provided in the attribute list. Each element in the expression should follow the structure of "{ObjectTypeName.AttributeName}".

    • Tags (dict) --

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

      • (string) --

        • (string) --

ListCalculatedAttributeDefinitions (new) Link ¶

Lists calculated attribute definitions for Customer Profiles

See also: AWS API Documentation

Request Syntax

client.list_calculated_attribute_definitions(
    DomainName='string',
    NextToken='string',
    MaxResults=123
)
type DomainName

string

param DomainName

[REQUIRED]

The unique name of the domain.

type NextToken

string

param NextToken

The pagination token from the previous call to ListCalculatedAttributeDefinitions.

type MaxResults

integer

param MaxResults

The maximum number of calculated attribute definitions returned per page.

rtype

dict

returns

Response Syntax

{
    'Items': [
        {
            'CalculatedAttributeName': 'string',
            'DisplayName': 'string',
            'Description': 'string',
            'CreatedAt': datetime(2015, 1, 1),
            'LastUpdatedAt': datetime(2015, 1, 1),
            'Tags': {
                'string': 'string'
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Items (list) --

      The list of calculated attribute definitions.

      • (dict) --

        The details of a single calculated attribute definition.

        • CalculatedAttributeName (string) --

          The unique name of the calculated attribute.

        • DisplayName (string) --

          The display name of the calculated attribute.

        • Description (string) --

          The threshold for the calculated attribute.

        • CreatedAt (datetime) --

          The threshold for the calculated attribute.

        • LastUpdatedAt (datetime) --

          The timestamp of when the calculated attribute definition was most recently edited.

        • Tags (dict) --

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

          • (string) --

            • (string) --

    • NextToken (string) --

      The pagination token from the previous call to ListCalculatedAttributeDefinitions.

GetCalculatedAttributeForProfile (new) Link ¶

Retrieve a calculated attribute for a customer profile.

See also: AWS API Documentation

Request Syntax

client.get_calculated_attribute_for_profile(
    DomainName='string',
    ProfileId='string',
    CalculatedAttributeName='string'
)
type DomainName

string

param DomainName

[REQUIRED]

The unique name of the domain.

type ProfileId

string

param ProfileId

[REQUIRED]

The unique identifier of a customer profile.

type CalculatedAttributeName

string

param CalculatedAttributeName

[REQUIRED]

The unique name of the calculated attribute.

rtype

dict

returns

Response Syntax

{
    'CalculatedAttributeName': 'string',
    'DisplayName': 'string',
    'IsDataPartial': 'string',
    'Value': 'string'
}

Response Structure

  • (dict) --

    • CalculatedAttributeName (string) --

      The unique name of the calculated attribute.

    • DisplayName (string) --

      The display name of the calculated attribute.

    • IsDataPartial (string) --

      Indicates whether the calculated attribute’s value is based on partial data. If data is partial, it is set to true.

    • Value (string) --

      The value of the calculated attribute.

ListCalculatedAttributesForProfile (new) Link ¶

Retrieve a list of calculated attributes for a customer profile.

See also: AWS API Documentation

Request Syntax

client.list_calculated_attributes_for_profile(
    NextToken='string',
    MaxResults=123,
    DomainName='string',
    ProfileId='string'
)
type NextToken

string

param NextToken

The pagination token from the previous call to ListCalculatedAttributesForProfile.

type MaxResults

integer

param MaxResults

The maximum number of calculated attributes returned per page.

type DomainName

string

param DomainName

[REQUIRED]

The unique name of the domain.

type ProfileId

string

param ProfileId

[REQUIRED]

The unique identifier of a customer profile.

rtype

dict

returns

Response Syntax

{
    'Items': [
        {
            'CalculatedAttributeName': 'string',
            'DisplayName': 'string',
            'IsDataPartial': 'string',
            'Value': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Items (list) --

      The list of calculated attributes.

      • (dict) --

        The details of a single calculated attribute for a profile.

        • CalculatedAttributeName (string) --

          The unique name of the calculated attribute.

        • DisplayName (string) --

          The display name of the calculated attribute.

        • IsDataPartial (string) --

          Indicates whether the calculated attribute’s value is based on partial data. If data is partial, it is set to true.

        • Value (string) --

          The value of the calculated attribute.

    • NextToken (string) --

      The pagination token from the previous call to ListCalculatedAttributesForProfile.

DeleteCalculatedAttributeDefinition (new) Link ¶

Deletes an existing calculated attribute definition. Note that deleting a default calculated attribute is possible, however once deleted, you will be unable to undo that action and will need to recreate it on your own using the CreateCalculatedAttributeDefinition API if you want it back.

See also: AWS API Documentation

Request Syntax

client.delete_calculated_attribute_definition(
    DomainName='string',
    CalculatedAttributeName='string'
)
type DomainName

string

param DomainName

[REQUIRED]

The unique name of the domain.

type CalculatedAttributeName

string

param CalculatedAttributeName

[REQUIRED]

The unique name of the calculated attribute.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --