Overview
Skill Level: Any
Prerequisites
This interface replaces an existing Ruleset with newly specified parameters.
Note: A ruleset cannot contain more than 1,000 rules.
Step-by-step
-
Syntax of the request and response SOAP for ReplaceDCRuleset
Operation <ReplaceDCRuleset> Elements RULESET_ID The ID of the Ruleset to replace. CONTENT_AREAS See AddDCRuleset for details. RULES See AddDCRuleset for details Example <soapenv:Envelope xmlns:soapenv=”http://schemas.xmlsoap.org/soap/envelope/”
xmlns:ses=”SilverpopApi:EngageService.SessionHeader”
xmlns:user=”SilverpopApi:EngageService.MailManagement.UserActions”>
<soapenv:Header>
<ses:sessionHeader>
<ses:sessionid>06395F3FA6D07365CBA5D01AF14F3F56</ses:sessionid>
</ses:sessionHeader>
</soapenv:Header>
<soapenv:Body>
<user:ReplaceDCRuleset>
<user:RULESET_ID>548403</user:RULESET_ID>
<user:CONTENT_AREAS>
<user:CONTENT_AREA type=”Body‐HTML” name=”MAILING BODY”>
<user:DEFAULT_CONTENT name=”Default.MAILING
BODY”><![CDATA[<p>This is the REVISED content for people whose Locale is unknown….</p><p><img
src=”http://domain.com/images/question_mark.jpg” name=”question.jpg” spname=”question.jpg” alt=””
width=”97″ border=”0″ height=”145″></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><![CDATA[=]]></user:OPERATORS>
<user:VALUES><![CDATA[US
ENGLISH]]></user:VALUES>
<user:RIGHT_PARENS/>
</user:EXPRESSION>
</user:CRITERIA>
<user:CONTENTS>
<user:CONTENT content_area=”MAILING BODY”
name=”US_ENGLISH.MAILING BODY”><![CDATA[<p>This is the REVISED US English
Newsletter.</p><p><img style=”border: 1px solid ;” src=”http://domain.com/images/us_flag.jpg”
name=”usa.jpg” spname=”usa.jpg” alt=”” width=”127″ height=”90″></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><![CDATA[=]]></user:OPERATORS>
<user:VALUES><![CDATA[UK
ENGLISH]]></user:VALUES>
<user:RIGHT_PARENS/>
</user:EXPRESSION>
</user:CRITERIA>
<user:CONTENTS>
<user:CONTENT content_area=”MAILING BODY”
name=”UK_ENGLISH.MAILING BODY”><![CDATA[<p>This is the REVISED UK English
Content.</p><p><img src=”http://domain.com/images/uk_flag.jpg” spname=”ukflag.jpg” alt=”” width=”143″
border=”0″ height=”107″></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><![CDATA[=]]></user:OPERATORS>
<user:VALUES><![CDATA[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 REVISED 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:ReplaceDCRuleset>
</soapenv:Body>
</soapenv: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:Envelope xmlns=”SilverpopApi:EngageService.MailManagement.UserActions”
xmlns:envelope=”http://schemas.xmlsoap.org/soap/envelope/”>
<envelope:Header/>
<envelope:Body>
<RESULT>
<SUCCESS>TRUE</SUCCESS>
<RULESET_ID>548403</RULESET_ID>
</RESULT>
</envelope:Body>
</envelope:Envelope>