Overview

Skill Level: Intermediate

Prerequisites

Users of the ScheduleMailing API are strongly urged to implement a strict folder policy to better categorize and manage the sent mailings produced by this API. Watson Campaign Automation recommends users adopt a Year/Month/Day or similar folder structure by including an appropriate value for the PARENT_FOLDER_PATH element and making use of the CREATE_PARENT_FOLDER element when applicable.

Note: This API will not override the Org email throttling setting. The API will honor all Org level settings.

Step-by-step

  1. Syntax of the request and response XML for ScheduleMailing

    Operation  <ScheduleMailing>     
    Elements  TEMPLATE_ID  ID of template upon which to base the mailing.   
    ¬† LIST_ID¬† ID of database, query, or contact list to send the template‚Äźbased mailing.¬† ¬†
      MAILING_NAME  Name to assign to the generated mailing.  
      SEND_HTML  Optional  If this element is present, value is true. Leave blank if you do not want to include the HTML body. 
      SEND_TEXT  Optional  If this element is present, value is true. Leave blank if you do not
    want to include the text body. 
      SUBJECT  Optional  If you do not include this element, Watson Campaign Automation uses the subject saved with the template. 
      FROM_NAME  Optional  If you do not include this element, Watson Campaign Automation uses the From Name saved with the template. 
      FROM_ADDRESS  Optional  If you do not include this element, Watson Campaign Automation uses the From Address saved with the template. 
    ¬† REPLY_TO¬† Optional¬† If you do not include this element, Watson Campaign Automation uses the Reply‚ÄźTo Address saved with the template.¬†
    ¬† VISIBILITY¬† Value indicating where to save the sent mailing. Values are: 0 ‚Äď Private Folder 1 ‚Äď Shared Folder ¬†
      SCHEDULED Value specifying the date and time when the mailing should be scheduled to send. The format must be: MM/DD/YYYY HH:MM:SS AMPM  
      PARENT_FOLDER_PATH Optional Folder where you want to store your sent mailing
      CREATE_PARENT_FOLDER Optional Create the folder if path does not already exist
      INBOX_MONITOR  Optional  If True, Watson Campaign Automation activates Inbox Monitoring for the mailing. 
      VMTA Optional

    If a VMTA is specified, Watson Campaign Automation will schedule the mailing using that VMTA, bypassing any defaults used by the mailing’s contact source.

    Note: You must use VMTA name and not the Friendly name when declaring this element.

    ¬† SEND_TIME_OPTIMIZATION¬† Optional¬† If specified, it is possible to send the mailing over a day or week. Valid values are: NONE ‚Äď will not use Send Time Optimization. SEND_24HRS ‚Äď will send the mailing over a 24 hour period based on each recipient‚Äôs optimal send time. SEND_WEEK‚Äď will send the mailing over a 7 day period based on each recipient‚Äôs optimal send time.
      WA_MAILINGLEVEL_CODE  Optional  This element is used in conjunction with Site Analytics Append String. If you have an append string that includes %%WA_MAILINGLEVEL_CODE%%, use the element to specify a mailing specific parameter to be passed via your links to your Site Analytics package. Note: This element is equivalent to the Mailing Specific Parameter box on the Send Mailing screen in Watson Campaign Automation when using Site Analytics.
      SUPPRESSION_LISTS  Optional  XML node containing one or more SUPPRESSION_LIST_ID child elements. 
    Optional Child Elements  SUPPRESSION_LIST_ID  If any suppression lists are specified, they will be utilized as the suppression lists when the mailing is sent.   
      SUBSTITUTIONS  Optional  XML node containing child element SUBSTITUTION 
    Optional Child
    Elements 
    SUBSTITUTION¬† XML nodes defining the substitution name and value. This feature allows template‚Äźlevel substitutions separate from the normal contact‚Äźlevel substitutions performed by personalization. They are not contact specific. They are also not related to HTML_GENERAL_DISCLAIMER or the TEXT_GENERAL_DISCLAIMER

    Note: If used, each node must have a NAME tag and a VALUE tag.

     
    ¬† Optional Child Element¬† NAME¬† The substitution tag used in the mailing template. This substitution name is case‚Äźsensitive. For example, if you include %%Sub_Value_1%% in the mailing template, the value for this child element is Sub_Value_1.¬†
        VALUE The value you would like to substitute into the mailing for the tag with the name given above
    Example 
    <Envelope>
    <Body>
    <ScheduleMailing>
    <TEMPLATE_ID>1000</TEMPLATE_ID>
    <LIST_ID>100</LIST_ID>
    <MAILING_NAME>New Mailing Name
    </MAILING_NAME>
    <SEND_HTML/>
    <SEND_TEXT/>
    <SUBJECT>New subject
    </SUBJECT>
    <FROM_NAME>Senders Name
    </FROM_NAME>
    <FROM_ADDRESS>sender@domain.com
    </FROM_ADDRESS>
    <REPLY_TO>sender@domain.com
    </REPLY_TO>
    <VISIBILITY>0</VISIBILITY>
    <PARENT_FOLDER_PATH>Sent Folder Name
    </PARENT_FOLDER_PATH>
    <CREATE_PARENT_FOLDER/>
    <SCHEDULED>10/13/2011 12:00:00 AM
    </SCHEDULED>
    <SUPPRESSION_LISTS>
    <SUPPRESSION_LIST_ID>37782
    </SUPPRESSION_LIST_ID>
    <SUPPRESSION_LIST_ID>37744
    </SUPPRESSION_LIST_ID>
    </SUPPRESSION_LISTS>
    <SUBSTITUTIONS>
    <SUBSTITUTION>
    <NAME>Sub_Value_1</NAME>
    <VALUE>The value to put in the mailing.
    </VALUE>
    </SUBSTITUTION>
    <SUBSTITUTION>
    <NAME>Sub_Value_2</NAME>
    <VALUE>Another value to add
    </VALUE>
    </SUBSTITUTION>
    </SUBSTITUTIONS>
    </ScheduleMailing>
    </Body>
    </Envelope>
       
    Response  <RESULT>     
    Elements  SUCCESS  True if successful.   
      MAILING_ID  If the request was successful, this element contains the ID for the sent mailing.   
    Example
    Success 
    <Envelope>
    <Body>
    <RESULT>
    <SUCCESS>TRUE</SUCCESS>
    <MAILING_ID>9700</MAILING_ID>
    </RESULT>
    </Body>
    </Envelope>
       
    Error Codes  100  You did not provide a required field.   
      108  The list ID does not exist.   
      145  User session is invalid or has expired.   
      181  Mailing ID provided does not exist.   
      182  Mailing name already exists.   
      183  Errors found when validating the mailing to send.   
      350  Permission denied for the provided list ID.   
      506  Permission denied for the provided template ID.   

Join The Discussion

Your email address will not be published. Required fields are marked *