2014-01-09 11 views
0

我試圖觸發在C#中使用SOAP在.NET上ExactTarget自動化exacttarget瓶坯自動化

到目前爲止,我已經找到了例子頁help.exacttarget.com/en-GB/technical_library/web_service_guide/technical_articles/interacting_with_automation_studio_via_the_web_service_soap_api/

它說VAR performResponse = soapClient.Perform(performRequest );

然而soapClient.Perform劑量不要一個單一的agument。

我有什麼到目前爲止,這是

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); 

誰能給我一個手或告訴我一個簡單的例子

感謝。

回答

0

我使用Java的主要與ET互動,但我可以爲您提供一些提示:

  • 嘗試創建自動化第一
  • 如果自動化已經存在,試圖找到它/檢索
  • 你可以通過這個檢索到的對象執行方法

我認爲,如果對象已經存在,那麼CustomerKey應該足以滿足您的需求,您不需要指定更多。

+0

thnak的Grzegorz Gajos我會給它一個去找回你(它一直在試圖支持我的頭,但還沒有得到任何地方)。 – Equnox

+0

我嘗試過,但它的工作我。自動化已經創建。我想要做的就是將其設置爲啓動或安排啓動。如果你在Java中有任何的例子,它可能會有所幫助,因爲我迄今爲止沒有任何東西,並且它們擁有的文檔我只能假定已經過時。謝謝 – Equnox

+0

我可以看到他們在自動化而不是CustomerKey上設置ObjectID,你試過這個嗎? 'automation.ObjectID = programID;' –