CData Python Connector for Salesforce Marketing Cloud

Build 25.0.9454

SendTransactionalMessageToMultipleRecipients

Sends a transactional message to multiple recipients using a defined send definition in Salesforce Marketing Cloud. This procedure supports bulk message delivery while maintaining individualized personalization for each recipient.

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 Specifies the unique identifier (Id) of the send definition that determines the content, settings, and classification used for the transactional send. This Id links the request to the definition configured in Marketing Cloud.
RecipientContactKey String False Specifies the unique Id for the subscriber receiving the message. Each request must include a contact key. You can use an existing subscriber key or allow the system to create one at send time by providing the recipient's email address.
RecipientTo String False Specifies the channel address of the recipient. For email, this value is the recipient's email address. For other channels, the address format depends on the channel type.
RecipientMessageKey String False Specifies the unique Id that is used to track message status for the recipient. This value can be generated automatically or provided in the request. It can be up to 100 characters and accepts all characters. Each recipient in the request must have a unique message key; duplicate keys within the same request cause the message to be rejected.
RecipientAttributes String False Specifies the set of key–value pairs that personalize the message for the recipient. These attributes must correspond to profile attributes, content attributes, or triggered send data extension attributes.
RecipientAggregate String True Specifies an array of recipient objects that contain the parameters, personalization data, and metadata required for each recipient in a multirecipient send request. Each object can include tracking identifiers and attribute mappings.
Attributes String False Specifies the key–value pairs used to personalize the message for the recipient. These values must map to profile attributes, content attributes, or triggered send data extension attributes. This parameter applies when attributes are provided at the request level rather than at the individual recipient level.

Result Set Columns

Name Type Description
RequestId String Specifies the unique Id that is assigned to the transactional send request. This Id is used in follow-up calls to retrieve the status or results of the request.
MessageKey String Specifies the unique Id that tracks the message send status for monitoring and reporting purposes.
Status String Specifies the operational status of the transactional send request (for example, queued, processing, completed, or failed).
ErrorMessage String Specifies the error message that is returned when the request encounters a failure. This value helps diagnose issues with validation, configuration, or delivery.

Copyright (c) 2025 CData Software, Inc. - All rights reserved.
Build 25.0.9454