Rules can add advanced, real-time intelligence to your Interactions and make workflows more personal and flexible.

The Web Designer enables you to create both simple or very complex Rules that look at parameters for an account, a user, or a specific activity. Because global Account Rules are available for every Interaction, they can be powerful tools for simplifying and streamlining all of your workflows.

Use Account Rules for:

  • Classifying users 'on-the-fly' based on their input
  • Determining if a user is qualified for a special discount, based on a predefined scheme
  • Tailoring services offered according to the time of day
  • Changing product delivery parameters based on real-time events or requests

Example: A Rule for Weekend Service Hours

In the following example, we define a Rule to examine an Interaction and determine whether it is being run during weekend hours.

Our example Rule needs only one IF/THEN statement (i.e., Is it a Weekend now or not?). If the statement evaluates to True, then the output variable for the Rule will be assigned a value of 'Weekend'. If the statement evaluates to False, then the Rule output will be assigned a value of 'Fallback'.

In the Interaction Map where the Rule is used, we'll want to assign outcomes for both possibilities. If 'Weekend' is passed, we may want to display an abbreviated list of services to the user, or a special phone number to call. If 'Fallback' is passed, we can display our normal services and phones.

A Closer Look at the Rule

  • This Rule statement uses a built-in current time variable called Time Stamp, which provides both the day of the week along with the current time of day.
  • In our Primary Condition, when we choose Time Stamp from the Variables list, the comparator options include the Equal Days operator, which enables us to specify the days of the week that will evaluate to True for the weekend. Here we simply select the Saturday and Sunday checkboxes.

    Note that we specify this first condition logic as OR, since we may or may not need to look for another day. If this condition evaluates to True, we can already return True. However, if this condition evaluates to False, we still want to check for Friday.
  • Because Friday can be both a weekday and a weekend day, we add it to the Rule statement in a Condition Group that examines the specific hour of the Time Stamp. Our first sub-condition looks at the day, while our second sub-condition looks at the current hour. For our purposes, anytime after 18:00 is the weekend.

    Here we need to specify the Condition Group logic as AND, since both conditions need to be True for the entire Group to evaluate to True. Should the second sub-condition evaluate to False, our Rule will also evaluate to False.

We might assign this Rule to a Menu or Choice element, where a True outcome will hide or display different selection options to the user.

Example: A Rule to Determine Opt-In Type

In the following example, we define a Rule that examines a custom variable and determines the customer Opt-In type.

Our example Rule uses multiple IF/THEN statements, since it will produce enumerated output. Each statement is executed to see if it evaluates to True. The output variable for the Rule will be assigned the first True value encountered. If all statements evaluate to False, then the Rule output will be assigned a value of 'Fallback'.

In the Interaction Map where the Rule is used, we'll want to assign outcomes for the two Opt-In types. If 'Fallback' is passed, we'll assign an outcome for customers that did not Opt-In.

A Closer Look at the Rule

  • The Rule uses a custom System Variable created in the Admin Console, called Joined Date. This variable stores the date on which a customer Opted-In to the service.

  • Each Rule statement examines Joined Date to see whether it falls before a specified date or within a date range. For purposes of our example, we assign 'New' or 'Old' Opt-In types.
  • If the Joined Date value does not occur within any of the dates specified, or there simply is no value assigned for Joined Date, then the Fallback is used.

We might assign this Rule to a Decision Point element, where each outcome will direct the Interaction workflow to a unique sub-Interaction that applies to the specific Customer Opt-In type.