0

Note: I am using FuelSDK with C#

For example, When Import Definition is completed there is an option to receive email notification showing that import was successful and if there is any error then it gets displayed in the email as well. (This feature is under: Import Completion Settings when you create Import)

Here is the code for creating the Import:

ET_Import postImport = new ET_Import();
            postImport.AuthStub = myclient;
            postImport.Name = NewImportName;
            postImport.CustomerKey = NewImportName;
            postImport.Description = "Created with FuelSDK";
            postImport.AllowErrors = true;
            postImport.DestinationObject = new ET_DataExtension() { ObjectID = SendableDataExtensionObjectID};
            postImport.FieldMappingType = ImportDefinitionFieldMappingType.InferFromColumnHeadings;
            postImport.FileSpec = "FuelSDKExample.csv";
            postImport.FileType = FileType.CSV;
            postImport.Notification = new AsyncResponse() { ResponseType = AsyncResponseType.email, ResponseAddress = "your email address" };
            postImport.RetrieveFileTransferLocation = new FileTransferLocation() { CustomerKey = "ExactTarget Enhanced FTP" };
            postImport.UpdateType = ImportDefinitionUpdateType.Overwrite;

            PostReturn prImport = postImport.Post();

            Console.WriteLine("Post Status: " + prImport.Status.ToString());
            Console.WriteLine("Message: " + prImport.Message.ToString());
            Console.WriteLine("Code: " + prImport.Code.ToString());
            Console.WriteLine("Results Length: " + prImport.Results.Length);

As you can see in the code, there is a option for notification and you can enter your email there to receive notification when import completes.

So, is it possible to get similar notification when Email Send Definition completes?

I appreciate your time.

  • I don't know of any options in the API or on the Triggered Send definition itself to receive such a notification. I've never done so, but you could use the API to poll a Send Logging Data Extension for triggered send events and then return status information about the send. This is covered in the Technical Article: code.exacttarget.com/apis-sdks/soap-api/… – Alex McDonald Feb 5 '16 at 2:19
0

There isn't a way to get an email triggered from the Marketing Cloud when the send that results from calling Perform(the Send method is using the SDK) on EmailSendDefinition is complete but you can retrieve the Send object to determine when the send is complete. That call will return a NewID property in the results which is what is used to filter for the specific Send. You would need to call it multiple times until the status shows complete. Depending on the size of the send, it would be best to implement a delay of 30-60seconds between requests.

Example Code: https://github.com/salesforce-marketingcloud/FuelSDK-CSharp/blob/Dot9/objsamples/Sample_Send.cs

Filter would look like:

s.SearchFilter = new SimpleFilterPart() { Property = "ID", SimpleOperator = SimpleOperators.equals, Value = new String[] { "11111"} };
  • Thanks for your replay. I actually don't want to keep checking for the status to complete because I am triggering the API calls through another product outside of ExactTarget and I don't want user to wait for it to complete. So, I am just going to perform Email Send Definition and if API call return true then exit out of the process. – Ajit Feb 9 '16 at 16:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.