Overview
Skill Level: Intermediate
Step-by-step
-
Syntax of the request and response XML for ImportDCRuleset
Imported files are loaded from the user’s FTP upload directory.
If the user does not specify a MAILING_ID or RULESET_ID, Engage creates a new Ruleset in the user’s Private folder of the Asset Library. If the user does specify a RULESET_ID, Engage replaces the Ruleset.
Note: A ruleset may contain no more than 1,000 rules.
Operation <ImportDCRuleset> Elements FILE_NAME The name of the .zip file located in the user’s FTP upload directory. LIST_ID The ID of the associated database. MAILING_ID Optional Associates a Ruleset directly to a mailing. This will NOT place a copy of the Ruleset in the Asset Library. RULESET_ID Optional Specifies an existing Ruleset to use in place of imported content. Example <Envelope>
<Body>
<ImportDCRuleset>
<FILE_NAME>promo.zip</FILE_NAME>
<MAILING_ID>41781</MAILING_ID>
<LIST_ID>22205</LIST_ID>
</ImportDCRuleset>
</Body>
</Envelope>Response <RESULT> Elements SUCCESS “True” indicates successful Data Job submission. “False” indicates an error occurred in which the error code displayed with a message reporting the issue. JOB_ID Contains the Data Job ID for the import. Example <Envelope>
<Body>
<RESULT>
<SUCCESS>TRUE</SUCCESS>
<JOB_ID>28216</JOB_ID>
</RESULT>
</Body>
</Envelope>The following table describes the .zip file format.
RULESET Child Element RULESET_NAME Optional The name of the DC Ruleset if creating a new Ruleset using Import. CONTENT_AREAS The content area defines default content used when a user falls outside of all
existing rule criteria.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’
‘Body‐AOL’
‘Subject’
‘From’
‘From‐Name’Child Element DEFAULT_CONTENT Content that displays if there is no matching rule. Must be set to CDATA for HTML content. Attribute name The name of the Content Block being
defined.Child Element RULES Child Element RULE Child Element RULE_NAME The name of the Dynamic Content Rule. PRIORITY The priority of the 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’ – TextCOLUMN_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 database field. Can 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 <RULESET>
<RULESET_NAME>Promo By Gender
</RULESET_NAME>
<CONTENT_AREAS>
<CONTENT_AREA
name="dc_mailing_subject" type="Subject">
<DEFAULT_CONTENT
name="Default.dc_mailing_subject">
<![CDATA[All
clothing on sale this week.]]>
</DEFAULT_CONTENT>
</CONTENT_AREA>
<CONTENT_AREA
name="dc_promo" type="Body‐HTML">
<DEFAULT_CONTENT
name="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>
<CONTENT name="male_subject"
content_area="dc_mailing_subject">
<![CDATA[Men's clothing on sale this week.]]>
</CONTENT>
<CONTENT name="male_promo"
content_area="dc_promo">
<![CDATA[20% Off All Men's Clothing]]>
</CONTENT>
</CONTENTS>
</RULE>
<RULE>
<RULE_NAME>Female Promotion</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="female_promo"
content_area="dc_promo">
<![CDATA[20% Off All Women's Clothing]]>
</CONTENT>
<CONTENT name="female_subject"
content_area="dc_mailing_subject">
<![CDATA[Women's clothing on sale this week.]]>
</CONTENT>
</CONTENTS>
</RULE>
</RULES>
</RULESET>