Create or update a mailing template - SaveMailing

Saves a new or updates an existing Acoustic Campaign mailing template to use against an Acoustic Campaign database, contact list, or query.

📘

Notes to use SaveMailing

It is critical to understand that this API replaces the existing template if it exists (the lookup is based on MailingName element).

Advanced features such as dynamic content, relational table, and stored file assets are not currently supported in this version of the API. However, you can pass full HTML, personalization tags, and any references to externally hosted image URLs within that HTML body that gives a full range of wanted look and feel.

All elements are case sensitive to the spec.

Elements (Required)

Header - Defines all mailing template settings. Contains MailingName, MailingID, Subject, ListID, FromName, FromAddress, ReplyTo, Visibility, FolderPath, Encoding, TrackingLevel, ClickHereMessage, IsCrmTemplate, HasSpCrmBlock, PersonalFromName, PersonalFromAddress, and PersonalReplyTo as children.

MailingName - The name of the new mailing template.

MailingID - Optional Specifies the template ID to update an existing template instead of creating a new one.

Subject - The subject of the mailing template

ListID - The ID of the database, contact list, or query used for the mailing template.

FromName - Specifies the mailing “From Name” value.

FromAddress - Specifies the mailing “From Address” value.

ReplyTo - Specifies the mailing “Reply To Address” value.

Visibility - Defines the location of the saved mailing: 0 (Private) or 1 (Shared)

FolderPath - Optional Specifies the path of the folder to save the mailing template:
FolderName/SubfolderName
Example: If the folder structure is Shared/MyNewsletters/August, and I want to store my template in the August folder, then my FolderPath element would be: <FolderPath>MyNewsletters/August</FolderPath>

Note: Folder names are case sensitive. If this element is not specified, the Mailing Template is saved in top-level directory.

Encoding - Message encoding. Valid values are: 0 = Western European (iso-8859-1), 1 = Chinese (Simplified), 2 = Chinese (Traditional), 3 = Japanese (EUC), 4 = Japanese (Shift-JIS), 5 = Korean, 6 = Unicode (utf8), and 7 = Japanese (JIS)

TrackingLevel - The tracking level for the messages: 1 (None), 2 (Opens Only), 3 (Aggregate), and 4 (Unique)

ClickHereMessage - Optional Adds the ‘click to view in browser’ link at the top of the email message. Valid values are true or false

IsCrmTemplate - Optional Specifies whether this template is shared with the CRM integration. Valid values are true or false

HasSpCrmBlock - Optional Specifies whether a CRM Block is used. Valid values are true or false

PersonalFromName - Optional Specifies “From Name” personalization.

PersonalFromAddress - Optional Specifies “From Address” personalization.

PersonalReplyTo - Optional Specifies “Reply To Address” personalization.

MessageBodies - Defines mailing body. Contains HTMLBody, AOLBody, and TextBody as children.

HTMLBody - Fully encapsulated HTML content used in the mailing body wrapped in a CDATA tag. Complete HTML tags (html, head, body) must be used in the content for HTMLBody.

📘

Note for HTMLBody element

Currently HTMLBody supports Tracked Hyperlink, Non-Tracked Hyperlink, One Click Opt Out, Custom Opt Out, and Click Stream Links. To define these values in this section, the following attribute needs to be added in the anchor tag.

Non-Tracked Hyper Link : xt=’SPNOTRACK’ Tracked Hyper Link : xt=’SPCLICK’ Click Stream : xt=’ SPCLICKSTREAM’ One Click Opt Out : xt=’ SPONECLICKOPTOUT’ Custom Opt Out: xt=’ SPCUSTOMOPTOUT’ Custom Click to View: xt=’SPCLICKTOVIEW’

Example of Tracked Hyper link used: Acoustic

AOLBody - Optional Fully encapsulated AOL content used in the mailing body wrapped in a CDATA tag.

TextBody - Optional Fully encapsulated Text content used in the mailing body wrapped in a CDATA tag.

ClickThroughs - This element is required if the HTML Body consists of any hyperlinks. Contains ClickThrough and its children: ClickThroughName, ClickThroughURL, and ClickThroughType.

ClickThroughName - The name of the specified URL in the HTML content.

ClickThroughURL - The specified target URL in the link within the HTML body. Specify the following for one click opt-out and custom opt-out: #SPONECLICKOPTOUT and #SPCUSTOMOPTOUT

ClickThroughType - Click through types. Supported values include:

  • 1 = Not Tracked
  • 2 = Regular Click Thru
  • 5 = Clickstream Link
  • 12 = Personalized Links
  • 14 = One-Click Opt Out
  • 19 = Custom Opt Out
  • 20 = Custom Click To View

ForwardToFriend - The Forward To Friend Link is currently not supported via API. However, the element is required to call the API. Contains Forward Type as a child element.

Forward Type - Valid value: 0 = Not Embedded

<Envelope>
   <Body>
      <SaveMailing>
         <Header>
            <MailingName><![CDATA[Dummy Mailing template]]></MailingName>
            <FromName><![CDATA[Silverpop®]]></FromName>
            <FromAddress><![CDATA[[email protected]]]></FromAddress>
            <ReplyTo><![CDATA[[email protected]]]></ReplyTo>
            <Visibility>0</Visibility>
            <FolderPath>Shared/SPOP/MarketingTemplate</FolderPath>
            <Subject>Subject of a Mailing</Subject>
            <TrackingLevel>4</TrackingLevel>
            <Encoding>6</Encoding>
            <ListID>1924132</ListID>
         </Header>
         <MessageBodies>
            <HTMLBody><![CDATA[<html><head><title>Mailing</title></head><body><p>This is an Example of a Mailing body. 
Visit <a name=”Link1″ href=”http://www.acousticcom” xt="SPCLICK">Acoustic</a> for more information. 
If you would like to no longer receive any emails from this campaign, 
click <a href=”#SPONECLICKOPTOUT” xt=”SPONECLICKOPTOUT” name=”OOLink”>here</a>t</p></body></html>]]></HTMLBody>
            <AOLBody><![CDATA[<html><head><title>Mailing</title></head><body><p>This is an Example of a Mailing body. 
Visit <a name=”Link1″ href=”http://www.acoustic.com” xt="SPCLICK">Acoustic</a> for more
 information. 
If you would like to no longer receive any emails from this campaign, 
click <a href=”#SPONECLICKOPTOUT” xt=”SPONECLICKOPTOUT” name=”OOLink”>here</a>t</p></body></html>]]></AOLBody>
         </MessageBodies>
         <ClickThroughs>
            <ClickThrough>
               <ClickThroughName><![CDATA[Link1]]></ClickThroughName>
               <ClickThroughType>2</ClickThroughType>
               <ClickThroughURL>http://www.acoustic.com</ClickThroughURL>
            </ClickThrough>
            <ClickThrough>
               <ClickThroughName><![CDATA[OOLink]]></ClickThroughName>
               <ClickThroughURL><![CDATA[#SPONECLICKOPTOUT]]></ClickThroughURL>
               <ClickThroughType>14</ClickThroughType>
            </ClickThrough>
         </ClickThroughs>
         <ForwardToFriend>
            <ForwardType>0</ForwardType>
         </ForwardToFriend>
      </SaveMailing>
   </Body>
</Envelope>
<Envelope>
   <Body>
      <SaveMailing>
         <Header>
            <MailingName><![CDATA[Dummy Mailing template]]></MailingName>
            <FromName><![CDATA[Acoustic]]></FromName>
            <FromAddress />
            <ReplyTo />
            <Visibility>1</Visibility>
            <FolderPath>SPOP/MarketingTemplate</FolderPath>
            <Subject>Subject of a Mailing</Subject>
            <TrackingLevel>4</TrackingLevel>
            <Encoding>6</Encoding>
            <ListID>1924132</ListID>
         </Header>
         <MessageBodies>
            <HTMLBody><![CDATA[<html><head><title>Mailing</title>
</head><body><a name=’view’ xt=’SPCLICKTOVIEW’ href=’#SPCLICKTOVIEW’ target=’_blank’ style=’color:#03509e;’>
View in browser</a><br><p>This is an Example of a Mailing body. 
Visit <a name=’Link1′ href=’http://www.acoustic.com’xt="SPCLICK">Acoustic</a> for more information. 
If you would like to no longer receive any emails from this campaign, 
click <a href=’#SPONECLICKOPTOUT’ xt=’SPONECLICKOPTOUT’ name=’OOLink’>here</a>t</p></body></html>]]></HTMLBody>
            <AOLBody><![CDATA[<html><head><title>Mailing</title></head><body><p>This is an Example of a Mailing body. 
Visit <a name=’Link1′ href=’http://www.acoustic.com’ xt="SPCLICK">Acoustic</a> for more information. 
If you would like to no longer receive any emails from this campaign, 
click <a href=’#SPONECLICKOPTOUT’ xt=’SPONECLICKOPTOUT’ name=’OOLink’>here</a>t</p></body></html>]]></AOLBody>
         </MessageBodies>
         <ClickThroughs>
            <ClickThrough>
               <ClickThroughName><![CDATA[view]]></ClickThroughName>
               <ClickThroughType>20</ClickThroughType>
               <ClickThroughURL><![CDATA[#SPCLICKTOVIEW]]></ClickThroughURL>
            </ClickThrough>
            <ClickThrough>
               <ClickThroughName><![CDATA[Link1]]></ClickThroughName>
               <ClickThroughType>2</ClickThroughType>
               <ClickThroughURL>http://www.Acoustic.com</ClickThroughURL>
            </ClickThrough>
            <ClickThrough>
               <ClickThroughName><![CDATA[OOLink]]></ClickThroughName>
               <ClickThroughURL><![CDATA[#SPONECLICKOPTOUT]]></ClickThroughURL>
               <ClickThroughType>14</ClickThroughType>
            </ClickThrough>
         </ClickThroughs>
         <ForwardToFriend>
            <ForwardType>0</ForwardType>
         </ForwardToFriend>
      </SaveMailing>
   </Body>
</Envelope>
<ENVELOPE>
   <BODY>
      <RESULT>
         <SUCCESS>TRUE</SUCCESS>
         <MailingID>81284534</MailingID>
      </RESULT>
   </BODY>
</ENVELOPE>

Elements (Results)

SUCCESS - True if successful; False if not.

MailingID - The ID of the created or updated template.