Using Tags in Routing Policies

The tag field on the routing policy is used to route to a particular routing queue policy. For instance, you can set up different queues based on Lead Source, Geo Region, or Industry, etc. You can use any text field (other than description and notes fields) - or Tags – to match them to a queue. Use Tag Operators to make your routing policies more formula-based and efficient, to match to as many possible records for better manageability.

When leveraging Fullcast Routing Policies, it is possible to create multiple routing policies for the same territory, and a policy would be dynamically selected at runtime based on the attributes of the object being routed.

For example, a sales leader can create multiple lead routing policies that can be executed at the same territory and dynamically selected at runtime based on the specific campaign or the lead source AND based on the size of the customer. This can be accomplished by using Tags in Fullcast.

How Do Tags Work?

There are two aspects to consider where Tags are concerned:

  1. Tag Expressions - match the object to be routed with a specific queue.
  2. Tag Values - passed to the policy execution engine via the process builder.

Using Tag Values

A tag value is constructed by using attributes of the object being routed. Let's take a lead as an example - you can use any field or a combination of fields on the lead to create a tag.

Tag values are then matched against a tag expression, which is defined in the routing policy. If the expression matches the value - then that particular policy is selected for execution. This allows users to define specific routing behavior based on the lead attributes like region, lead source, country, state, or language, for example.

To combine values of multiple fields on an object, create a tag string that can incorporate all of these attributes.

  1. Let's say the user wants to combine the values of multiple fields on leads like region, country, employee size, or lead source to identify which routing policy should be applied.
  2. To build a tag string, use the CONCAT() function in Salesforce to combine the field values and separate them by the "||" double pipes.
  3. Note: When combining values, the fields must be combined in the same order as the expression is expecting. More on this below.

Using Tag Expressions

Creating a Tag Expression

The tag expression is a "wildcard" based expression that is defined on the policy to match the tag value (and thereby attributes on the object being routed) to decide which policy to use. The tag expressions have the following expression types that can be used:

📘

Additional notes on tag expressions:

  1. The order in which the field values are passed in as tag values should be the same order in which the expression is built out.
  2. A more specific expression is considered before the "Any" or the more expansive expression. For instance if you have two queues where in one you have a list of countries and the other has the wildcard - the list is given preference over the wildcard.
  3. The first portion of a combined tag cannot contain any of the tag expressions but rather should be a static string comparison.

Indicating Range

Use [ ] Square brackets to specify a range of values defined by an operator and a corresponding value, or between certain values.

Operators supported:
= equals
!= not equals
< less than

greater than
= greater than equal to
<=
less than equal to*

Syntax

Example

Result

[operator, value]

[>=,1000]

greater than equal to 1000

[between, value1, value 2]

[between,0,1000]

anything greater than 0 and less than 1000

{*}

matches to one or many characters for the range and any null values

Indicating a list of values

Use { } Curly brackets to indicate a list of string values in the formula tag.

Syntax

Example

Result

{"value 1", "value2", "value3"..}

{"John", "Doe", "test"}

will match to either John or Doe or test and is case insensitive

{*}

Will match to any string value including null

❗️

Note:

Quotes are considered a part of the string to match. (e.g. {‘John’, ‘Doe’, ‘test’} will not match to John or Doe or test.) Comma-separated values currently cannot be used.

Using Wildcards

Note: Wildcards cannot be the first field being passed in the tag, it must be a string value as indicated above.

Wildcard

Meaning

Example

Result

match with anything, including null values.

[*]

matches with anything within a range, including null values.

?

Match a specific number of characters

{???}

will match 3 characters in a list of values, nothing more than that

~

Matches NULL Characters

[~]

will match to only null values

👍

Order of Priority

The system will recognize the List before a * wildcard.

Concatenating groups or strings

Use || Double bars to concatenate the above groups of values. Any ordering of groups is allowed after the “String Value”.

Syntax

Example

StringValue || [RANGE] || {List of Values}

AMER || [>,1000] || {"USA", "Mexico", "Canada"}

StringValue || {List of Values} || [RANGE]

AMER || {"USA", "Mexico", "Canada"} || [>,1000]

StringValue || {List of Values}

AMER || {"USA", "Mexico", "Canada"}

StringValue || [RANGE]

AMER || [>,1000]

❗️

Note:

The expression must start with a string value to do an exact match. The single value concatenated with groups cannot be comma-separated (E.g. AMER,LATAM || [>,1000] is not allowed.)

Setting up Process Builder for Using Tag Operators

  1. As a prerequisite to using Tag Operators in fullcast, you must create a custom text field on the Account object that you'll use to call Input Value 1.

  2. To set up the Process Builder in SFDC connecting to the fullcast routing policy:

  • Set up the PB as follows (the example is an example PB for Routing Accounts):
  • For InpuVal1 - Select "Field Reference" as the Type and search for your custom field or any field that you are going to use as your tag for that object in the Value box. E.g. Input Value 1 = CONCAT(Field1, "||", Field2, "||", Field 3) or the API name of the custom field you've created for tagging purposes in step 1.
  • For InputVal4 - Select "String" as the Type and type ‘WILDCARD’ into the Value box.