ADO.NET Provider for Salesforce Marketing Cloud

Build 24.0.9062

SendTransactionalMessageToMultipleRecipients

Sends a message to a single recipient via a send definition.

Execute

Transactional message send:

For RecipientAggregate and Attributes either JSON or temp table as input. For example,

INSERT INTO RecipientAggregate#TEMP (RecipientContactKey, RecipientTo, RecipientMessageKey, RecipientAttributes) VALUES ('recipient1', '[email protected]', 'nFL4ULgheUeaGbPIMzJJSw', '{"RequestAttribute_1":"value_1", "RequestAttribute_2":"value_2", "Attribute1":"This is one for recipient1", "Attribute2":"This is two for recipient1"}');
INSERT INTO RecipientAggregate#TEMP (RecipientContactKey, RecipientTo, RecipientMessageKey, RecipientAttributes) VALUES ('recipient2', '[email protected]', 'GV1LhQ6NFkqFUAE1IsoQ9Q', '{"UserAttribute_3":"value_3", "UserAttribute_4":"value_4"}');

EXECUTE SendTransactionalMessageToMultipleRecipients DefinitionKey = '2FA_order_accounts', RecipientAggregate = 'RecipientAggregate#TEMP', Attributes = '{"UserAttribute_a":"value_a", "UserAttribute_b":"value_b"}'

INSERT INTO Attributes#TEMP (UserAttr_1, UserAttr_2) VALUES ('UserAttrValue_1', 'UserAttrValue_2');

INSERT INTO RecipientAggregate#TEMP (RecipientContactKey, RecipientTo, RecipientMessageKey, RecipientAttributes) VALUES ('recipient1', '[email protected]', 'nFL4ULgheUeaGbPIMzJJSw', '{"RequestAttribute_1":"value_1", "RequestAttribute_2":"value_2", "Attribute1":"This is one for recipient1", "Attribute2":"This is two for recipient1"}');
INSERT INTO RecipientAggregate#TEMP (RecipientContactKey, RecipientTo, RecipientMessageKey, RecipientAttributes) VALUES ('recipient2', '[email protected]', 'GV1LhQ6NFkqFUAE1IsoQ9Q', '{"UserAttribute_3":"value_3", "UserAttribute_4":"value_4"}');


EXECUTE SendTransactionalMessageToMultipleRecipients DefinitionKey = '2FA_order_accounts', RecipientAggregate = 'RecipientAggregate#TEMP', Attributes = 'Attributes#TEMP'

Input

Name Type Required Description
DefinitionKey String True Unique identifier of the definition.
RecipientContactKey String False Unique identifier for a subscriber in Marketing Cloud. Each request must include a contactKey. You can use an existing subscriber key or create one at send time by using the recipient’s email address.
RecipientTo String False Channel address of the recipient. For email, it’s the recipient's email address.
RecipientMessageKey String False Unique identifier used to track message status. Can be automatically created when you create a message or provided as part of the request. Can be up to 100 characters, and there are no restricted characters. Each recipient in a request must have a unique messageKey. If you use a duplicate messageKey in the same send request, the message is rejected.
RecipientAttributes String False Information used to personalize the message for the recipient. Written as key pairs. The attributes match profile attributes, content attributes, or triggered send data extension attributes.
RecipientAggregate String True Array of recipient objects that contain parameters and metadata for the recipients, such as send tracking and personalization attributes.
Attributes String False Information used to personalize the message for the recipient. Written as key pairs. The attributes match profile attributes, content attributes, or triggered send data extension attributes.

Result Set Columns

Name Type Description
RequestId String The unique identifier of this request.
MessageKey String Unique identifier to track message send status.
Status String The status of the send request.
ErrorMessage String The error message.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9062