0

I'm trying to trigger an automation on ExactTarget using SOAP in .net in C#

so far i have found the examples page help.exacttarget.com/en-GB/technical_library/web_service_guide/technical_articles/interacting_with_automation_studio_via_the_web_service_soap_api/

which says var performResponse = soapClient.Perform(performRequest);

however soapClient.Perform dose not take a singe agument.

what i have so far is this

Automation automation = new Automation();
PerformOptions options = new PerformOptions();
automation.CustomerKey = "53ba121d-2934-90d6-d86d-e0662c656165";
automation.ScheduledTime = DateTime.Now;
automation.ScheduledTimeSpecified = true;
automation.IsActive = true;
automation.AutomationSource = new AutomationSource()
{
   AutomationSourceID = Guid.NewGuid().ToString(),
   AutomationSourceType = "RestAPI"
};

automation.Notifications = new AutomationNotification[0];
//   automation.ObjectID = "7d88eb5b-80ea-43bb-97b2-4067aaa19c35";
automation.PartnerProperties = new APIProperty[0] { };
// automation.PartnerKey = "53ba121d-2934-90d6-d86d-e0662c656165";

string sA;
string sB;
string sC;


PerformResult[] steve = soapClient.Perform(new PerformOptions(), 
"start", new APIObject[] { automation }, out sA, out sB, out sC);

can anyone give me a hand or show me a simple example

thanks.

Equnox
  • 1
  • 1

1 Answers1

0

I'm using mainly Java to interact with ET but I can provide you some hints:

  • try to create automation first
  • if automation already exists try to find it/retrieve it
  • you can pass this retrieved object to Perform method

I think that if object already exists then CustomerKey should be sufficient for your needs, you don't need to specify nothing more.

Grzegorz Gajos
  • 2,253
  • 19
  • 26
  • thnak's Grzegorz Gajos i will give it a go and get back to you (its been doing my head in Tried support but havent got any where yet). – Equnox Jan 10 '14 at 13:31
  • i tryed but it dident work i. the automation is already created. all i want to do is to either set it to start or scheduled it to start asap. if you have any examples in Java it might help as i got nothing so far and documentation they have i can only presume is outdated. thanks – Equnox Jan 10 '14 at 13:43
  • I can see that they are setting ObjectID on automation instead of CustomerKey, did you try this? `automation.ObjectID = programID;` – Grzegorz Gajos Jan 10 '14 at 14:08
  • yer it still didn't work. im going to try to use the API to scheduled the automation (the documentation is still wrong but i might be able to figure it out) thanks for you help any way even if we could solve it – Equnox Jan 14 '14 at 10:14
  • The last thing that come to my mind is to debug SOAP response. Not sure how to debug this in .NET. There is quite a lot detailed informations in SOAP envelope, also debug data. You can try to use SOAP directly using for example this tool https://chrome.google.com/webstore/detail/wizdler/oebpmncolmhiapingjaagmapififiakb – Grzegorz Gajos Jan 14 '14 at 10:51