Import a dynamic content ruleset - ImportDCRuleset

Imports a .zip containing the XML file defining a Campaign dynamic content ruleset and any associated HTML or images.

📘

Notes

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.

A ruleset may contain no more than 1,000 rules.

Elements (Required)

FILE_NAME - The name of the .zip file located in your FTP upload directory.

LIST_ID - The ID of the associated database.

Elements (Optional)

MAILING_ID - Associates a ruleset directly to an email. This will NOT place a copy of the ruleset in the Asset Library.

RULESET_ID - Specifies an existing ruleset to use.

<Envelope>
   <Body>
      <ImportDCRuleset>
         <FILE_NAME>promo.zip</FILE_NAME>
         <MAILING_ID>41781</MAILING_ID>
         <LIST_ID>22205</LIST_ID>
      </ImportDCRuleset>
   </Body>
</Envelope>
<Envelope>
   <Body>
      <RESULT>
         <SUCCESS>TRUE</SUCCESS>
         <JOB_ID>28216</JOB_ID>
      </RESULT>
   </Body>
</Envelope>

Elements (Results)

SUCCESS - True if successful; False if not.

JOB_ID - Contains the data job ID for the import.

.zip File format

RULESET - Top-level node containing all the children of the file; direct children are RULESET_NAME and RULES.

RULESET_NAME - Optional The name of the dynamic content ruleset if creating a new ruleset with import.

CONTENT_AREAS - Defines the default content when a user falls outside of all existing rule criteria.
CONTENT_AREA - Optional A child of CONTENT_AREAS. Included if content is being defined. It is possible to create a ruleset and associated rules in the Asset Library without related content areas.
name - An attribute of CONTENT_AREA. The name of the content area being defined.
type - An attribute of CONTENT_AREA. The type of content area. Valid values include:

  • ‘Body‐HTML’
  • ‘Body‐Text’
  • ‘Body‐AOL’
  • ‘Subject’
  • ‘From’
  • ‘From‐Name’
    DEFAULT_CONTENT - A child of CONTENT_AREA. The content that displays if there is no matching rule. Must be set to CDATA for HTML content.
    name - An attribute of DEFAULT_CONTENT. The name of the content block being defined.

RULES - XML node containing RULE and its children.

RULE - Contains RULE_NAME, PRIORITY, CRITERIA, and CONTENTS as children.

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 - Contains the element EXPRESSION and its children.
EXPRESSION -
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. Valid values are:

  • NE -Numeric
  • DE – Date/Time
  • TE – Text
    COLUMN_NAME - The name of the database field to evaluate.
    OPERATORS - The operator used for comparison. Valid values are:
  • !=
  • <
  • =
  • IS NOT null
  • IS null
  • LIKE
  • NOT like
  • IN
  • NOT in
  • BETWEEN
    VALUES - The value to compare to the Campaign 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, [My Text Column]. If specifying a list of values, use a | (pipe character) to separate values in the list.
    RIGHT_PARENS - Denotes a right parenthesis character when defining relationships between expressions.

CONTENTS - Contains the element CONTENT and its attributes.
CONTENT - Optional The content that will show for contacts matching the criteria of this rule. For HTML content, this must be CDATA.
content_area - An attribute of CONTENT. The previously defined content area where the content is placed in the email body.
name - The name of the content block to define.

<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>