Amazon Connect Customer Profiles

2021/04/30 - Amazon Connect Customer Profiles - 2 new 3 updated api methods

Changes  This release introduces GetMatches and MergeProfiles APIs to fetch and merge duplicate profiles

MergeProfiles (new) Link ¶

This API is in preview release for Amazon Connect and subject to change.

Runs an AWS Lambda job that does the following:

  • All the profileKeys in the ProfileToBeMerged will be moved to the main profile.

  • All the objects in the ProfileToBeMerged will be moved to the main profile.

  • All the ProfileToBeMerged will be deleted at the end.

  • All the profileKeys in the ProfileIdsToBeMerged will be moved to the main profile.

  • Standard fields are merged as follows:

    • Fields are always "union"-ed if there are no conflicts in standard fields or attributeKeys.

    • When there are conflicting fields:

      • If no SourceProfileIds entry is specified, the main Profile value is always taken.

      • If a SourceProfileIds entry is specified, the specified profileId is always taken, even if it is a NULL value.

You can use MergeProfiles together with GetMatches , which returns potentially matching profiles, or use it with the results of another matching system. After profiles have been merged, they cannot be separated (unmerged).

See also: AWS API Documentation

Request Syntax

client.merge_profiles(
    DomainName='string',
    MainProfileId='string',
    ProfileIdsToBeMerged=[
        'string',
    ],
    FieldSourceProfileIds={
        'AccountNumber': 'string',
        'AdditionalInformation': 'string',
        'PartyType': 'string',
        'BusinessName': 'string',
        'FirstName': 'string',
        'MiddleName': 'string',
        'LastName': 'string',
        'BirthDate': 'string',
        'Gender': 'string',
        'PhoneNumber': 'string',
        'MobilePhoneNumber': 'string',
        'HomePhoneNumber': 'string',
        'BusinessPhoneNumber': 'string',
        'EmailAddress': 'string',
        'PersonalEmailAddress': 'string',
        'BusinessEmailAddress': 'string',
        'Address': 'string',
        'ShippingAddress': 'string',
        'MailingAddress': 'string',
        'BillingAddress': 'string',
        'Attributes': {
            'string': 'string'
        }
    }
)
type DomainName

string

param DomainName

[REQUIRED]

The unique name of the domain.

type MainProfileId

string

param MainProfileId

[REQUIRED]

The identifier of the profile to be taken.

type ProfileIdsToBeMerged

list

param ProfileIdsToBeMerged

[REQUIRED]

The identifier of the profile to be merged into MainProfileId.

  • (string) --

type FieldSourceProfileIds

dict

param FieldSourceProfileIds

The identifiers of the fields in the profile that has the information you want to apply to the merge. For example, say you want to merge EmailAddress from Profile1 into MainProfile. This would be the identifier of the EmailAddress field in Profile1.

  • AccountNumber (string) --

    A unique identifier for the account number field to be merged.

  • AdditionalInformation (string) --

    A unique identifier for the additional information field to be merged.

  • PartyType (string) --

    A unique identifier for the party type field to be merged.

  • BusinessName (string) --

    A unique identifier for the business name field to be merged.

  • FirstName (string) --

    A unique identifier for the first name field to be merged.

  • MiddleName (string) --

    A unique identifier for the middle name field to be merged.

  • LastName (string) --

    A unique identifier for the last name field to be merged.

  • BirthDate (string) --

    A unique identifier for the birthdate field to be merged.

  • Gender (string) --

    A unique identifier for the gender field to be merged.

  • PhoneNumber (string) --

    A unique identifier for the phone number field to be merged.

  • MobilePhoneNumber (string) --

    A unique identifier for the mobile phone number field to be merged.

  • HomePhoneNumber (string) --

    A unique identifier for the home phone number field to be merged.

  • BusinessPhoneNumber (string) --

    A unique identifier for the business phone number field to be merged.

  • EmailAddress (string) --

    A unique identifier for the email address field to be merged.

  • PersonalEmailAddress (string) --

    A unique identifier for the personal email address field to be merged.

  • BusinessEmailAddress (string) --

    A unique identifier for the party type field to be merged.

  • Address (string) --

    A unique identifier for the party type field to be merged.

  • ShippingAddress (string) --

    A unique identifier for the shipping address field to be merged.

  • MailingAddress (string) --

    A unique identifier for the mailing address field to be merged.

  • BillingAddress (string) --

    A unique identifier for the billing type field to be merged.

  • Attributes (dict) --

    A unique identifier for the attributes field to be merged.

    • (string) --

      • (string) --

rtype

dict

returns

Response Syntax

{
    'Message': 'string'
}

Response Structure

  • (dict) --

    • Message (string) --

      A message that indicates the merge request is complete.

GetMatches (new) Link ¶

This API is in preview release for Amazon Connect and subject to change.

Before calling this API, use CreateDomain or UpdateDomain to enable identity resolution: set Matching to true.

GetMatches returns potentially matching profiles, based on the results of the latest run of a machine learning process.

Warning

Amazon Connect runs a batch process every Saturday at 12AM UTC to identify matching profiles. The results are returned up to seven days after the Saturday run.

Amazon Connect uses the following profile attributes to identify matches:

  • PhoneNumber

  • HomePhoneNumber

  • BusinessPhoneNumber

  • MobilePhoneNumber

  • EmailAddress

  • PersonalEmailAddress

  • BusinessEmailAddress

  • FullName

  • BusinessName

See also: AWS API Documentation

Request Syntax

client.get_matches(
    NextToken='string',
    MaxResults=123,
    DomainName='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.

type DomainName

string

param DomainName

[REQUIRED]

The unique name of the domain.

rtype

dict

returns

Response Syntax

{
    'NextToken': 'string',
    'MatchGenerationDate': datetime(2015, 1, 1),
    'PotentialMatches': 123,
    'Matches': [
        {
            'MatchId': 'string',
            'ProfileIds': [
                'string',
            ]
        },
    ]
}

Response Structure

  • (dict) --

    • NextToken (string) --

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

    • MatchGenerationDate (datetime) --

      The timestamp this version of Match Result generated.

    • PotentialMatches (integer) --

      The number of potential matches found.

    • Matches (list) --

      The list of matched profiles for this instance.

      • (dict) --

        The Match group object.

        • MatchId (string) --

          The unique identifiers for this group of profiles that match.

        • ProfileIds (list) --

          A list of identifiers for profiles that match.

          • (string) --

CreateDomain (updated) Link ¶
Changes (both)
{'Matching': {'Enabled': 'boolean'}}

Creates a domain, which is a container for all customer data, such as customer profile attributes, object types, profile keys, and encryption keys. You can create multiple domains, and each domain can have multiple third-party integrations.

Each Amazon Connect instance can be associated with only one domain. Multiple Amazon Connect instances can be associated with one domain.

See also: AWS API Documentation

Request Syntax

client.create_domain(
    DomainName='string',
    DefaultExpirationDays=123,
    DefaultEncryptionKey='string',
    DeadLetterQueueUrl='string',
    Matching={
        'Enabled': True|False
    },
    Tags={
        'string': 'string'
    }
)
type DomainName

string

param DomainName

[REQUIRED]

The unique name of the domain.

type DefaultExpirationDays

integer

param DefaultExpirationDays

[REQUIRED]

The default number of days until the data within the domain expires.

type DefaultEncryptionKey

string

param DefaultEncryptionKey

The default encryption key, which is an AWS managed key, is used when no specific type of encryption key is specified. It is used to encrypt all data before it is placed in permanent or semi-permanent storage.

type DeadLetterQueueUrl

string

param DeadLetterQueueUrl

The URL of the SQS dead letter queue, which is used for reporting errors associated with ingesting data from third party applications. You must set up a policy on the DeadLetterQueue for the SendMessage operation to enable Amazon Connect Customer Profiles to send messages to the DeadLetterQueue.

type Matching

dict

param Matching

The process of matching duplicate profiles. This process runs every Saturday at 12AM.

  • Enabled (boolean) -- [REQUIRED]

    The flag that enables the matching process of duplicate profiles.

type Tags

dict

param Tags

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

  • (string) --

    • (string) --

rtype

dict

returns

Response Syntax

{
    'DomainName': 'string',
    'DefaultExpirationDays': 123,
    'DefaultEncryptionKey': 'string',
    'DeadLetterQueueUrl': 'string',
    'Matching': {
        'Enabled': True|False
    },
    'CreatedAt': datetime(2015, 1, 1),
    'LastUpdatedAt': datetime(2015, 1, 1),
    'Tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

    • DomainName (string) --

      The unique name of the domain.

    • DefaultExpirationDays (integer) --

      The default number of days until the data within the domain expires.

    • DefaultEncryptionKey (string) --

      The default encryption key, which is an AWS managed key, is used when no specific type of encryption key is specified. It is used to encrypt all data before it is placed in permanent or semi-permanent storage.

    • DeadLetterQueueUrl (string) --

      The URL of the SQS dead letter queue, which is used for reporting errors associated with ingesting data from third party applications.

    • Matching (dict) --

      The process of matching duplicate profiles. This process runs every Saturday at 12AM.

      • Enabled (boolean) --

        The flag that enables the matching process of duplicate profiles.

    • CreatedAt (datetime) --

      The timestamp of when the domain was created.

    • LastUpdatedAt (datetime) --

      The timestamp of when the domain was most recently edited.

    • Tags (dict) --

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

      • (string) --

        • (string) --

GetDomain (updated) Link ¶
Changes (response)
{'Matching': {'Enabled': 'boolean'}}

Returns information about a specific domain.

See also: AWS API Documentation

Request Syntax

client.get_domain(
    DomainName='string'
)
type DomainName

string

param DomainName

[REQUIRED]

The unique name of the domain.

rtype

dict

returns

Response Syntax

{
    'DomainName': 'string',
    'DefaultExpirationDays': 123,
    'DefaultEncryptionKey': 'string',
    'DeadLetterQueueUrl': 'string',
    'Stats': {
        'ProfileCount': 123,
        'MeteringProfileCount': 123,
        'ObjectCount': 123,
        'TotalSize': 123
    },
    'Matching': {
        'Enabled': True|False
    },
    'CreatedAt': datetime(2015, 1, 1),
    'LastUpdatedAt': datetime(2015, 1, 1),
    'Tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

    • DomainName (string) --

      The unique name of the domain.

    • DefaultExpirationDays (integer) --

      The default number of days until the data within the domain expires.

    • DefaultEncryptionKey (string) --

      The default encryption key, which is an AWS managed key, is used when no specific type of encryption key is specified. It is used to encrypt all data before it is placed in permanent or semi-permanent storage.

    • DeadLetterQueueUrl (string) --

      The URL of the SQS dead letter queue, which is used for reporting errors associated with ingesting data from third party applications.

    • Stats (dict) --

      Usage-specific statistics about the domain.

      • ProfileCount (integer) --

        The total number of profiles currently in the domain.

      • MeteringProfileCount (integer) --

        The number of profiles that you are currently paying for in the domain. If you have more than 100 objects associated with a single profile, that profile counts as two profiles. If you have more than 200 objects, that profile counts as three, and so on.

      • ObjectCount (integer) --

        The total number of objects in domain.

      • TotalSize (integer) --

        The total size, in bytes, of all objects in the domain.

    • Matching (dict) --

      The process of matching duplicate profiles. This process runs every Saturday at 12AM.

      • Enabled (boolean) --

        The flag that enables the matching process of duplicate profiles.

    • CreatedAt (datetime) --

      The timestamp of when the domain was created.

    • LastUpdatedAt (datetime) --

      The timestamp of when the domain was most recently edited.

    • Tags (dict) --

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

      • (string) --

        • (string) --

UpdateDomain (updated) Link ¶
Changes (both)
{'Matching': {'Enabled': 'boolean'}}

Updates the properties of a domain, including creating or selecting a dead letter queue or an encryption key.

After a domain is created, the name can’t be changed.

See also: AWS API Documentation

Request Syntax

client.update_domain(
    DomainName='string',
    DefaultExpirationDays=123,
    DefaultEncryptionKey='string',
    DeadLetterQueueUrl='string',
    Matching={
        'Enabled': True|False
    },
    Tags={
        'string': 'string'
    }
)
type DomainName

string

param DomainName

[REQUIRED]

The unique name of the domain.

type DefaultExpirationDays

integer

param DefaultExpirationDays

The default number of days until the data within the domain expires.

type DefaultEncryptionKey

string

param DefaultEncryptionKey

The default encryption key, which is an AWS managed key, is used when no specific type of encryption key is specified. It is used to encrypt all data before it is placed in permanent or semi-permanent storage. If specified as an empty string, it will clear any existing value.

type DeadLetterQueueUrl

string

param DeadLetterQueueUrl

The URL of the SQS dead letter queue, which is used for reporting errors associated with ingesting data from third party applications. If specified as an empty string, it will clear any existing value. You must set up a policy on the DeadLetterQueue for the SendMessage operation to enable Amazon Connect Customer Profiles to send messages to the DeadLetterQueue.

type Matching

dict

param Matching

The process of matching duplicate profiles. This process runs every Saturday at 12AM.

  • Enabled (boolean) -- [REQUIRED]

    The flag that enables the matching process of duplicate profiles.

type Tags

dict

param Tags

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

  • (string) --

    • (string) --

rtype

dict

returns

Response Syntax

{
    'DomainName': 'string',
    'DefaultExpirationDays': 123,
    'DefaultEncryptionKey': 'string',
    'DeadLetterQueueUrl': 'string',
    'Matching': {
        'Enabled': True|False
    },
    'CreatedAt': datetime(2015, 1, 1),
    'LastUpdatedAt': datetime(2015, 1, 1),
    'Tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

    • DomainName (string) --

      The unique name of the domain.

    • DefaultExpirationDays (integer) --

      The default number of days until the data within the domain expires.

    • DefaultEncryptionKey (string) --

      The default encryption key, which is an AWS managed key, is used when no specific type of encryption key is specified. It is used to encrypt all data before it is placed in permanent or semi-permanent storage.

    • DeadLetterQueueUrl (string) --

      The URL of the SQS dead letter queue, which is used for reporting errors associated with ingesting data from third party applications.

    • Matching (dict) --

      The process of matching duplicate profiles. This process runs every Saturday at 12AM.

      • Enabled (boolean) --

        The flag that enables the matching process of duplicate profiles.

    • CreatedAt (datetime) --

      The timestamp of when the domain was created.

    • LastUpdatedAt (datetime) --

      The timestamp of when the domain was most recently edited.

    • Tags (dict) --

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

      • (string) --

        • (string) --