Create a ruleset - AddDCRuleset

Create a dynamic content ruleset including its content areas, rules, and content.

Elements (Required)

LIST_ID - The associated database ID

RULESET_NAME - The dynamic content ruleset name

Elements (Optional)

MAILING_ID - Associates a ruleset directly to a email. This does not place a copy of the ruleset in the asset library.

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 email body.

CONTENT_AREA - A child element of CONTENT_AREAS, included if content is defined by the name or type attributes. The name attribute is the name of the content area being defined. The type attribute is the type of content area defined as Body_HTML, Body-Text, Subject, From, or From-Name. You may create a ruleset and associated rules in the asset library without related content areas.

DEFAULT_CONTENT - A child element of CONTENT_AREA that shows if there is no matching rule. For HTML content, this must be CDATA. It also has the name attribute to define the name of the default Content Block.

The following elements are children of RULES > RULE

RULE_NAME - The name of the dynamic content rule

PRIORITY - The priority of this rule vs other rules defined with a unique number. Priority is determined in ascending order with '1' being the highest.

CRITERIA and EXPRESSION house the following child elements: AND_OR, LEFT_PARENS, TYPE, COLUMN_NAME, OPERATORS, VALUES, RIGHT_PARENS.

AND_OR - Denotes AND or OR when defining relationships between expressions.

LEFT_PARENS - Denotes a left parenthesis character when defining relationships between expressions

TYPE - The type of expression: NE (numeric), DE (date/time), or TE (text)

COLUMN_NAME - The name of the database field being evaluated

OPERATORS - The operator for comparison: !=, <, =, IS NOT null, IS null, LIKE, NOT like, IN, NOT in, and BETWEEN

VALUES - The value being compared to the Acoustic Campaign database field. This could be text, numeric, date value, a list of values, or the name of a column. If specifying a column, surround with brackets [ ]. If specifying a list of values, use the pipe character | to separate values in the list.

RIGHT_PARENS - Denotes a right parenthesis character when defining relationships between expressions.

The following element is a child of CONTENTS

CONTENT - The content that shows for contacts matching the criteria of this rule defined by the attributes content-area and Name. The content_area attribute is the previously defined content area where the content will be placed in the email body. The Name attribute is simply the name of the content block being defined. For HTML content, this must be CDATA.

<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>
<Envelope>
<Body>
<RESULT>
<SUCCESS>TRUE</SUCCESS>
<RULESET_ID>28217</RULESET_ID>
</RESULT>
</Body>
</Envelope>

Elements (Results)

SUCCESS - True if successful; False if not. An error code displays with a message reporting the issue at a failure.

RULESET_ID - Contains the new ruleset ID