|
|
Triggered Send Email Scenario Guide For Developers
From $1
(Click the banner to go to the related Docs.Code.ExactTarget.com page.)
This document contains conceptual, scenario, and procedural information that you can use in preparing to use triggered send emails. It discusses API calls you can use to trigger send emails created in the application. The content of the emails and the interaction to trigger to send the emails can be created in the application. See the Triggered Emails Guide for more information.The ExactTarget Web Service API is the preferred method to integrate triggered send emails with your business applications due to its superior error-handling capability and the ability to retrieve tracking data. The XML API also supports defining and executing triggered emails.
This document discusses email messages. You can also create triggered messages for delivery through SMS media.
What Is a Triggered Email A triggered email is an email communication sent to an individual (subscriber) in response to a subscriber action. For example, sending a confirmation message after a customer makes a purchase is a triggered email. The following graphic illustrates the process to initiate a triggered email: Triggered Email Send Process To set up your integration to use this process, you must: - Identify the triggering events and create the code that triggers the email.
- Create the triggered email message interaction.
Triggering Events You identify the events that trigger the email and create code outside of the ExactTarget application to call the triggered email interaction that sends the email. Examples of triggering events include: - Completing a web form
- Purchasing a product through your website
- Abandoning the shopping cart
- Performing a search
Your code also captures any subscriber information necessary to send the message. At a minimum, the subscriber email address is required to send the triggered email. You then create code to cause the events that trigger an email to call the ExactTarget API and pass the subscriber information to ExactTarget. The API call executes the interaction, which sends the email. Components of the Triggered Email Interaction  When you define a triggered email interaction (sometimes called a triggered send definition), you provide information that the system uses each time an email is triggered. Interactions have a unique External Key value that is used by the API calls to initiate the interaction. Send Classification A send classification lets you define parameters for an email job in a central location and reuse those parameters for multiple triggered email interactions. See Send Classifications for more information. Content The content is the message to send when the interaction is triggered. You create triggered email content with the screens on the Content tab within the ExactTarget application. You use the same tools that are available to create user-initiated email. For example, you can target the message using personalization and dynamic content. See the online help available in the application for more information. Destination Management You can select a subscriber list for the triggered email interaction. When a subscriber who is not already on the selected list triggers the interaction, you can choose to have the application add the subscriber to the list. When a subscriber who is already on the selected list triggers the interaction, you can choose to have the application update the subscriber information. If your account has data extensions enabled, you can select a data extension for the triggered send instead of a subscriber list. The data extension behaves the same way as the list, except that the fields that are required to add a subscriber are based on the definition of the data extension instead of on the subscriber attributes. The data extension you use must be created from the TriggeredSendDataExtension template. See Data Extensions for more information about data extensions. NOTE: When you create a data extension from the TriggeredSendDataExtension, no columns may be defined as a primary key. Send Options The send options you specify on a triggered email interaction relate to how the interaction tracks statistics from the messages. You can also specify a keyword to categorize the triggered email interaction. API calls can use the keyword to find one or more related triggered email interaction. See Triggered Emails in the Documentation Wiki for more information. Test Sends Triggered email interactions must be started before you can use them to trigger live or test emails. You can use the send options on the interaction to prevent activity from your test sends from appearing in tracking and reports. Any additional isolation of test sends from your production environment must be done using the code around the triggering events. Tracking and Reports ExactTarget collects summary tracking and subscriber-level tracking for a triggered email. You can see this tracking in the application or retrieve the tracking with the API. List Detective When a subscriber triggers an email, the List Detective tool scans the email address. The List Detective protects your deliverability by preventing the sending of email to bad addresses. See the application online help for more information on List Detective. If the email address of the person triggering the email is identified as bad by List Detective, the system does not send the email message, so the send does not appear in your tracking. If you collect the triggering email addresses in a data extension, the List Detective prevents bad email addresses from being collected. Asynchronous Processing If your account has asynchronous API enabled, ExactTarget offers a feature to allow you to choose the priority of triggered sends. Priority determines the order and frequency in which items in this asynchronous queue will be processed. This process replaces the continuous/batch processing choices. A business rule controls access to this functionality. Contact ExactTarget if you are interested in enabling this feature for your account. You can designate the following priorities: - High: Queued immediately. It can take 0 to 10 seconds to send the email, and that window stays open to allow for more triggered sends as necessary.
- Medium: Queued every minute. It can take 0 to 1 minute to send the email. This is the default value.
- Low: Queued every 5 minutes. It can take 0 to 5 minutes to send an email.
You can specify a keyword to categorize the triggered email interaction. API calls can use the keyword to find one or more related triggered email interaction. NOTE: When asynchronous triggered send processing is enabled, the system will validate required fields and email addresses before queuing the request. This will provide immediate feedback to callers of invalid requests. HTML Attributes HTML attributes are a type of attribute that can be used only with triggered sends. Subscriber attributes of this type can contain more than the 2000 characters are allowed in a normal subscriber attributes. HTML type attribute can contain Unicode characters to be delivered to an email template dynamically. Ideal use cases for HTML attributes are passing preprocessed tabular data (like an order confirmation) along with other subscriber information when an event is triggered. The name of an attribute indicates whether the attribute is of the HTML type. Attributes with the prefix HTML__ (two underscores) are treated differently by the triggered send email engine. Using HTML attributes in the content of an email is similar to using other attributes:
%%HTML__table%%
HTML attributes do not have robust support for link tracking, so ideal use cases do not rely on the need to track links in the HTML content. Retention Policy Support for Triggered Sends The data extension used to capture triggered send subscriber data supports automatic data retention policies. When defining a triggered send with a data extension, you specify how long to retain the data. The default is six months. You can select a retention period ranging from one day to forever. The system deletes the data at the end of the retention period. Subscriber data is not removed by the data retention policy; only the data extension data is removed. You can delete data from the data extension, as well as import the data back in using AMPscript. For more information, see the AMPscript. Obscuring Data for Triggered Sends This feature obscures any information permanently stored in ExactTarget (other than the subscriber key) that would personally identify a subscriber. This includes email address and subscriber name. ExactTarget one-way hashes the information that comes into our system, and ExactTarget has the only hash key. Data is encrypted and decrypted by ExactTarget. For future reconciliation purposes, customers are encouraged to keep a copy of all their subscriber records. Please contact your account representative if you would like to activate the data retention or data obscuring features.
Why Use a Triggered Email Use triggered emails to provide automated, personalized responses to your customers' activities on your website. Emails are trackable, targeted, and sent in real time. With triggered emails, you can: - Track your opens, clicks, and emails.
- Capture subscribers to give the option to opt-in to mailing lists.
- Target the content of emails by using tools such as personalization, dynamic content, and
- AMPscript.
- Achieve high deliverability and scalability.
- Maintain the ability to change content over time.
Use auto-forward and auto-reply with messages processed by Reply Mail Management. For more information, see the Reply Mail Management Instruction Guide. - Define and send a message triggered by an event within the ExactTarget system, such as a subscriber adding themselves to a list using Web Collect, or by an event outside of the ExactTarget system, such as an action on your website.
Tools and Prerequisites Before you can use the ExactTarget API to trigger emails, you must have the following information: - You must have a user on your account that is enabled to use the API. You use the API user's name and password to log in to your account programmatically. Contact your ExactTarget account manager to create an API user for your account.
- Your organization must identify the events that should trigger the email message.
- You must have a way to capture the subscriber attributes that are needed in the content of the email message for personalization and dynamic content.
You must have the External Key of the interaction to trigger. The interaction can be created within the application or by using the API. Use the following tools to create and test your triggered emails:
Scenarios The following scenarios cover the most common business processes around triggering emails with code samples. If you choose to create and manage your triggered email interaction and view tracking in the application, you use the API to trigger an email when the triggering event occurs. You use only the first two scenarios: If you choose to create and manage your triggered email interaction and retrieve tracking with the API, you also use the remaining scenarios: You must start the triggered email interaction after you create it in order for the interaction to send emails. To change the interaction after you start it, you must pause the interaction. After you make the updates, you must publish changes and restart the triggered email interaction. Owner Name Restriction If you use the feature to determine the from email address at send time, the system uses the subscriber owner as the from address. In this case, the owner email address cannot be the same email address used by Reply Mail Management (RMM). Properties for Special Cases The Subscriber.Owner property on the TriggeredSend object is primarily for dynamically changing from name / from address. The Subscriber.Owner.Client property is used to specify an On Your Behalf account to associate the subscriber with. Triggering an Email Use the following code to cause events in your website or application to trigger an ExactTarget email. Web Service API Sample
TriggeredSendDefinition tsd = new TriggeredSendDefinition();
tsd.CustomerKey = "QuickTipsToStart"; // used for programmatic access using an external key TriggeredSend ts = new TriggeredSend();
ts.TriggeredSendDefinition = tsd;
ts.Subscribers = new Subscriber[1]; ts.Subscribers[0] = new Subscriber();
ts.Subscribers[0].EmailAddress = "johndoe@example.com";
ts.Subscribers[0].SubscriberKey = "johndoe@example.com";
ts.Subscribers[0].Attributes = new ETIntegrationFramework.Attribute[2];
ts.Subscribers[0].Attributes[0] = new ETIntegrationFramework.Attribute();
ts.Subscribers[0].Attributes[0].Name = "HTML__Tips";
// HTML__connotes an HTML attribute
ts.Subscribers[0].Attributes[0].Value = "<ul><li>Log on.</li><li>Join the community.</li></ul>";
ts.Subscribers[0].Attributes[1] = new ETIntegrationFramework.Attribute();
ts.Subscribers[0].Attributes[1].Name = "Account Number";
ts.Subscribers[0].Attributes[1].Value = "254461";
CreateResult[] results = etIntegrationFramework.Create(new CreateOptions(), new APIObject[] { ts }, out requestID, out status);
Console.WriteLine("results[0].StatusCode:" + results[0].StatusCode);
Console.WriteLine("results[0].StatusMessage:" + results[0].StatusMessage);
XML API Example
<exacttarget>
<authorization>
<username>apiuser</username>
<password>password</password>
</authorization>
<system>
<system_name>triggeredsend</system_name>
<action>add</action>
<TriggeredSend xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns='http://exacttarget.com/wsdl/partnerAPI'>
<TriggeredSendDefinition>
<CustomerKey>WelcomeEmail</CustomerKey>
</TriggeredSendDefinition>
<Subscribers>
<SubscriberKey>jcruz@example.com</SubscriberKey>
<EmailAddress>jcruz@example.com</EmailAddress>
<Attributes>
<Name>FirstName</Name>
<Value>John</Value>
</Attributes>
<Attributes>
<Name>LastName</Name>
<Value>Cruz</Value>
</Attributes>
<Attributes>
<Name>Country</Name>
<Value>USA</Value>
</Attributes>
<Attributes>
<Name>Zip</Name>
<Value>46140</Value>
</Attributes>
<Attributes>
<Name>Gender</Name>
<Value>Male</Value>
</Attributes>
<Attributes>
<Name>birthyear</Name>
<Value>1970</Value>
</Attributes>
<Attributes>
<Name>DOB</Name>
<Value>19700101</Value>
</Attributes>
<Attributes>
<Name>Id</Name>
<Value></Value>
</Attributes>
<Attributes>
<Name>RegDate</Name>
<Value>02/12/2008</Value>
</Attributes>
</Subscribers>
</TriggeredSend>
</system>
</exacttarget>
Determining the From Information at Send Time You use the following code to cause events in your website or application to trigger an ExactTarget email with a From Name and From Address specific to a subscriber attribute. For example, you could use this functionality to send an email message that is from the regional sales manager responsible for the state the subscriber resides in. Web Service API Example
TriggeredSendDefinition tsd = new TriggeredSendDefinition(); tsd.CustomerKey = "WelcomeEmail"; // used for programmatic access using an external key
TriggeredSend ts = new TriggeredSend();
ts.TriggeredSendDefinition = tsd;
ts.Subscribers = new Subscriber[1];
ts.Subscribers[0] = new Subscriber();
ts.Subscribers[0].EmailAddress = "invalid.com";
ts.Subscribers[0].SubscriberKey = "invalid.com";
ts.Subscribers[0].Owner = new Owner();
ts.Subscribers[0].Owner.FromAddress = "midwest@example.com";
ts.Subscribers[0].Owner.FromName = "Midwest Example";
ts.Subscribers[0].Attributes = new ETIntegrationFramework.Attribute[2];
ts.Subscribers[0].Attributes[0] = new ETIntegrationFramework.Attribute();
ts.Subscribers[0].Attributes[0].Name = "ExpDate";
ts.Subscribers[0].Attributes[0].Value = "12/12/2008";
ts.Subscribers[0].Attributes[1] = new ETIntegrationFramework.Attribute();
ts.Subscribers[0].Attributes[1].Name = "User_ID";
ts.Subscribers[0].Attributes[1].Value = "Talisman";
CreateResult[] results = etIntegrationFramework.Create(new CreateOptions(), new
APIObject[] { ts }, out requestID, out status);
// Cast CreateResult to TriggeredSendCreateResult to get detailed errors
TriggeredSendCreateResult tscr = (TriggeredSendCreateResult)results[0];
if (tscr.SubscriberFailures.Length >0)
{
Console.WriteLine(tscr.SubscriberFailures[0].Subscriber.EmailAddress); // Email Address
Console.WriteLine(tscr.SubscriberFailures[0].ErrorDescription); // Error Description
Console.WriteLine(tscr.SubscriberFailures[0].ErrorCode); // Error Code
}
Response (If an invalid email address was passed)
invalid.com Error Code: 5 - The Email Address for this subscriber has invalid syntax. TriggeredSendSubscriberProcessingError
XML API Example
<exacttarget>
<authorization>
<username>apiuser</username>
<password>password</password>
</authorization>
<system>
<system_name>triggeredsend</system_name>
<action>add</action>
<TriggeredSend xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns='http://exacttarget.com/wsdl/partnerAPI'>
<TriggeredSendDefinition>
<CustomerKey>WelcomeEmail</CustomerKey>
</TriggeredSendDefinition>
<Subscribers>
<Owner>
<FromAddress>midwest@example.com</FromAddress>
<FromName>Midwest Example</FromName>
</Owner>
<SubscriberKey>johndoe@example.com</SubscriberKey>
<EmailAddress>johndoe@example.com</EmailAddress>
<Attributes>
<Name>ExpDate</Name>
<Value>12/12/2008</Value>
</Attributes>
<Attributes>
<Name>User_ID</Name>
<Value>4524</Value>
</Attributes>
</Subscribers>
</TriggeredSend>
</system>
</exacttarget>
Creating a Triggered Email Interaction Creating a triggered email interaction through the API allows you to avoid using the application interface. For example, you might use this functionality if you have created your own interface for creating triggered email interactions. You must start the triggered email interaction before the interaction will send emails. Web Service API Example
TriggeredSendDefinition tsd = new TriggeredSendDefinition();
tsd.CustomerKey = "WelcomeEmail";
tsd.Name = "Created from SOAP API";
tsd.TriggeredSendType = TriggeredSendTypeEnum.Continuous;
tsd.TriggeredSendTypeSpecified = true;
tsd.Email = new Email();
tsd.Email.ID = 54568;
tsd.Email.IDSpecified = true;
tsd.SendClassification = new SendClassification();
CreateResult[] results = etIntegrationFramework.Create(new
CreateOptions(), new APIObject[] { tsd }, out requestID, out status);
Console.WriteLine("results[0].StatusCode:" + results[0].StatusCode);
Console.WriteLine("results[0].StatusMessage:" +
results[0].StatusMessage);
XML API Example
https://api.dc1.exacttarget.com/integrate.aspx?qf=xml&xml=
<exacttarget>
<authorization>
<username>apiuser</username>
<password>password</password>
</authorization>
<system>
<system_name>triggeredsend</system_name>
<action>adddefinition</action>
<TriggeredSendDefinition xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns='http://exacttarget.com/wsdl/partnerAPI'>
<Name>API - Welcome Send with Marketing List</Name>
<CustomerKey>WelcomeEmail</CustomerKey>
<Description>Created through XML API</Description>
<Email>
<ID>50140</ID>
</Email>
<SendClassification>
<CustomerKey>Marketing</CustomerKey>
</SendClassification>
<List>
<ID>251163</ID>
</List>
<AutoAddSubscribers>true</AutoAddSubscribers>
<AutoUpdateSubscribers>true</AutoUpdateSubscribers>
</TriggeredSendDefinition>
</system>
</exacttarget>
Pausing an Interaction You must pause the triggered email interaction before you can make changes to it. Pausing the interaction sets the status to Paused and prevents the interaction from sending emails. Requests for the triggered email are queued to be sent after you start the interaction. Web Service API Example To pause a TriggeredSendDefinition, set the state of the TriggeredSendDefinition to Inactive. In the Inactive state, the TriggeredSendDefinition is accepting and queuing TriggeredSend requests. In this state, a marketer can make modifications to the definition and associated email and content areas and publish changes by setting the RefreshContent property to True.
TriggeredSendDefinition tsd = new TriggeredSendDefinition();
tsd.CustomerKey = "WelcomeEmail";
tsd.RefreshContent = true;
tsd.RefreshContentSpecified = true;
UpdateResult[] results = etIntegrationFramework.Update(new UpdateOptions(), new
APIObject[] { tsd }, out requestID, out status);
Console.WriteLine(status);
Console.WriteLine(results[0].StatusCode);
Console.WriteLine(results[0].StatusMessage);
XML API Example
<exacttarget>
<authorization>
<username>apiuser</username>
<password>password</password>
</authorization>
<system>
<system_name>triggeredsend</system_name>
<action>updatedefinition</action>
<TriggeredSendDefinition xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns='http://exacttarget.com/wsdl/partnerAPI'>
<CustomerKey>WelcomeEmail</CustomerKey>
<TriggeredSendStatus>Inactive</TriggeredSendStatus>
</TriggeredSendDefinition>
</system>
</exacttarget>
Updating a Triggered Email Interaction Updating the triggered email interaction is the process of changing the message content or other parameter of the interaction. You must pause the interaction before you can update it. You must publish changes after you update in order for the changes to be available to the interaction. When updating a TriggeredSendDefinition, set only the properties you want to update and the key of the TriggeredSendDefinition. Web Service API Example
TriggeredSendDefinition tsd = new TriggeredSendDefinition();
tsd.CustomerKey = "WelcomeEmail"; // used for programmatic access
tsd.Description = "Quick tips for new users";
tsd.Email = new Email();
tsd.Email.ID = 12345;
tsd.Email.IDSpecified = true;
tsd.TriggeredSendStatus = TriggeredSendStatusEnum.Inactive;
tsd.TriggeredSendStatusSpecified = true;
UpdateResult[] results = etIntegrationFramework.Update(new UpdateOptions(), new
APIObject[] { tsd }, out requestID, out status);
Console.WriteLine(status);
Console.WriteLine(results[0].StatusCode);
Console.WriteLine(results[0].StatusMessage);
XML API Example
<exacttarget>
<authorization>
<username>apiuser</username>
<password>password</password>
</authorization>
<system>
<system_name>triggeredsend</system_name>
<action>updatedefinition</action>
<TriggeredSendDefinition xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns='http://exacttarget.com/wsdl/partnerAPI'>
<CustomerKey>WelcomeEmail</CustomerKey>
<List>
<ID>12345</ID>
</List>
<TriggeredSendStatus>Inactive</TriggeredSendStatus>
</TriggeredSendDefinition>
</system>
</exacttarget>
Pushing Changes to an Interaction After you update a triggered email interaction, you must publish the changes to make them available. You publish changes by setting the RefreshContent property to True. After you publish the changes, you must start the interaction in order for it to resume sending emails. Web Service API Example
TriggeredSendDefinition tsd = new TriggeredSendDefinition();
tsd.CustomerKey = "WelcomeEmail"; // used for programmatic access
tsd.RefreshContent = true;
tsd.RefreshContentSpecified = true;
UpdateResult[] results = etIntegrationFramework.Update(new UpdateOptions(), new
APIObject[] { tsd }, out requestID, out status);
Console.WriteLine(status);
Console.WriteLine(results[0].StatusCode);
Console.WriteLine(results[0].StatusMessage);
XML API Example
<exacttarget> <authorization> <username>apiuser</username> <password>password</password> </authorization> <system> <system_name>triggeredsend</system_name> <action>updatedefinition</action>
<TriggeredSendDefinition xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""
xmlns:xsd=""http://www.w3.org/2001/XMLSchema""
xmlns=""http://exacttarget.com/wsdl/partnerAPI"">
<CustomerKey>WelcomeEmail</CustomerKey>
<RefreshContent>true</RefreshContent>
</TriggeredSendDefinition>
</system>
</exacttarget>
Starting a Triggered Email Interaction Starting a triggered email interaction sets the status to Active and allows the interaction to send emails in response to trigger events. You must start a triggered email interaction after you create it and after you publish changes to it. Web Service API Examples
TriggeredSendDefinition tsd = new TriggeredSendDefinition();
tsd.CustomerKey = "WelcomeEmail"; // used for programmatic access
tsd.TriggeredSendStatus = TriggeredSendStatusEnum.Active;
tsd.TriggeredSendStatusSpecified = true;
UpdateResult[] results = etIntegrationFramework.Update(null, new APIObject[] { tsd }, out
requestID, out status);
Console.WriteLine(status);
Console.WriteLine(results[0].StatusCode);
Console.WriteLine(results[0].StatusMessage);
XML API Example
<exacttarget>
<authorization>
<username>apiuser</username>
<password>password</password>
</authorization>
<system>
<system_name>triggeredsend</system_name>
<action>updatedefinition</action>
<TriggeredSendDefinition xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""xmlns:xsd=""http://www.w3.org/2001/XMLSchema" "xmlns=""http://exacttarget.com/wsdl/partnerAPI"">
<CustomerKey>WelcomeEmail</CustomerKey>
<TriggeredSendStatus>Active</TriggeredSendStatus>
</TriggeredSendDefinition>
</system>
</exacttarget>
Retrieving Tracking Data You can view tracking data in the application or retrieve it using the Web Service API. The XML API does not support retrieval of triggered email tracking data. Web Service API Example
string requestID = null; APIObject[] results = null; RetrieveRequest request = new RetrieveRequest(); // Build filter for Retrieval of Triggered events SimpleFilterPart sfp = new SimpleFilterPart();
sfp.Property = "CustomerKey";
sfp.SimpleOperator = SimpleOperators.equals;
sfp.Value = new string[] { "WelcomeEmail" };
// Retrieve TriggeredSendDefinition ObjectId
RetrieveRequest rr = new RetrieveRequest();
rr.ObjectType = "TriggeredSendDefinition";
rr.Filter = sfp;
rr.Properties = new string[] { "ObjectID" };
string status = integrationFramework.Retrieve(rr, out requestID, out results);
for (int i = 0; i < results.Length; i++)
{
Console.WriteLine(string.Format("{0} ObjectID: {1}", i,
((TriggeredSendDefinition)results[i]).ObjectID));
}
// We want click data: JobID, Subscriberkey, EventDate, and URL
request.ObjectType = "SentEvent";
request.Properties = new string[] { "SendID", "SubscriberKey", "EventDate" };
// We want to filter by a specific TriggedSendID and a data range
// First, the TriggeredSendID
SimpleFilterPart TriggeredSendFilter = new SimpleFilterPart();
TriggeredSendFilter.Property = "TriggeredSendDefinitionObjectID";
TriggeredSendFilter.SimpleOperator = SimpleOperators.equals;
TriggeredSendFilter.Value = new string[] {
((TriggeredSendDefinition)results[0]).ObjectID.ToString() };
// Now, the date range
SimpleFilterPart dateFilter = new SimpleFilterPart();
dateFilter.Property = "EventDate";
dateFilter.SimpleOperator = SimpleOperators.between;
dateFilter.DateValue = new DateTime[2];
dateFilter.DateValue[0] = DateTime.UtcNow.AddDays(-1);
dateFilter.DateValue[1] = DateTime.UtcNow;
// Put them together
ComplexFilterPart filter = new ComplexFilterPart();
filter.LeftOperand = TriggeredSendFilter;
filter.LogicalOperator = LogicalOperators.AND;
filter.RightOperand = dateFilter;
request.Filter = filter;
status = integrationFramework.Retrieve(request, out requestID, out results);
Console.Write(status);
// Loop through the results displaying them to the console
for (int cntr = 0; cntr < results.Length; cntr++)
{
SentEvent se = results[cntr] as SentEvent;
Console.WriteLine("{0} sent on {1}.",
se.SubscriberKey, se.EventDate); }
Results
johndoe@example.com sent on 3/20/2008 3:31:52 PM. johndoe@example.com sent on 3/20/2008 3:38:49 PM.}
Appendix A: API Objects You use the following API objects when sending triggered emails. See the API Guide and Web Service API Guide for technical detail on these objects. TriggeredSend Objects TriggeredSendDefinition - The triggered email interaction TriggeredSend - An instance of the email being triggered TriggeredSendCreateResult- The result of creating a TriggeredSend object TriggeredSendExclusionList- Used to exclude subscribers from a send definition TriggeredSendType (Enum)- The triggered send type, represented by a numeric value TriggeredSendStatus (Enum) - The triggered send status, represented by a numeric value SendClassification - The send classification of the triggered email interaction DeliveryProfile - The record that contains the IP address, domain, header inclusion, and footer inclusion information for the triggered email interaction SenderProfile - The record that contains the from name and from email address for the triggered email interaction TriggeredSend Tracking Objects OpenEvent - An instance of a subscriber opening an email SentEvent - An instance of a subscriber being sent an email NotSentEvent - An instance of an email not being sent to a subscriber due to an issue with the subscriber information-for example, the subscriber being unsubscribed BounceEvent - An instance of an email bouncing UnsubEvent - An instance of a subscriber unsubscribing ClickEvent - An instance of a subscriber clicking a link in an email ForwardedEmailEvent - An instance of a subscriber forwarding an email message using the Forward-to-a-Friend feature ForwardedEmailOptinEvent - An instance of a new subscriber opting in to a mailing list after receiving an email forwarded using the Forward-to-a-Friend feature
Appendix B: Error Codes You may encounter the following error codes when sending triggered emails.
XML API Users: Any of the following errors will cause a 128 error message. These error IDs and codes are in the details of the error response, but the message associated with these errors or additional detail may not be. 18000 TriggeredSendObjectNotFound - Type: Validation
- Messages
- Triggered Send Object not found
- Resolution
- Ensure you are passing a TriggeredSend object into the API call
18001 TriggeredSendSubscriberProcessingParametersNotFound - Type: Validation
- Messages
- The Triggered Send Definition is not completely configured or in a new status. Please check Triggered Send Definition configuration. (Needs to be updated)
- Resolution
- Complete the configuration of the Triggered Send Definition or start the Triggered Send Definition.
18002 TriggeredSendUnableToCreateRequest - Type: Validation
- Messages
- Triggered Send Definition ID/Customer Key is invalid (misspelled in code)
- Triggered Send Definition ID/Customer Key do not match (misspelled in code)
- Triggered Send must be in an Active or Inactive status
- No Triggered Send Definition ID or External key supplied (needs to be updated)
- Triggered Send Definition ID is invalid (needs to be updated)
- The Triggered Send Object must contain the Triggered Send ID or the Customer Key (Needs to be updated)
- The TriggeredSendDefinitionID provided is not valid for this account. Please check Triggered Send Definition configuration (Needs to be updated)
- Invalid Customer Key
- The Triggered Send Definition is not completely configured or in a new status. Please check Triggered Send Definition configuration.
- Resolution
- Ensure the Triggered Send Definition is started.
- Ensure the Triggered Send Definition object contains a populated CustomerKey or ObjectID property.
- Ensure the Triggered Send Definition object CustomerKey or ObjectID property is valid.
- If the message states "Exception occurred during [CreateTriggeredSend]", contact ExactTarget support.
18003 TriggeredSendSubscribersNotQueuedForOMM - Type: System
- Messages
- Exception occurred during [CreateTriggeredSend]
- Resolution
- Contact ExactTarget support
18004 TriggeredSendErrorNotifyingOMM - Type: System
- Messages
- Exception occurred during [CreateTriggeredSend]
- Resolution
- Contact ExactTarget support
18005 TriggeredSendUnableToUpdateSubscriberProcessingResults - Type: System
- Messages
- Exception occurred during [CreateTriggeredSend]
- Resolution
- Contact ExactTarget support
18006 TriggeredSendSubscriberProcessingError - Type: Validation or System
- Messages
- Unhandled exceptions related to TriggeredSend subscriber processing
- Subscriber was excluded by domain exclusion list.
- Subscriber Owner FromEmail property value is set to an invalid email address
- Resolution
- If using the FromEmail property on the Subscriber's Owner object, ensure the value is a valid email address
- If this code is on the Subscriber in the SubscriberFailures array on the TriggeredSendCreateResult object, log the subscriber and mark them undeliverable (as the email address' domain in on the ExactTarget spam filter).
- Contact ExactTarget support
180007 TriggeredSendSubscribersNotFound - Type: Validation
- Messages
- The Triggered Send Object must have subscribers associated with it
- Resolution
- Add one or many Subscribers to the TriggeredSend object
180008 TriggeredSendNoValidSubscriberToProcess - Type: Validation
- Messages
- Unable to queue Triggered Send request. There are no valid subscribers.
- Triggered Send request was not queued. There are no valid subscribers.
- Resolution
- If using SOAP, check the SubscriberFailures array on the TriggeredSendCreateResult object
- Ensure all required attributes of the subscriber are passed in
180009 TriggeredSendUnableToQueueAsyncRequest 180010 TriggeredSendUnableToSerializeData 180011 TriggeredSendUnableToQueueData 180012 TriggeredSendUnableToQueueSlotWorker
Appendix C: Time Zone Strings You can pass the following strings in as the value of the _TimeZone parameter and they will be converted to the appropriate numeric strings. - Central
- Eastern
- Mountain
- Pacific
- Abu Dhabi, Muscat, Tblisi
- Alaska
- Arizona
- Athens
- Atlantic Time (Canada)
- Auckland
- Australia (East)
- Australia (Mid)
- Baghdad, Kuwait, Nairobi
- Bangkok
- Bangladesh
- Berlin
- Brasilia
- Buenos Aires
- Cairo
- Central Time
- Central Time (US & Canada)
- China
- Eastern Europe
- Eastern Time
- Eastern Time (US & Canada)
- Fiji
- GMT +10:30
- GMT +11:30
- GMT +13
- GMT +14
- GMT +9:30
- GMT -8:30
- GMT 0
- GMT+1
- GMT+10
- GMT+11
- GMT+12
- GMT+2
- GMT+3
- GMT+3:30
- GMT+4
- GMT+4:30
- GMT+5
- GMT+5:30
| - GMT+6
- GMT+6:30
- GMT+7
- GMT+8
- GMT+9
- GMT, London
- GMT-1
- GMT-10
- GMT-11
- GMT-12
- GMT-2
- GMT-3
- GMT-3:30
- GMT-4
- GMT-5
- GMT-6
- GMT-7
- GMT-8
- GMT-9
- GMT-9:30
- Guam
- Hawaii
- Hong Kong, Taiwan, Singapore
- India
- Indiana (East)
- Islamabad
- Israel
- Kabul
- Mexico City
- Mid-Atlantic
- Moscow
- Mountain Time
- Mountain Time (US & Canada)
- Newfoundland
- Pacific Time
- Pacific Time (US & Canada)
- Paris
- Perth
- Prague
- Tehran
- Tokyo
|
This page was last updated by Ryan Williams on Mon, 23 Jan 2012 20:53:01 GMT.
If you require assistance with the ExactTarget application, please contact Global Support. If you wish to send Ryan direct feedback, fill out the form below:
| Images 2 |
|---|
 |  | |
|