Overview

Skill Level: Any

Prerequisites

This interface creates a Ruleset including its content areas, rules, and content. If user does not specify a MAILING_ID, Watson Campaign Automation will create a new Ruleset in the user’s Private folder of the Asset Library. Note: A ruleset may contain no more than 1,000 rules.

Step-by-step

  1. Syntax of the request and response SOAP for AddDCRuleset

    Operation <AddDCRuleset>          
    Elements LIST_ID The ID of the associated database.        
      RULESET_NAME The name of the DC Ruleset.        
      MAILING_ID Optional Associates a Ruleset directly to a mailing. This will NOT place a copy of the Ruleset in the asset library.      
    Child Element CONTENT_AREAS The content area defines default content used when a user falls outside of all existing rule criteria as well as additional content areas in the mailing body.        
      Child Element CONTENT_AREA Optional Included if content being defined. It is possible to create a
    Ruleset and associated rules in the asset library without
    related content areas.
       
        Attribute name The Name of the Content Area being defined.    
          type The type of Content Area. The following values are valid:
    ‘Body‐HTML’
    ‘Body‐Text’
    ‘Body‐AOL’
    ‘Subject’
    ‘From’
    ‘From‐Name’
       
        Child Element DEFAULT_CONTENT This is the content that will show if there is no matching
    rule. For HTML content, this must be CDATA.
       
          Attribute name The name of the default Content Block  
    Child
    Element
    RULES          
      Child Element RULE        
        Child Element RULE_NAME The Name of the Dynamic Content Rule.    
          PRIORITY The priority of this rule vs. other rules. Number must be
    unique. Priority is determined in ascending order with ‘1’
    being the highest.
       
          CRITERIA      
          Child Element EXPRESSION    
            Child Element AND_OR Used to denote ‘AND’ or ‘OR’
    when defining relationships
    between expressions.
              LEFT_PAR
    ENS
    Used to denote a left
    parenthesis character when
    defining relationships between
    expressions.
              TYPE The type of expression. Valid
    values are:
    ‘NE’ – Numeric
    ‘DE’ – Date/Time
    ‘TE’ – Text
              COLUMN_
    NAME
    The name of the database
    field being evaluated.
              OPERATO
    RS
    The operator used for
    comparison. Valid values are:
    ‘!=’
    ‘<‘
    ‘>’
    ‘=’
    ‘IS NOT null’
    ‘IS null’
    ‘LIKE’
    ‘NOT like’
    ‘IN’
    ‘NOT in’
    ‘BETWEEN’
              VALUES The value being compared to
    the Watson Campaign Automation database field.
    Could be text, numeric, or
    date value OR a list of values
    or the name of a Column. If
    specifying a Column, surround
    with square brackets. For
    example, [My Text Column]. If
    specifying a list of values, use |
    (pipe character) to separate
    values in the list.
              RIGHT_PA
    RENS
    Used to denote a right
    parenthesis character when
    defining relationships between
    expressions.
          CONTENTS      
          Child Element CONTENT Optional This is the content that will show for contacts
    matching the criteria of this rule. For HTML
    content, this must be
    CDATA.
            Attribute content_area The previously defined
    Content Area where the content will be placed in
    the mailing body.
              name The name of the Content
    Block being defined.
    Example <soapenv:Envelope xmlns:ses=”SilverpopApi:EngageService.SessionHeader”
    xmlns:soapenv=”http://schemas.xmlsoap.org/soap/envelope/”
    xmlns:user=”SilverpopApi:EngageService.MailManagement.UserActions”>
    <soapenv:Header>
    <ses:sessionHeader>
    <ses:sessionid>06395F3FA6D07365CBA5D01AF14F3F56</ses:sessionid>
    </ses:sessionHeader>
    </soapenv:Header>
    <soapenv:Body>
    <user:AddDCRuleset>
    <user:LIST_ID>24872</user:LIST_ID>
    <user:MAILING_ID>1866986</user:MAILING_ID>
    <user:RULESET_NAME>Locale Body Ruleset V3</user:RULESET_NAME>
    <user:CONTENT_AREAS>
    <user:CONTENT_AREA type=”Body‐HTML” name=”MAILING BODY”>
    <user:DEFAULT_CONTENT name=”Default.MAILING
    BODY”>&lt;p>This is the content for people whose Locale is unknown….&lt;/p>&lt;p>&lt;img
    src=”http://domain.com/images/question_mark.jpg” name=”question.jpg” spname=”question.jpg” alt=””
    width=”97″ border=”0″ height=”145″>&lt;/p></user:DEFAULT_CONTENT>
    </user:CONTENT_AREA>
    </user:CONTENT_AREAS>
    <user:RULES>
    <user:RULE>
    <user:RULE_NAME>US ENGLISH</user:RULE_NAME>
    <user:PRIORITY>1</user:PRIORITY>
    <user:CRITERIA>
    <user:EXPRESSION>
    <user:AND_OR/>
    <user:LEFT_PARENS/>
    <user:TYPE>TE</user:TYPE>
    <user:COLUMN_NAME>Locale</user:COLUMN_NAME>
    <user:OPERATORS>=</user:OPERATORS>
    <user:VALUES>US ENGLISH</user:VALUES>
    <user:RIGHT_PARENS/>
    </user:EXPRESSION>
    </user:CRITERIA>
    <user:CONTENTS>
    <user:CONTENT content_area=”MAILING BODY”
    name=”US_ENGLISH.MAILING BODY”>&lt;p>This is the US English Newsletter.&lt;/p>&lt;p>&lt;img
    style=”border: 1px solid ;” src=”http://domain.com/images/us_flag.jpg” name=”usa.jpg” spname=”usa.jpg”
    alt=”” width=”127″ height=”90″>&lt;/p></user:CONTENT>
    </user:CONTENTS>
    </user:RULE>
    <user:RULE>
    <user:RULE_NAME>UK_ENGLISH</user:RULE_NAME>
    <user:PRIORITY>2</user:PRIORITY>
    <user:CRITERIA>
    <user:EXPRESSION>
    <user:AND_OR/>
    <user:LEFT_PARENS/>
    <user:TYPE>TE</user:TYPE>
    <user:COLUMN_NAME>Locale</user:COLUMN_NAME>
    <user:OPERATORS>=</user:OPERATORS>
    <user:VALUES>UK ENGLISH</user:VALUES>
    <user:RIGHT_PARENS/>
    </user:EXPRESSION>
    </user:CRITERIA>
    <user:CONTENTS>
    <user:CONTENT content_area=”MAILING BODY”
    name=”UK_ENGLISH.MAILING BODY”>&lt;p>This is the UK English Content.&lt;/p>&lt;p>&lt;img
    src=”http://domain.com/images/uk_flag.jpg” spname=”ukflag.jpg” alt=”” width=”143″ border=”0″
    height=”107″>&lt;/p></user:CONTENT>
    </user:CONTENTS>
    </user:RULE>
    <user:RULE>
    <user:RULE_NAME>CAN_FRENCH</user:RULE_NAME>
    <user:PRIORITY>3</user:PRIORITY>
    <user:CRITERIA>
    <user:EXPRESSION>
    <user:AND_OR/>
    <user:LEFT_PARENS/>
    <user:TYPE>TE</user:TYPE>
    <user:COLUMN_NAME>Locale</user:COLUMN_NAME>
    <user:OPERATORS>=</user:OPERATORS>
    <user:VALUES>CAN FRENCH</user:VALUES>
    <user:RIGHT_PARENS/>
    </user:EXPRESSION>
    </user:CRITERIA>
    <user:CONTENTS>
    <user:CONTENT content_area=”MAILING BODY”
    name=”CAN_FRENCH.MAILING BODY”><![CDATA[
    <p>This is the French Canadian content.</p><p><img style=”border: 1px solid ;”
    src=”http://domain.com/images/can_french.jpg” name=”can.jpg” spname=”can.jpg” alt=”” width=”141″
    height=”106″></a></p>
    ]]></user:CONTENT>
    </user:CONTENTS>
    </user:RULE>
    </user:RULES>
    </user:AddDCRuleset>
    </soapenv:Body>
    </soapenv:Envelope>
             
    Response <RESULT>          
    Elements SUCCESS “True” indicates the rule creation was successful.
    “False” indicates an error occurred in which the error code displays with a
    message reporting the issue.
           
      RULESET_ID Contains the new Ruleset ID.        
    Example <envelope:Envelope xmlns=”SilverpopApi:EngageService.MailManagement.UserActions”
    xmlns:envelope=”http://schemas.xmlsoap.org/soap/envelope/”>
    <envelope:Header/>
    <envelope:Body>
    <RESULT>
    <SUCCESS>TRUE</SUCCESS>
    <RULESET_ID>576602</RULESET_ID>
    </RESULT>
    </envelope:Body>
    </envelope:Envelope>
             

Join The Discussion

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