addProfileKey method
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.
May throw AccessDeniedException.
May throw BadRequestException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter domainName :
The unique name of the domain.
Parameter keyName :
A searchable identifier of a customer profile. The predefined keys you can
use include: _account, _profileId, _assetId, _caseId, _orderId, _fullName,
_phone, _email, _ctrContactId, _marketoLeadId, _salesforceAccountId,
_salesforceContactId, _salesforceAssetId, _zendeskUserId,
_zendeskExternalId, _zendeskTicketId, _serviceNowSystemId,
_serviceNowIncidentId, _segmentUserId, _shopifyCustomerId,
_shopifyOrderId.
Parameter profileId :
The unique identifier of a customer profile.
Parameter values :
A list of key values.
Implementation
Future<AddProfileKeyResponse> addProfileKey({
required String domainName,
required String keyName,
required String profileId,
required List<String> values,
}) async {
final $payload = <String, dynamic>{
'KeyName': keyName,
'ProfileId': profileId,
'Values': values,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/domains/${Uri.encodeComponent(domainName)}/profiles/keys',
exceptionFnMap: _exceptionFns,
);
return AddProfileKeyResponse.fromJson(response);
}