Skip to main content

profiles

Creates, updates, deletes, gets or lists a profiles resource.

Overview

Nameprofiles
TypeResource
Idaws.customer_profiles.profiles

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
errorsarrayFor information about the errors that are common to all actions, see Common Errors.
profilesarrayArray of Profile Objects.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
batch_get_profileselectdomain_name, regionGet a batch of profiles.
search_profilesselectdomain_name, regionnext-token, max-resultsSearches for profiles within a specific domain using one or more predefined search keys (e.g., _fullName, _phone, _email, _account, etc.) and/or custom-defined search keys. A search key is a data type pair that consists of a KeyName and Values list. This operation supports searching for profiles with a minimum of 1 key-value(s) pair and up to 5 key-value(s) pairs using either AND or OR logic.
create_profileinsertdomain_name, regionCreates a standard profile. A standard profile represents the following attributes for a customer profile in a domain.
add_profile_keyupdatedomain_name, region, ProfileId, KeyNameAssociates a new key value with a specific profile, such as a Contact Record ContactId. A profile object can have a single unique key and any number of additional keys that can be used to identify the profile that it belongs to.
update_profileupdatedomain_name, region, ProfileIdUpdates the properties of a profile. The ProfileId is required for updating a customer profile. When calling the UpdateProfile API, specifying an empty string value means that any existing value will be removed. Not specifying a string value means that any value already there will be kept.
delete_profile_keydeletedomain_name, regionRemoves a searchable key from a customer profile.
delete_profiledeletedomain_name, regionDeletes the standard customer profile and all data pertaining to the profile.
merge_profilesexecdomain_name, region, MainProfileId, ProfileIdsToBeMergedRuns 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).

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
domain_namestringThe unique name of the domain.
regionstringAWS region (default: us-east-1)
max-resultsintegerThe maximum number of objects returned per page. The default is 20 if this parameter is not included in the request.
next-tokenstringThe pagination token from the previous SearchProfiles API call.

SELECT examples

Get a batch of profiles.

SELECT
errors,
profiles
FROM aws.customer_profiles.profiles
WHERE domain_name = '{{ domain_name }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a standard profile. A standard profile represents the following attributes for a customer profile in a domain.

INSERT INTO aws.customer_profiles.profiles (
AccountNumber,
AdditionalInformation,
PartyType,
BusinessName,
FirstName,
MiddleName,
LastName,
BirthDate,
Gender,
PhoneNumber,
MobilePhoneNumber,
HomePhoneNumber,
BusinessPhoneNumber,
EmailAddress,
PersonalEmailAddress,
BusinessEmailAddress,
Address,
ShippingAddress,
MailingAddress,
BillingAddress,
Attributes,
PartyTypeString,
GenderString,
ProfileType,
EngagementPreferences,
domain_name,
region
)
SELECT
'{{ AccountNumber }}',
'{{ AdditionalInformation }}',
'{{ PartyType }}',
'{{ BusinessName }}',
'{{ FirstName }}',
'{{ MiddleName }}',
'{{ LastName }}',
'{{ BirthDate }}',
'{{ Gender }}',
'{{ PhoneNumber }}',
'{{ MobilePhoneNumber }}',
'{{ HomePhoneNumber }}',
'{{ BusinessPhoneNumber }}',
'{{ EmailAddress }}',
'{{ PersonalEmailAddress }}',
'{{ BusinessEmailAddress }}',
'{{ Address }}',
'{{ ShippingAddress }}',
'{{ MailingAddress }}',
'{{ BillingAddress }}',
'{{ Attributes }}',
'{{ PartyTypeString }}',
'{{ GenderString }}',
'{{ ProfileType }}',
'{{ EngagementPreferences }}',
'{{ domain_name }}',
'{{ region }}'
RETURNING
profile_id
;

UPDATE examples

Associates a new key value with a specific profile, such as a Contact Record ContactId. A profile object can have a single unique key and any number of additional keys that can be used to identify the profile that it belongs to.

UPDATE aws.customer_profiles.profiles
SET
ProfileId = '{{ ProfileId }}',
KeyName = '{{ KeyName }}',
Values = '{{ Values }}'
WHERE
domain_name = '{{ domain_name }}' --required
AND region = '{{ region }}' --required
AND ProfileId = '{{ ProfileId }}' --required
AND KeyName = '{{ KeyName }}' --required
RETURNING
key_name,
values;

DELETE examples

Removes a searchable key from a customer profile.

DELETE FROM aws.customer_profiles.profiles
WHERE domain_name = '{{ domain_name }}' --required
AND region = '{{ region }}' --required
;

Lifecycle Methods

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

EXEC aws.customer_profiles.profiles.merge_profiles
@domain_name='{{ domain_name }}' --required,
@region='{{ region }}' --required
@@json=
'{
"MainProfileId": "{{ MainProfileId }}",
"ProfileIdsToBeMerged": "{{ ProfileIdsToBeMerged }}",
"FieldSourceProfileIds": "{{ FieldSourceProfileIds }}"
}'
;