Overview

Skill Level: Any

Prerequisites

The Watson Campaign Automation user account that calls the API must have Organization Administration rights.

Step-by-step

  1. Syntax of the request and response XML for GetSentMailingsForOrg

    Operation

    <GetSentMailingsForOrg>

    Elements

    DATE_START

    Required Starting Date in the format “mm/dd/yyyy hh:mm:ss”

     

    DATE_END

    Required Ending Date in the format “mm/dd/yyyy hh:mm:ss”

     

    PRIVATE

    Optional parameter to retrieve private mailings. If the API does not receive a Private or Shared parameter, the Acoustic Campaignreturns both private and shared mailings.

     

    SHARED

    Optional parameter to retrieve shared mailings.

     

    SCHEDULED

    Optional Mailing Type parameter to retrieve scheduled mailings. If the API does not receive a mailing type, the Acoustic Campaign returns mailings of all types. The Acoustic Campaign uses the various mailing type parameters to limit the list to only the specified types.

     

    SENT

    Optional Mailing Type parameter to retrieve sent mailings.

     

    SENDING

    Optional Mailing Type parameter to retrieve mailings that are sending. The SCHEDULED parameter includes mailings in SENDING status.

    Elements

    OPTIN_CONFIRMATION

    Optional Mailing Type parameter to retrieve Opt-In Autoresponder mailings.

     

    PROFILE_CONFIRMATION

    Optional Mailing Type parameter to retrieve Edit Profile Autoresponder mailings.

     

    AUTOMATED

    Optional Mailing Type parameter to retrieve Custom Autoresponder mailings.

     

    CAMPAIGN_ACTIVE

    Optional Mailing Type parameter to retrieve active Automated Messages (including Programs Messages).

     

    CAMPAIGN_COMPLETED

    Optional Mailing Type parameter to retrieve completed Groups of Automated Messages.

     

    CAMPAIGN_CANCELLED

    Optional Mailing Type parameter to retrieve canceled Groups of Automated Messages.

     

    CAMPAIGN_SCRAPE_TEMPLATE

    Optional Mailing Type parameter to retrieve mailings that use content retrieval.

     

    INCLUDE_TAGS

    Optional parameter to return all Tags that are associated with the Sent mailing.

     

    EXCLUDE_ZERO_SENT

    Optional parameter to exclude mailings with no contacts.

     

    MAILING_COUNT_ONLY

    Optional parameter to return only the count of sent mailings for a specific date range.

     

    EXCLUDE_TEST_MAILINGS

    Optional parameter that requests to exclude Test Mailings. If you do not provide this element, the Acoustic Campaign includes all Test Mailings.

             
    Example
    <Envelope>
      <Body>
        <GetSentMailingsForOrg>
          <PRIVATE/>
          <SENT/>
          <DATE_START>07/25/201100:00:00</DATE_START>
          <DATE_END>09/30/201123:59:59</DATE_END>
        </GetSentMailingsForOrg>
      </Body>
    </Envelope>
    

    Response

    <RESULT>

    Elements

    SUCCESS

    True if successful.

     

    Mailing

    XML nodes that define the instances of each mailing.

      Child Element MailingId Returns the mailing ID.
        ParentTemplateId Returns the parent mailing ID for the mailing
       

    ReportId

    Returns the report ID for an instance of an automated mailing.

       

    ScheduledTS

    Returns the scheduled date and time in the format, “mm/dd/yy hh:mm AMPM”

       

    MailingName

    Returns the mailing name.

       

    ListName

    Returns the database name.

       

    ListId

    Returns the ID of the database, Query ID, or Contact List that the mailing was sent to.

       

    ParentListId

    Returns the ID of the parent database when the mailing was sent to a Query or Contact List. If the mailing was not sent to a Query or Contact List, this element is not included.

       

    UserName

    Returns the mailing owner’s user name.

       

    SentTS

    Returns the date and time theAcoustic Campaignsent the mailing.

       

    NumSent

    Returns the number of contacts to whom theAcoustic Campaignsent a mailing.

       

    SentMailingsCount

    Returns the number of sent mailings.

       

    Subject

    Returns the mailing subject.

       

    Visibility

    Returns visibility information about the mailing. Values are Private or Shared.

       

    Tags

    If INCLUDE_TAGS is specified in the request, return any tags that are associated with the Sent mailing.

          Tag

    XML nodes that contain the Tags that are associated with the Sent mailing.

    Example 1 with standard usage
    <Envelope>
      <Body>
        <RESULT>
          <SUCCESS>TRUE</SUCCESS>
          <Mailing>
            <MailingId>5758</MailingId>
            <ReportId>109118</ReportId>
            <ScheduledTS>2011-06-14 10:54:06.0</ScheduledTS>
            <MailingName>
              <![CDATA[This is the mailingname]]>
            </MailingName>
            <ListName>
              <![CDATA[This is the databasename]]>
            </ListName>
            <ListId>4615</ListId>
            <UserName> John Doe </UserName>
            <SentTS/>
            <NumSent>0</NumSent>
            <Subject>
              <![CDATA[SummerSale]]>
            </Subject>
            <Visibility>Private</Visibility>
          </Mailing>
          <Mailing>
            <MailingId>5758</MailingId>
            <ReportId>109118</ReportId>
            <ScheduledTS>2011-06-14 10:54:06.0</ScheduledTS>
            <MailingName>
              <![CDATA[MyMailing2]]>
            </MailingName>
            <ListName>
              <![CDATA[This is the databasename 2]]>
            </ListName>
            <ListId>4616</ListId>
            <UserName>John Doe</UserName>
            <SentTS/>
            <NumSent>0</NumSent>
            <Subject>
              <![CDATA[SummerSale]]>
            </Subject>
            <Visibility>Private</Visibility>
          </Mailing>
        </RESULT>
      </Body>
    </Envelope>
    
    Example 2 when MAILING_COUNT_ONLY parameter is used.
    <Envelope>
      <Body>
        <RESULT>
          <SUCCESS>TRUE</SUCCESS>
          <SentMailingsCount>5758</SentMailingsCount>
        </RESULT>
      </Body>
    </Envelope>
    

1 comment on"Get a list of sent mailings for an org"

  1. I’m attempting to load this report into a marketing data warehouse but cannot find two fields that exist in the sample report which expresses the requirements:
    Contact Source
    Subscribes

    Any help you can provide in locating these fields is greatly appreciated!

Join The Discussion

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