This document contains conceptual, procedural, and scenario information about creating triggered send email interactions to function with an external system.
Jen develops software for Northern Trail Outfitters, and her latest project involves working with her team to develop a new ecommerce site. Her tasks include integrating the ecommerce site with the Northern Trail Outfitters account to send the following types of message:
All of the above examples represent transactional emails. Northern Trail Outfitters marketers continues to handle all marketing emails, and they also develop all of the necessary content for transactional emails. Jen handles the API code that calls the correct email message and creates and executes the sending of these transactional emails. She works with .NET/C# code and receives the applicable ExactTarget credentials from her supervisor.
Before doing anything else, Jen must successfully connect her development environment to the ExactTarget SOAP web service API. Given that she will be writing .NET/C# code, Jen connects using Visual Studio and successfully executes a call to retrieve the availability status of the API.
Now that Jen has successfully connected her development environment, she needs to understand how the ExactTarget application stores the data necessary execute the email sends previously listed. Because this is a new ecommerce site, Jen has the opportunity to work with others involved in implementing the ExactTarget application and decide how they will identify individual users and store the applicable information.
At this point, Jen relies on documentation to understand more about the application. She also learns about triggered sends and realizes that these email messages perform the function she has been assigned to implement. The ecommerce site triggers these sends when certain actions take place. She also learns about both subscriber lists and data extensions, as she must understand exactly how the ExactTarget application stores information in order to better design how Northern Trail Outfitters information should be stored and processed when sending triggered emails. Jen won't be the only person using this information, but she does have a stake in making the final decision.
Jen also takes the time to familiarize herself with the available API best practices to understand how to best write her code against the ExactTarget application. Because the new ecommerce site relies on email to communicate with customers, Jen decides to make the email address the primary identifier for all customers. She also decides to store this information in data extensions, per the best practice recommendations. Finally, she decides to write her code to take advantage of both the synchronous and asynchronous API calls as recommended by the best practices.
Jen learns that subscriber information for triggered sends can be stored on data extensions (where she initially chose to store subscriber information) and on a hidden list used to manage subscription and unsubscription preferences for subscribers. Jen decides to include a publication list as part of the triggered send definition to help manage subscription preferences for customers. All subscribers are added to the publication list and the data extension and the time of their interaction with the site, but they have the opportunity to unsubscribe and prevent any commercial mailings. Note that transactional emails (such as purchase confirmations) are transactional emails and will continue to be sent.
The marketers for Northern Trail Outfitters handle the actual creation of the email content and messages. However, they must provide Jen with the external keys for these email messages so she can retrieve these items into the email send definitions.
Jen discovers that triggered send definitions must be created and then started in order to make them functional within the ExactTarget account. Initially, Jen has to create triggered send definitions for two different interactions:
Once she creates those triggered send definitions, she starts them to ensure they can accept incoming calls.
Jen must also learn how to handle error codes associated with triggered send definitions and the triggered send itself.
For synchronous processing, Jen casts the CreateResult to a TriggeredSendCreateResult to gain access to the SubscriberFailures array.
For asynchronous processing, the ResultMessage object represents the focal point for exception handling. Jen retrieves the ResultMessage for each request using the Retrieve method, read from an email attachment or available as a HTTP post variables. The property ResultDetailXML contains a serialized TriggeredSendCreateResult that can be interrogated to get the desired.
Jen wants to review how her triggered sends are performing, and the marketing department wants to know how customers are interacting with the emails sent as part of the triggered sends. Jen retrieves a tracking send summary to get the information needed and act accordingly.
After initial testing and implementation, Jen and the team want to expand their efforts to handle increased load and additional features.
Jen also recommends creating additional email messages and personalizing them to the specific customer. Until this point, the email messages used fixed content to welcome the customer and let them know that the transaction had cleared. Jen recommends that marketing include dynamic content in their email messages to include the following attributes:
Jen also creates additional triggered send definitions to accomodate customers wishing to change their username and password for the ecommerce site. These definitions include HTML email messages that have been created by marketing and sent to Jen for inclusion in the triggered send definition. These HTML email contain references to information in the data extension for use in the email message.
In order to ensure that all API calls are properly handled, Jen decides to use the asynchronous API for further development on the ecommerce site. While this does involves rewriting existing functionality, Jen feels the solution will scale better using the asynchronous API and allow for better management of her API calls.
Jen also considers building a landing page for the marketers to view the triggered send tracking information she retrieves via the API. She stores this information in a data extension and builds a landing page using AMPscript that returns the tracking information for easy viewing.