Oct 6, 2010 at 2:35 PM

I trying to use campaignUpdate, but i simply dont get it :-)

What i want to do is:

1/use an existing template.
2/update the html_MAIN of the template.

What will i send to the campaignUpdateInput -> parms.value?

Has anyone got an example i can see?


Oct 6, 2010 at 11:19 PM

Yea, well the campaignUpdate() is not my favorite method either, it takes a bit of study of the MC documentation, and I tried to explain it a bit better in mine (not sure I succeeded, but look at the Method Notes section. )

At any rate, here's a simple sample of what you want to do...

         campaignUpdateInput input = new campaignUpdateInput();
         input.parms.apikey = "your-apikey";
         // **** access, output, and validate
         input.api_AccessType = AccessType;
         input.api_OutputType = OutputType;
         // -------------------------------------- input parms
         input.parms.cid = "cid-value"; = "content";
         string main_content = @"<h1 class='title'>Perceptive Note</h1><p class='copy'>We do integrations.</p><p class='copy'>...and MUCH more.</p>";
         Dictionary<string, string> value = new Dictionary<string, string>();
         value.Add( "html_main", main_content );
         input.parms.value = value;
         // --------------------------------------
         // execution
         campaignUpdate cmd = new campaignUpdate( input );
         campaignUpdateOutput output = cmd.Execute();

If you wanted to change footer, or other content, you just add another dictionary entry for the appropriate section name.

Hope that helps.


Oct 7, 2010 at 8:26 AM

Thanks David,

I got the idea ;-)

Have a great day. 

Oct 8, 2010 at 9:05 AM

David, can you tell me too,

When updating "options", can i set more than one "option" on the same campaignUpdate?

Or Is it nesseserry to create a new campaignupdate object and execute for each of them?

like this:
campaignUpdateInput input = new campaignUpdateInput();
input.parms.apikey = strApiKey;
input.parms.cid = strCampaignID; = "from_name";
input.parms.value = "test";     
campaignUpdate cu = new campaignUpdate(input);
campaignUpdateOutput campaignupdateoutput = cu.Execute(); 


Oct 8, 2010 at 11:59 AM
Edited Oct 8, 2010 at 12:11 PM

Hi tommer70,

just like the MailChimp API one name at a time ... 


Oct 8, 2010 at 12:58 PM

One of the other reasons it's not my favorite api call