CreateTriggeredSend
Creates a triggered send object in Salesforce Marketing Cloud. A triggered send represents a specific instance of an automated email send initiated by an API event or system trigger. This procedure allows real-time delivery of personalized messages.
Table Specific Information
Subscriber Attributes
To create SubscriberAttributes, you must insert data in a temporary table called 'Subscribers#TEMP'.
INSERT INTO Subscribers#Temp(Order_Number,Order_Status,Purchase_Date) VALUES (1234,'received','2015-06-30 11:10:36.956') EXECUTE CreateTriggeredSend key='TEST_1', FromAddress='[email protected]', FromName='test', ToAddress='[email protected]',SubscriberKey='12345678', Subscribers='Subscribers#Temp'
Execute
you can execute the stored procedure.
EXECUTE CreateTriggeredSend key='TEST_1', FromAddress='[email protected]', FromName='test', ToAddress='[email protected]',SubscriberKey='12345678'
EXECUTE CreateTriggeredSend key='TEST_1', FromAddress='[email protected]', FromName='test', ToAddress='[email protected]', SubscriberKey='12345678', SubscriberAttributes='{\"attrname\":\"test\",\"attrname2\":22,\"attrname3\":\"testing\"}'
Input
| Name | Type | Required | Description |
| Key | String | False | Specifies the external key that identifies the triggered send definition to use for this triggered send. This value corresponds to the external key that is assigned to the definition in Marketing Cloud and can be used instead of the SendId field to select the target definition. |
| SendId | String | False | Specifies the identifier (Id) of the entry-event send definition that is returned when a triggered send definition is created. You must provide either the send Id or the key to identify the triggered send definition that is executed. |
| FromAddress | String | False | Specifies the email address that is displayed as the sender of the message. This value should belong to a verified sending domain that is configured for deliverability and compliance. |
| FromName | String | False | Specifies the display name that appears as the sender in the recipient's inbox. Using a recognizable from name improves trust and open rates. |
| ToAddress | String | True | Specifies the recipient's email address. This address is validated before the send request is queued. |
| SubscriberKey | String | True | Specifies the unique Id that is defined for the message recipient. SubscriberKey links the send event to the contact profile so that tracking, preferences, and personalization resolve correctly. |
| SubscriberAttributes | String | False | Contains name-and-value pairs that provide attribute data used to personalize the message for this recipient. Attributes must match fields that are defined in the triggered send definition or its associated data sources. |
| RequestType | String | False | Specifies how the request is processed. |
Result Set Columns
| Name | Type | Description |
| Success | String | A Boolean field that returns a value of 'true' when the triggered send request is accepted and created successfully. It returns a value of 'false' when the request fails validation or cannot be queued. |
| RecipientSendId | String | Returns the Id that is generated for the recipient's send when the event send definition is triggered successfully. This Id can be used to correlate the request with tracking, logs, and diagnostics. |
| Messages | String | Returns a collection of message-level results and diagnostics that are produced by the triggered send, including status messages, error details, and validation feedback. These details assist with troubleshooting and audit reporting. |