Select your cookie preferences

We use cookies and similar tools to enhance your experience, provide our services, deliver relevant advertising, and make improvements. Approved third parties also use these tools to help us deliver advertising and provide certain site features.

merge_profiles

merge_profiles(**kwargs)

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

response = 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'
        }
    }
)
Parameters
  • DomainName (string) --

    [REQUIRED]

    The unique name of the domain.

  • MainProfileId (string) --

    [REQUIRED]

    The identifier of the profile to be taken.

  • ProfileIdsToBeMerged (list) --

    [REQUIRED]

    The identifier of the profile to be merged into MainProfileId.

    • (string) --
  • FieldSourceProfileIds (dict) --

    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) --
Return type

dict

Returns

Response Syntax

{
    'Message': 'string'
}

Response Structure

  • (dict) --

    • Message (string) --

      A message that indicates the merge request is complete.

Exceptions

  • CustomerProfiles.Client.exceptions.BadRequestException
  • CustomerProfiles.Client.exceptions.ResourceNotFoundException
  • CustomerProfiles.Client.exceptions.ThrottlingException
  • CustomerProfiles.Client.exceptions.InternalServerException