SendTransactionalMessageToRecipient
Sends a transactional message to a single recipient using a specified send definition in Salesforce Marketing Cloud. This procedure enables the delivery of personalized, event-triggered communications.
Execute
Send a transactional message:
Attributes support either JSON or temp table as input. For example,
EXECUTE SendTransactionalMessageToRecipient MessageKey = 'e1c35141-6e5c-4bc2-813b-60f969e52b0d', DefinitionKey = 'CanBeAGUIDorAny100UnicodeCharString', RecipientContactKey = 'd3c4a2d2-b620-4a39-88aa-b14868b766c6', RecipientTo = '[email protected]', Attributes = '{"UserAttr_1":"UserAttrValue_1","UserAttr_2":"UserAttrValue_2"}'
INSERT INTO Attributes#TEMP (UserAttr_1, UserAttr_2) VALUES ('UserAttrValue_1', 'UserAttrValue_2');
EXECUTE SendTransactionalMessageToRecipient MessageKey = 'e1c35141-6e5c-4bc2-813b-60f969e52b0d', DefinitionKey = 'CanBeAGUIDorAny100UnicodeCharString', RecipientContactKey = 'd3c4a2d2-b620-4a39-88aa-b14868b766c6', RecipientTo = '[email protected]', Attributes = 'Attributes#TEMP';
Input
| Name | Type | Required | Description |
| MessageKey | String | True | Specifies the user-defined identifier (Id) for the outbound message. This Id distinguishes the message from other send requests and is used to track the status of the transactional send. |
| DefinitionKey | String | True | Specifies the unique Id of the send definition that determines the content, sending classification, and configuration used for the transactional message. |
| RecipientContactKey | String | True | Specifies the contact key that identifies the subscriber who receives 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. |
| Attributes | String | False | Specifies the set of key–value pairs that is used to personalize the message for the recipient. These values must correspond to profile attributes, content attributes, or triggered send-data extension attributes. |
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 operations to retrieve the status or outcome of the request. |