This guide contains conceptual, procedural, and reference information you can use when preparing to implement a web service API solution with asynchronous processing. This document is intended for developers using the ExactTarget Web Service API to enable business functionality.
You must have the web service API enabled for your account to use asynchronous processing. Contact your ExactTarget representative for more information.
Asynchronous processing uses the web service API, so XML API users will have to switch to the web service API in order to make use of this feature.
Web service API users must modify existing calls to include the Options parameters described below. You can identify some of your API calls for asynchronous processing while leaving others for regular synchronous processing.
With asynchronous call processing, API calls from your integration go to an async server to be queued before being processed by ExactTarget. They can be processed as ExactTarget is available or scheduled to be processed at a future time.
Even when ExactTarget is in maintenance mode, API calls are not dropped. They wait on the async server until ExactTarget is ready to process them.
Queued calls can be processed:
The purpose of this document is to explain all the implementation options and provide some best practices on usage.
There are two endpoints available for integrations in the ExactTarget production environment:
Asynchronous processing works with all other API endpoints (including any pre-production endpoints), but your calls do not receive the same benefits as those calls using on.exacttarget.com.
The following methods support asynchronous processing
All objects available in the WSDL can be processed asynchronously. Objects that you include in a conversation should use CustomerKey or SubscriberKey instead of ID or ObjectID.
Objects that have full CRUD Support with CustomerKey or SubscriberKey include:
The following objects are ideally suited for asynchronous processing because of the nature of the tasks for which they are used:
Use CustomerKey for all objects unless your current integration requires PartnerKey. While the application supports PartnerKey, ExactTarget prefers the use of CustomerKey.
Several properties influence asynchronous processing:
Conversations group API calls to be processed in sequence. You provide a unique ConversationID value for each grouping of calls and a sequence number to indicate the order within the conversation. ConversationID is a string value that is specified by the web service client and is unique for the account. You can choose a ConversationID value that matches another unique identifier in your system, so that you can associate the ConversationID activity with other data for reporting.
The system will not process a ConversationID that has been used before. For example, if you send a group of API calls with the ConversationID 1234 and lose connectivity during the send, you can resend ConversationID 1234 when you regain connectivity. If the conversation was processed previously, it will not be processed again.
A conversation will fail if one of the calls in the conversation returns an Error status. If the processing of a conversation fails during one of the sequenced calls, you cannot resubmit the conversation ID to process the remaining calls. You must identify the calls that did not complete and resubmit them with a new ConversationID.
Conversations begin processing after all parts of the conversation are received. If SequenceCode and CallInConversation are not sent, the application assumes the conversation has only one part to process and begins processing immediately. If a conversation fails while processing a request, the entire conversation goes to error and subsequent calls in the conversation are not processed.
SequenceCode must start at 1 and be sequential (you cannot skip values). The parts can be sent in any order but they will be processed in SequenceCode order.
When a conversation fails, it's important to record the ConversationID and the Sequence code, as the exception logic of the web service client is expected to process the error message and create a new conversation with the remaining steps. As a result, a conversation may take multiple roundtrips and a few different conversationIDs to fully process. For example, if your conversation consists of 3 Create calls that each have 10 Subscriber objects and the first call fails while it is being processed, you will need to create a new conversation with a different ConversationID that consists of the last 2 Create calls.
If you take more than 5 minutes between sending parts, the conversation will be placed into an Error state, it will not be processed and you must start a new conversation with a different ConversationID.
A CorrelationID identifies individual top-level objects in a call. Use the CorrelationID to provide an identifier to determine the results of an individual top-level object with a call. CorrelationID must be unique per object within a call. Different calls can reuse CorrelationID values.
For example, a Create call containing a List object to be processed asynchronously can have that object identified in the results as having the CorrelationID of "X". Subsequent calls can also have an "X" CorrelationID.
ConversationID is not required to specify CorrelationID. If ConversationID is not specified for a call, then RequestID is what the integration must use to get the results.
The CorrelationID replaces the array index when passing in multiple objects into a call for asynchronous processing. The Correlation ID allows reporting on individual top-level objects in a call.
CorrelationID is exposed via:
Asynchronous processing is not necessary for all of your web service calls. Identify an API call for asynchronous processing in the following situations.
High availability is a benefit for asynchronous processing. Using this feature allows your API calls to be accepted and queued even if ExactTarget is unavailable or undergoing maintenance.
If the situation requires a response in less than a second, use asynchronous processing. The asynchronous server responds instantaneously to let your system know that the call has been queued, even if the call is scheduled to be processed in the future.
If you want to send multiple API calls that need to be processed in sequence, the conversation concept available with the asynchronous API makes it the best tool to use. Multiple calls sent synchronously could be processed out of order, but the sequence numbers you assign to the calls in the conversation ensure that processes happen correctly.
Often, it is important that an API call not be allowed to be repeated, even if the call is sent more than once. For example, you do not want to send the same email message multiple times. The conversation concept used in asynchronous processing prevents duplicate processing of API calls because each ConversationID must be unique and cannot be processed more than once.
You can set the ConversationID value to a unique identifier of your choice to connect the ConversationID to other data in your reports.
Use asynchronous processing when you want to schedule an API call to be processed at a later date. Using the optional Options parameter on API calls, you can schedule a date and time to process the call.
You can choose whether to receive notifications regarding your API calls via email, HTTP POST, or Retrieve.
This page was last updated by Ryan Williams.
If you require assistance with the ExactTarget application, please contact the Client Success Center. If you wish to send Ryan direct feedback, fill out the form below:
| File | Size | Date | Attached by | |||
|---|---|---|---|---|---|---|
| AsyncSolutions.zip Async C# Sample Code Set | 2.01 MB | 12:42, 3 Aug 2010 | Admin | Actions | ||