Triggered sends allow you to automatically send personalized and timely messages to your subscribers. They are sent to an individual subscriber in response to a subscriber action. If you would like to find out more about creating a Triggered Email Message Interaction, check out my other article here.
The TriggeredSend object represents a specific instance of a triggered email send. A typical SOAP envelope consists of the Triggered Send CustomerKey (External Key of the Triggered Email Message Interaction), Subscribers associated with the send and optionally, their Attributes. Here’s an example:
Create a TriggeredSend using WSProxy
To create a new TriggeredSend, we will use the createItem WSProxy function, which has three parameters:
- The first parameter is the object type to perform the action on – here, we will use previously mentioned
tsDefand use it to define the
Subscribersand optionally, their
- The third parameter is optional and includes any properties to be set using the SOAP CreateOptions object
Here’s the full script:
In the above script, you will need to provide the Triggered Send External Key and pass an Email Address and Subscriber Key.
If you are using personalization strings in your Triggered Email, you can pass them as name and value pairs in the
Attributes object. Here’s an example of passing additional attributes in the WSProxy call:
The results of the call contain three properties from the SOAP CreateResult object:
Results. Here’s an example response:
To see how this script works in action, visit the CloudPage that I created and submit your email address here.
Here are additional resources to learn more about Triggered Sends and WSProxy: