Overview

Skill Level: Intermediate

Step-by-step

  1. Syntax of the request and response XML for GetDCRuleset

    Operation <GetDCRuleset>    
    Elements RULESET_ID The ID of the ruleset to retrieve.  
    Example <Envelope>
    <Body>
    <GetDCRuleset>
    <RULESET_ID>123456789</RULESET_ID>
    </GetDCRuleset>
    </Body>
    </Envelope>
       
    Response <RESULT>    
    Elements SUCCESS

    “True” indicates a successful “Get Ruleset” call.

    “False” indicates an error occurred in which the error code displays with a message reporting the issue.

     
      RULESET    
      Child Elements RULESET_ID The ID of the requested Ruleset. 
        RULESET_NAME The name of the Ruleset. 
        CONTENT_AREAS See AddDCRuleset for details.
        RULES See AddDCRuleset for details.
    Example <Envelope>
    <Body>
    <RESULT>
    <SUCCESS>TRUE</SUCCESS>
    <RULESET>
    <RULESET_ID>42579</RULESET_ID>
    <RULESET_NAME>PromoByGender</RULESET_NAME>
    <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_CONTENT
    name=”Default.dc_promo”>
    <![CDATA[10%OffEverything]]>
    </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>
    <COLUMN_NAME>Salary</COLUMN_NAME>
    <OPERATORS><![CDATA[>]]></OPERATORS>
    <VALUES><![CDATA[90000]]></VALUES>
    <RIGHT_PARENS>)</RIGHT_PARENS>
    <VALUES><![CDATA[M]]></VALUES>
    <RIGHT_PARENS>)</RIGHT_PARENS>
    </EXPRESSION>
    <EXPRESSION>
    <AND_OR>AND</AND_OR>
    <LEFT_PARENS>(</LEFT_PARENS>
    <TYPE>NE</TYPE>
    </EXPRESSION>
    </CRITERIA>
    <CONTENTS>
    <CONTENTname=”promo” content_area=”dc_promo”>
    <![CDATA[10% Off All Men’s Clothing]]>
    </CONTENT>
    <CONTENTname=
    “subject” content_area=”dc_mailing_subject”>
    <![CDATA[Men’s clothing on sale thisweek.]]>
    </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=”promo” content_area=”dc_promo”>
    <![CDATA[10% Off All Women’s Clothing]]>
    </CONTENT>
    <CONTENTname=
    “subject” content_area=”dc_mailing_subject”>
    <![CDATA[Women’s clothing on salethis week.]]>
    </CONTENT>
    </CONTENTS>
    </RULE>
    </RULES>
    </RULESET>
    </RESULT>
    </Body>
    </Envelope>
       

Join The Discussion

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