putProfileObject method
Adds additional objects to customer profiles of a given ObjectType.
When adding a specific profile object, like a Contact Record, an inferred profile can get created if it is not mapped to an existing profile. The resulting profile will only have a phone number populated in the standard ProfileObject. Any additional Contact Records with the same phone number will be mapped to the same inferred profile.
When a ProfileObject is created and if a ProfileObjectType already exists for the ProfileObject, it will provide data to a standard profile depending on the ProfileObjectType definition.
PutProfileObject needs an ObjectType, which can be created using PutProfileObjectType.
May throw AccessDeniedException.
May throw BadRequestException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter domainName :
The unique name of the domain.
Parameter object :
A string that is serialized from a JSON object.
Parameter objectTypeName :
The name of the profile object type.
Implementation
Future<PutProfileObjectResponse> putProfileObject({
required String domainName,
required String object,
required String objectTypeName,
}) async {
final $payload = <String, dynamic>{
'Object': object,
'ObjectTypeName': objectTypeName,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/domains/${Uri.encodeComponent(domainName)}/profiles/objects',
exceptionFnMap: _exceptionFns,
);
return PutProfileObjectResponse.fromJson(response);
}