0

I'm using the c# library for the ET SOAP API and I'm trying to assign a campaign ID to email templates. However, this doesn't appear to be possible. Going by this documentation, I don't see a property to set that would associate a campaign. Are there any workarounds to this limitation? Campaigns can be associated to email content in the Marketing Cloud UI, so I assumed there would be a way to do so via the API.

I do see that I can assign a campaign to an email send definition through the 'additional' property. So I'm guessing that's all that matters in terms of campaign associations?

0

Campaigns aren't available in the SOAP API. There is a 'Campaigns' object in the SOAP API, but this isn't what you think it is — this refers to a deprecated 'Programs' feature which will be sunset in early 2017.

REST API Method

You will need to use the REST API to assign a campaign to one or more assets (e.g. an email, Data Extension, Automation or other type). Refer to the associateAssetToCampaign method.

Note: the request payload documented in the link above is slightly confusing. The 301 value in the URL refers to the Campaign ID that you are assigning an asset (or assets) to.

C# Fuel SDK

As you are using C#, you can optionally use the C# SDK to associate asset(s) to a campaign. Refer to this documentation.

Note: the documentation states that this operation is used for 'to create a new campaign within a Marketing Cloud account', which is completely incorrect; you can ignore this description.

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.