CustomerProfiles / Client / get_matches



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.


The process of matching duplicate profiles. If Matching = true, Amazon Connect Customer Profiles starts a weekly batch process called Identity Resolution Job. If you do not specify a date and time for Identity Resolution Job to run, by default it runs every Saturday at 12AM UTC to detect duplicate profiles in your domains.

After the Identity Resolution Job completes, use the GetMatches API to return and review the results. Or, if you have configured ExportingConfig in the MatchingRequest, you can download the results from S3.

Amazon Connect uses the following profile attributes to identify matches:

  • PhoneNumber

  • HomePhoneNumber

  • BusinessPhoneNumber

  • MobilePhoneNumber

  • EmailAddress

  • PersonalEmailAddress

  • BusinessEmailAddress

  • FullName

For example, two or more profiles—with spelling mistakes such as John Doe and Jhn Doe, or different casing email addresses such as JOHN_DOE@ANYCOMPANY.COM and, or different phone number formats such as 555-010-0000 and +1-555-010-0000—can be detected as belonging to the same customer John Doe and merged into a unified profile.

See also: AWS API Documentation

Request Syntax

response = client.get_matches(
  • NextToken (string) – 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.

  • MaxResults (integer) – The maximum number of results to return per page.

  • DomainName (string) –


    The unique name of the domain.

Return type:



Response Syntax

    'NextToken': 'string',
    'MatchGenerationDate': datetime(2015, 1, 1),
    'PotentialMatches': 123,
    'Matches': [
            'MatchId': 'string',
            'ProfileIds': [
            'ConfidenceScore': 123.0

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) –

        • ConfidenceScore (float) –

          A number between 0 and 1, where a higher score means higher similarity. Examining match confidence scores lets you distinguish between groups of similar records in which the system is highly confident (which you may decide to merge), groups of similar records about which the system is uncertain (which you may decide to have reviewed by a human), and groups of similar records that the system deems to be unlikely (which you may decide to reject). Given confidence scores vary as per the data input, it should not be used an absolute measure of matching quality.


  • CustomerProfiles.Client.exceptions.BadRequestException

  • CustomerProfiles.Client.exceptions.AccessDeniedException

  • CustomerProfiles.Client.exceptions.ResourceNotFoundException

  • CustomerProfiles.Client.exceptions.ThrottlingException

  • CustomerProfiles.Client.exceptions.InternalServerException