Campaign View API

The Campaign View API returns an XML "view" of the specified T&T campaign.

Create the Base URL

For example:
https://testandtarget.omniture.com/api?client=user&company=corp1&email=user@corp1.com&password=pword
Parameter Description
client (Optional) The T&T client code. You must provide a value for either the client parameter or the company parameter to perform the operation.
company (Optional) The Online Marketing Suite company ID. You must provide a value for either the client parameter or the company parameter to perform the operation.
email (Required) The Email address associated with the T&T client.
password (Required) The T&T client password.

Parameters and values are case sensitive.

Add the Query Parameters

For each operation add the parameters and values necessary to copy the T&T campaign. For example:
https://testandtarget.omniture.com/api?client=user1&company=corp1&email=user1@acme.com&password=pword&operation=viewCampaign&id=intID995&thirdPartyId=extID501
Parameter Description
operation (Required) Identifies the type of T&T action to execute. To change a T&T campaign state, this value is always viewCampaign.
id (Optional) The campaign ID of the campaign you want to view. You must provide either id or thirdPartyId.
thirdpartyId (Optional) The third-party identifier associated with the campaign you want to modify. You must provide either id or thirdPartyId
If T&T locates a campaign with the specified id or thirdPartyId it returns XML that describes the campaign (see Sample Campaign View XML). Otherwise, it returns one of the following error messages:
 Authentication error code: 401
Invalid request code: 400

Inspect the Query Response

<campaign>
  <id>NNNN</id>
  <thirdPartyId>third party id</thirdPartyId> //if supplied by client.
  <name>Campaign Name</name>
  <state>approved|paused|deactivated|saved|deleted</state>
  <enabled>true|false</enabled>  //only 'approved' and 'paused' have enabled = true.
  <startDate>YYYY-mm-DDTMM:HH:SS</startDate>
  <endDate>YYYY-mm-DDTMM:HH:SS</endtDate>
  <displayLocations>
    <location>
      <targetExpression>
        <targetMbox>
          <name>mboxName</name>
        </targetMbox>
        <targetParameter>
          <type>url</type>
          <name>ad</type>
          <matcher>equalsIgnoreCase</matcher>
          <values>
            <value>A</value>
            <value>B</value>
          </values>
        </targetParameter>
        <targetUnknown/>  (for currently unsupported targets)
      </targetExpression>
    </location>
    <location>
      <targetExpression>
        <targetMbox><name>homePageHero</name></targetMbox>
        <targetParameter>
          <type>mbox</type>
          <name>age</name>
          <matcher>equals</matcher>
          <values>
            <value>33</value>
          </values>
        </targetParameter>
      </targetExpression>
    </location>
  </displayLocations>
  <branches>
    <branch>
      <id>NNNN</id>  (recipe model ID - doesn't change even on client migration)
      <name>branch name</name>
      <description>branch description</description>
      <targets>recipe targeting - same type as targets from displayTargets</targets>
      <offers>
        <displayLocation location="/campaign/displayLocations/location[1]">
          <offerHTML> (for anonymous offers)
            <html>...</html>
          </offerHTML>
        </displayLocation>
        <displayLocation location="/campaign/displayLocations/location[2]">
          <offerNamed>
          <id>ID</id>
          <name>offer name</name>
          <offerRedirect>
            <url>http://client.com/page.html</url>
          </offerRedirect>
        </displayLocation>
        <displayLocation location="/campaign/displayLocations/location[3]">
          <offerDefault/>
        </displayLocation>
      </offers>
    </branch>
    <branch>
      ...
    </branch>
  </branches>
</campaign>

Supported Targets

mbox name:
<targetMbox><name>mboxName</name></targetMbox>
mbox and URL parameter targeting:
<targetParameter>
   <type>url | mbox</type>
   <name>parameter name</name>
   <matcher>equals | equalsIgnoreCase|etc</matcher>
   <values>
      <value>value1</value>
      <value>value2</value>
      ....
   </values>
</targetParameter>
Branch percent constraint:
<targetPercent>
   <percent>95.5</percen>
</targetPercent>

Supported Offers

Anonymous HTML offers:
<offerHTML>
   <html>offer content</html>
</offerHTML>
Anonymous redirect offers:
<offerRedirect>
   <url>http://mysite.com/page.html</url>
</offerRedirect>
Default content: <offerDefault/> Currently unsupported offers:
<offerUnknown>
   <id>ID</id>
</offerUnknown>
Non-anonymous offers:
<offerNamed>
   <id>ID</id>
   <name>offer name</name>
</offerNamed>

Comments (0)

Must be logged in to comment. or register now to comment!