Overview

Skill Level: Intermediate

Step-by-step

  1. Syntax of the request and response XML for ReplaceDCRuleset

    A ruleset cannot contain more than 1,000 rules.

    Operation  <ReplaceDCRuleset>   
    Elements  RULESET_ID  The ID of the Ruleset to replace. 
      CONTENT_AREAS  See AddDCRuleset for details. 
      RULES  See AddDCRuleset for details. 
    Example 
    <Envelope>
    <Body>
    <ReplaceDCRuleset>
    <RULESET_ID>8309</RULESET_ID>
    <CONTENT_AREAS>
    <CONTENT_AREAname="dc_mailing_subject"type="Subject">
    <DEFAULT_CONTENT
    name="Default.dc_mailing_subject">
    <![CDATA[All clothing on sale this week.]]>
    </DEFAULT_CONTENT>
    </CONTENT_AREA>
    <CONTENT_AREAname="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.]]>
    </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>
    <CONTENTname="subject"
    content_area="dc_mailing_subject">
    <![CDATA[Women's clothing on sale.]]>
    </CONTENT>
    <CONTENTname="promo" content_area="dc_promo">
    <![CDATA[10% Off All Women's Clothing]]>
    </CONTENT>
    </CONTENTS>
    </RULE>
    </RULES>
    </ReplaceDCRuleset>
    </Body>
    </Envelope>
     
    Response  <RESULT>   
    Elements  SUCCESS 

    “True” indicates successful rule creation.

    “False” indicates an error occurred and 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 *