batchPutProfileObject method
Adds multiple profile objects to a domain of a given ObjectType in a single API call.
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.
BatchPutProfileObject 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 items :
A list of items to add to the domain.
Parameter objectTypeName :
The name of the profile object type.
Implementation
Future<BatchPutProfileObjectResponse> batchPutProfileObject({
required String domainName,
required List<BatchPutProfileObjectRequestItem> items,
required String objectTypeName,
}) async {
final $payload = <String, dynamic>{
'Items': items,
'ObjectTypeName': objectTypeName,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/domains/${Uri.encodeComponent(domainName)}/profiles/objects/batch-put-profile-object',
exceptionFnMap: _exceptionFns,
);
return BatchPutProfileObjectResponse.fromJson(response);
}