Salesforce

How do I write a condition set in Portal or Group Assignment?

« Go Back

Description

 
TitleHow do I write a condition set in Portal or Group Assignment?
Description
This article applies ONLY to writing condition sets in Portal and Group Assignment. For information on writing condition sets for Email, see: How do I write a condition set in Email?


The TargetX Portal and Group Assignment tools are all designed with the power of the TargetX Builder's intuitive user interface and advanced query engine.

Notes: 
  • If the default condition set contains criteria, then all other condition sets within the same template section should also have unique criteria before saving. Only the default condition set can have no criteria.

  • When building complex condition sets, treat merge fields as case-sensitive to prevent rendering issues. Example:

    • Incorrect:
      &tfa_63={{ ID }}

    • Correct:
      &tfa_63={{ Id }}

Supported Operators

When writing condition sets for these tools, the following operators are supported, with product-specific operators noted where necessary. Operators will vary depending on which Object is selected:

  • Equals - supports a single value, includes records that match exactly.

  • Does not equal - supports a single value, excludes records that match exactly.

  • Greater than - Supports numbers, dates, and text, including values greater than when ordered alphanumerically or by date.

  • Greater than or equal to - Supports numbers, dates, and text, including values greater than or equal to when ordered alphanumerically or by date.

  • Less than - Supports numbers, dates, and text, including values less than when ordered alphanumerically or by date.

  • Less than or equal to - Supports numbers, dates, and text, including values less than or equal to when ordered alphanumerically or by date.

  • Starts with -  supports a single value, includes records where the CRM field value begins with the specified string of characters.

  • Ends with - supports a single value, includes records where the CRM field value ends with the specified string of characters.

  • Contains - supports a single value, includes records where the string is contained in the CRM field value.

  • Is included in - supports a list of text or picklist values, includes records where the CRM field value is one of the values in the list.

    • Must enter list as ‘value1’,’value2’,’value3’

Note: Blank values are supported and will look to match on null/blank values in the CRM. To query against a blank, simply leave the final value box empty.

In Group Assignments, you must always use the API Value in Conditions (instead of the Label value if they are different). For example, if you had a Campus setup with Value = Main Campus and API Name = Main, you must use the API Value in your Condition.

Note: When entering a single value as criteria, do NOT use ' around the value. 
  • Multiple values should be entered as ‘value1’,’value2’,’value3’ 
  • A single value should be entered as value1


Adding Logic for Checkbox Fields

When adding conditions for Checkbox fields, you can use the values of true [for checked] or false [for unchecked].


Adding Multiple Criteria Lines

When adding conditions, you can include multiple criteria lines by clicking the + icon to add and the - icon to remove.

 

Using Advanced Expression Logic

You can use the Advanced Expression editor to support additional filter logic. Using advanced expressions, each criteria line in the Condition Set is given a numerical value.  The Advanced Expression editor then uses that number in a boolean expression.

For example, if your query had the following criteria and wanted to look for students in EITHER Pennsylvania or New York who had the listed majors and were interested in Main Campus, you could use advanced logic.

Criteria:
  1. Mailing State/Province Equals PA
  2. Anticipated Major IS INCLUDED IN ‘English’,’History’,’Philosophy’
  3. Mailing State/Province Equals NY
  4. Campus Does not Equal Main

Advanced Expression Logic:

( {1} OR {3} ) AND {2} AND {4}


 

Advanced Expression Formatting

When adding advanced logic, you must surround all criteria numbers with curly brackets { }, and use parentheses to group. The following are examples of how to write advanced logic:
 
  • OR logic: {1} OR {2} OR {3} OR {4}
  • Parenthetical groups: ({1} AND {2}) OR {3} OR {4}
  • Nested parenthetical groups: ({1} AND ({2} OR {3})) OR {4}
  • Multiple parenthetical groups: ({1} AND {2}) OR ({3} AND {4})
  • NOT logic: {1} AND NOT({2}) AND ({3} OR {4})
 
Note:  The NOT functionality requires adding parentheses around the criteria number, such as:
NOT({2})
URL NameHow-do-I-write-a-condition-set-in-Email-Portal-or-Group-Assignment
.
User Community Linkhttps://targetx.my.site.com/usercommunity/s/article/How-do-I-write-a-condition-set-in-Email-Portal-or-Group-Assignment

Powered by