Create Campaign - Subject field possible bug

SOLVED
Go to solution
Regular Participant

Create Campaign - Subject field possible bug

I've run into a couple weird things when trying to create a campaign through the API, all tied to the subject line when I use a dynamic field.

 

 

When I send

<Subject> &lt;Property name=&quot;Subscriber.FirstName&quot; /&gt; Your Car documents are enclosed 08/09</Subject>

In the return response I get

<Subject>&lt;Property name="Subscriber.FirstName" /&gt; Your Car documents are enclosed 08/09  Your Car documents are enclosed 08/09</Subject>

 Note the repeat of the non dynamic content. 

 

When I sent

<Subject>&lt;Property name=&quot;Subscriber.FirstName&quot; /&gt; Your Car documents are enclosed 08/08</Subject>

 I got

<Subject>Property name="Subscriber.FirstName" /&gt; Your Car documents are enclosed 08/08 Your Car documents are enclosed 08/08</Subject>

 Note the repeat again as well as the removal of the first "&lt;", it appears it removes it if it's the first character, I think this is possibly due to some code that removes any non alphanumeric character at the start of the tag to handle line breaks in the sent XML?  However I then tried

 

<Subject>&lt;&lt;Property name="Subscriber.FirstName" /&gt; Your Car documents are enclosed 08/09</Subject>

 Which resulted in

 

<Subject>&lt;&lt;Property name="Subscriber.FirstName" /&gt; Your Car documents are enclosed 08/09</Subject>

 No duplication this time, it kept it exactly as I sent it, but since I was trying to work around what I thought was happening that was no good.  Lastly I tried, without a lot of hope

 

<Subject>&amp;lt;Property name=&quot;Subscriber.FirstName&quot; /&gt; Your Car documents are enclosed 08/08</Subject>

 It also kept everything as sent, but that wasn't the goal this time either.  I wouldn't rule out user error, it's possible I'm doing something incorrectly, or maybe dynamic fields shouldn't be used in subjects and just happen to sort of work.  Anyone know of a workaround?

 

 

 

1 ACCEPTED SOLUTION
Employee

Hi,

 

Thanks for the heads up about the strange things that come back when you try that.  We don't currently support having custom fields in subject lines.

 

Pulling custom details for custom code emails (the only type that are possible when creating a campaign using the API) is only possible with XHTML emails, not HTML emails.  However, we can only pull contact details for the EmailContent, not subject lines or within any other XML tags.

 

I hope that helps clarify what will and won't work.  Let us know if you have any other questions.

 

Regards,

Shannon W.

API Support

View solution in original post

1 REPLY 1
Employee

Hi,

 

Thanks for the heads up about the strange things that come back when you try that.  We don't currently support having custom fields in subject lines.

 

Pulling custom details for custom code emails (the only type that are possible when creating a campaign using the API) is only possible with XHTML emails, not HTML emails.  However, we can only pull contact details for the EmailContent, not subject lines or within any other XML tags.

 

I hope that helps clarify what will and won't work.  Let us know if you have any other questions.

 

Regards,

Shannon W.

API Support

View solution in original post

Developer Portal

View API documentation, code samples, get your API key.

Visit Page