Overview

Skill Level: Intermediate

Step-by-step

  1. Syntax of the request and response XML 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’
    ‘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_PARENS  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.
              OPERATORS 

    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 data basefield. 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_PARENS 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 <Envelope>
    <Body>
    <AddDCRuleset>
    <RULESET_NAME>PromoByGender</RULESET_NAME>
    <LIST_ID>22205</LIST_ID>
    <MAILING_ID>41781</MAILING_ID>
    <CONTENT_AREAS>
    <CONTENT_AREA name=”dc_mailing_subject” type=”Subject”>
    <DEFAULT_CONTENTname=”Default.dc_mailing_subject”>
    <![CDATA[All clothing on sale this week.]]>
    </DEFAULT_CONTENT>
    </CONTENT_AREA>
    <CONTENT_AREA name=”dc_promo” type=”Body-HTML”>
    <DEFAULT_CONTENTname=”Default.dc_promo”>
    <![CDATA[10% Off Everything]]></DEFAULT_CONTENT>
    </CONTENT_AREA>
    </CONTENT_AREAS>
    <RULES>
    <RULE>
    <RULE_NAME>MalePromotion</RULE_NAME>
    <PRIORITY>1</PRIORITY>
    <CRITERIA>
    <EXPRESSION>
    <AND_OR/>
    <LEFT_PARENS>(</LEFT_PARENS>
    <TYPE>TE</TYPE>
    <COLUMN_NAME>Gender</COLUMN_NAME>
    <OPERATORS><![CDATA[=]]></OPERATORS>
    <VALUES><![CDATA[M]]></VALUES>
    <RIGHT_PARENS>)</RIGHT_PARENS>
    </EXPRESSION>
    <EXPRESSION>
    <AND_OR>AND</AND_OR>
    <LEFT_PARENS>(</LEFT_PARENS>
    <TYPE>NE</TYPE>
    <COLUMN_NAME>Salary</COLUMN_NAME>
    <OPERATORS><![CDATA[>]]></OPERATORS>
    <VALUES><![CDATA[90000]]></VALUES>
    <RIGHT_PARENS>)</RIGHT_PARENS>
    </EXPRESSION>
    </CRITERIA>
    <CONTENTS>
    <CONTENTname=”subject” content_area=”dc_mailing_subject”>
    <![CDATA[Men’s clothing on sale this week.]]>
    </CONTENT>
    <CONTENTname=”promo” content_area=”dc_promo”>
    <![CDATA[10% Off All Men’s Clothing]]>
    </CONTENT>
    </CONTENTS>
    </RULE>
    <RULE>
    <RULE_NAME>FemalePromotion</RULE_NAME>
    <PRIORITY>2</PRIORITY>
    <CRITERIA>
    <EXPRESSION>
    <AND_OR/>
    <LEFT_PARENS>(</LEFT_PARENS>
    <TYPE>TE</TYPE>
    <COLUMN_NAME>Gender</COLUMN_NAME>
    <OPERATORS><![CDATA[=]]></OPERATORS>
    <VALUES><![CDATA[F]]></VALUES>
    <RIGHT_PARENS>)</RIGHT_PARENS>
    </EXPRESSION>
    <EXPRESSION>
    <AND_OR>AND</AND_OR>
    <LEFT_PARENS>(</LEFT_PARENS>
    <TYPE>NE</TYPE>
    <COLUMN_NAME>Salary</COLUMN_NAME>
    <OPERATORS><![CDATA[>]]></OPERATORS>
    <VALUES><![CDATA[90000]]></VALUES>
    <RIGHT_PARENS>)</RIGHT_PARENS>
    </EXPRESSION>
    </CRITERIA>
    <CONTENTS>
    <CONTENT name=”subject” content_area=”dc_mailing_subject”>
    <![CDATA[Women’s clothing on sale this week.]]>
    </CONTENT>
    <CONTENTname=”promo” content_area=”dc_promo”>
    <![CDATA[10% Off All Women’s Clothing]]>
    </CONTENT>
    </CONTENTS>
    </RULE>
    </RULES>
    </AddDCRuleset>
    </Body>
    </Envelope>
             
    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>
    <Body>
    <RESULT>
    <SUCCESS>TRUE</SUCCESS>
    <RULESET_ID>28217</RULESET_ID>
    </RESULT>
    </Body>
    </Envelope>   
             

Join The Discussion

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