Compliance Tools
Contents
Learn about the compliance tools used to restrict contact attempts. The compliance tools include the following:
- Attempt Rules
- Custom Time Zones
- Location Rules
- Custom Rules
- External Pre-Dial Validation Rules
- Contact Times
- Contact Dates
Attempt Rules
Use the Attempt Rules option to specify certain conditions that, when met, suppress a contact attempt. The following conditions can make up an Attempt Rule:
Required | Indicate whether the rule is Required. If a rule is Required, CX Contact will apply it to all new and existing campaigns, even ones that are currently running. If a rule is not Required, it is considered an Optional rule and must be manually applied to all applicable campaigns. You do this when you create or modify a new campaign template or campaign group. See the instructions below. |
Priority | Set the priority of this rule. If you have multiple rules the priority value denotes the order in which the rules will be applied. A lower priority value indicates a higher priority, with 1 being the highest priority. |
Rule Scope | Specify if the rule should be applied at the Tenant level or at the Campaign Group level. |
Do Not Contact if | Fill in the values for the contact attempt rule. For example, Do not contact if 4 Outbound attempts have been made in the last 5 hours.
Select Today when you want to count the attempts made today (after the last midnight) and select In the last when you you want to count attempts made in during a specific time. |
Count By > Call Results | Define the attempt rule by call result status. By default, the following 12 call results are pre-selected.
Refer to the Call Results table on the Delivery and Retry Options page for a description of each call result. |
Count By > Disposition Codes | Define the attempt rule by Disposition Code.
For details refer to the Treatments based on Disposition Codes section in the Delivery and Retry Options page and the Dispositions section in the Administrator's Guide. |
Contact Results | Select the call results that should be included as part of the Attempt Rules definition. |
Count Attempts Using | Indicate whether to count previous attempts only:
Note: When Device or ClientID/Device is selected, additional options will be presented, allowing you to target specific Device fields (including all Devices), and to also define a Device type. For example All Devices that are Mobiles enables you to control the number of attempts made to mobile phones. |
To | Specify the location of previous attempts (that otherwise meet the conditions above) to count. If not specified, previous attempts to anywhere (using the current Client ID or Device, as specified above) are counted. |
Count attempts between times | Indicates the number of outbound attempts that were made today during a specific time period. The Attempt rule will only count attempts made within the defined time period. Attempts made outside this time period will not be counted by this rule.
Note: The Start Time and End Time options are only available when Count attempts between times is turned on. The Timezone source field is not editable. It is set within the campaign group settings. |
Apply custom condition | Set to On to define a custom condition that limits attempts calculation to only those attempts that satisfy the provided condition. (Set to Off by default.)
The next three settings displays only when Apply custom condition is set to On:
|
Apply Disposition Code | Select a Disposition Code to be applied to the call attempt when the outcome is a negative rule check result. Treatment could be defined for this Disposition Code. If no Disposition Code is selected, Treatment can be applied to "Cancel Record" call result. |
Custom Conditions | When applying Attempt Rules, complicated use cases sometimes require the ability to also apply a customizable condition to the Attempt Rules definition.
For example, you could apply special Attempt Rules to customers that have real estate properties in specific states (where PropertyState is stored in the OtherX field) or to customers that have specific account types (where AccountType is also stored in the OtherX field). CX Contact then counts attempts only if the specific user data field satisfies the condition. See also, Create Custom Conditions. |
How to enable |
On the Attempt Rules tab, select New and specify the parameters as described in the table above. The new rule will appear on the Attempt Rules page and it will populate in the Attempt Rules section when you create or edit a campaign object (dialing profile, campaign template, or campaign group). Notice that you only see the Required rules, meaning that those are the rules that are automatically applied to all new and existing campaigns because you checked Required when you set up the rule. If you don't want to apply a Required rule to a campaign object, you must return to the Compliance Tools page and uncheck Required for that rule. You cannot deselect a Required rule when you create or edit the campaign object. If you want to add Optional rules (rules that weren't marked as Required) to the campaign object, click Change and select the rules from the list. The Optional rules will appear alongside the Required rules. You can click the X next to the name of any Optional rule to remove it. |
Edit, Delete, or Duplicate an Attempt Rule
On the main Attempt Rules page, use the Actions menu next to any Attempt rule to do any of the following:
- Edit - Click the pencil icon.
- Delete - Click the trash can icon.
- Duplicate - Click the document icon. The Duplicate Attempt Rule dialog box opens with the settings from the original rule populated. You can change any or all of them. If you do not change the name of the Attempt rule, it will inherit the name of the original Attempt rule, with _duplicate1 appended to it.
Create Custom Conditions
This section provides details about how to create custom conditions for Attempt Rules.
- Enter the JavaScript expression that evaluates to
true
orfalse
.- The attempt rule counts only the historical facts that make the Java Script expression evaluate to
true
.
- The attempt rule counts only the historical facts that make the Java Script expression evaluate to
- Use
$<user data key>
within the expression to refer to a value of a pre-defined or user data field$<user data key>
.- You can refer any field in either the validation record, historical record, or both; The
customConditionScope
field defines the source of the field$<user data key>
.
customConditionScope=both
(default)—The Compliance engine uses the custom condition for both attempts (history search and current record) being validated. A historical record is counted only when the custom condition evaluated totrue
for both the historical and validation record fields. This means the condition is evaluated once for each historical record, and once when taking fields from real-time data.customConditionScope=current
—The Compliance engine applies the custom condition for the current record being validated only.customConditionScope=history
—The custom condition is evaluated once for each historical record and not for the current record being validated.
- You can refer any field in either the validation record, historical record, or both; The
- Be sure to provide the
$<user data key>
to Compliance Manager within the validation or historical request. If this is a custom field, it must be defined by theOtherX
field using thesend_arrtibute
string. For example:"c_otherXX": { "es_attribute": "1", "icon_attribute": "1", "send_attribute": "$<user data key>" }
Programming the JavaScript Condition
The simplest way to provide a custom condition is to use a JavaScript expression that evaluates to true
or false
. You can use any valid JavaScript syntax to write an expression, but be sure to enclose it in round brackets for proper boolean evaluation.
Example 1.
Suppose you have an attempt rule condition that prevents dialing to a customer if 3 or more dialing attempts have been made in the last 10 days.
We can use a custom script to prevent dialing only to Platinum customers using a simple JavaScript expression, as follows:
This custom condition dictates that only the attempts with
$field_1 == 'Platinum'
are counted toward the limit of 3 attempts in the last 10 days. This does not limit dialing to non-platinum customers.
Be sure to provide $field_1
to Compliance Manager with the validation or historical request, and it is defined by the OtherX
field using the send_arrtibute
string, as follows:
"c_other21": {
"es_attribute": "1",
"icon_attribute": "1",
"send_attribute": "field_1"
}
You could use a more complicated expression using any valid JavaScript syntax.
Example 2.
Suppose you need to limit dialing when you've made too many historical attempts outside of an 8-to-17-hour window. In this case, you can define a rule with customConditionScope=history
and a custom condition, as follows:
(localHours = (new Date(Date.now() - Number($GSW_TZ_OFFSET) * 60* 1000)).getUTCHours()) && (localHours>=17 || localHours<8)
- Calculate the
localHours
variable using the expression:localHours = (new Date(Date.now() - Number($GSW_TZ_OFFSET) * 60 *60 * 1000)).getUTCHours()
- In this code, you get the epoch (number of milliseconds since Jan 1, 1970).
- This epoch is shifted to the number of milliseconds provided by the pre-defined field which contains the local time shift, in seconds.
$GSW_TZ_OFFSET. GSW_TZ_OFFSET
- The resulting epoch is used to construct a new Date object that has the UTC time adjusted to your (the customer's) local time. An hour is subtracted from it, which is actually the same hour in the local time zone, because the shift was applied.
- Check to confirm that the parameter value does not fall outside the allowable range, as follows:
localHours
(localHours>=17 || localHours<8)
Besides a JavaScript expression, any JavaScript program can be used to provide a custom condition. The last statement of the script is evaluated to true
or false
. Example 2 (above) can be rewritten, as follows:
let localDate = new Date(Date.now() - Number($GSW_TZ_OFFSET) * 60* 1000);
let localHours= localDate.getUTCHours();
(localHours>=17 || localHours<8);
(localHours>=17 || localHours<8)
The JavaScript condition must work fast to avoid performance issues during pre-dial validation. Scripts running longer than 1 second are aborted by a timeout limit.
Custom Time Zones
Use the Custom Timezones option to assign a time zone to phone numbers containing a specific country code and area code. For example, you can assign the EST time zone to all national rate phone numbers.
How to enable |
|
Edit or Delete Custom Time Zone Rules
On the main Custom Time Zones page, use the Actions menu next to any rule to edit or delete the rule:
- Edit - Click the pencil icon.
- Delete - Click the trash can icon.
Location Rules
Location rules suppress contact attempts based on the location of a contact or device.
Location rules have the following attributes:
Name | The rule name must be unique within the account and rule type, and may contain letters, digits, hyphens, and underscores, and spaces. |
Required | Specify if this is a Required rule. If a rule is Required, CX Contact will apply the rule to all new and existing campaigns, even ones that are currently running. If a rule is not Required, it must be manually applied to all applicable campaigns. You do this when you create or modify a campaign object. See the instructions below for more information. |
Priority | Set the priority of this rule. If you have multiple rules the priority denotes the order in which the rules will be applied. A lower priority value indicates a higher priority, with 1 being the highest priority. |
Determine location by | The location of the attempt may be based on the Device or the Contact. |
Do not contact locations |
Specify the locations that should be suppressed:
Note: The postal code can include an asterisk (*) that acts as a wildcard (that is, zero or more instances of any character).
Note: Selecting All Types and/or All Devices will completely suppress dialing. |
Devices | Select the devices to which you want to apply the Location rule.
|
How to enable |
On the Location Rules tab, select New and specify the location attributes as described above. The new rule will appear on the Location Rules page and it will populate in the Location Rules section when you create or edit a campaign object. Notice that you only see the Required rules, meaning that those are the rules that are automatically applied to all new and existing campaigns because you checked Required when you set up the rule. If you don't want to apply a Required rule to a campaign object, you must return to the Compliance Tools page and uncheck Required for that rule. You cannot deselect a Required rule when creating or editing a campaign object. If you want to add Optional rules (rules that weren't marked as Required) to the campaign template or campaign group, click Change and select the rules from the list. The Optional rules will appear alongside the Required rules. You can click the X next to the name of any Optional rule to remove it from that campaign template or campaign group. |
Edit, Delete, or Duplicate a Location Rule
On the main Location Rules page, use the Actions menu next to any Custom rule to do any of the following:
- Edit - Click the pencil icon.
- Delete - Click the trash can icon.
- Duplicate - Click the document icon. The Duplicate Location Rule dialog box opens with the settings from the original rule populated. You can change any or all of them. If you do not change the name of the Location rule, it will inherit the name of the original Location rule, with _duplicate1 appended to it.
Custom Rules
Use the New Custom Rule option to create a rule that will allow or deny outbound dialing according to a user-defined Java Script expression evaluated for each outbound call immediately before dialing occurs. A custom rule enables you to implement customized business rule logic.
Custom rules have the following attributes:
Name | The rule name must be unique within the account and rule type, and may contain letters, digits, hyphens, and underscores, and spaces. |
Required | Specify if this is a Required rule. If a rule is Required, CX Contact will apply the rule to all new and existing campaigns, even ones that are currently running. If a rule is not Required, it must be manually applied to all applicable campaigns. You do this when you create or modify a campaign group. See the instructions below for more information. |
Priority | Reserved for future use. Editing this parameter will not yield any results in CX Contact. |
Description | Enter an explanation of the purpose of the custom rule. |
Apply Disposition Code | Select a Disposition Code to be applied to a call attempt, when the outcome of the call attempt is a negative rule check result. A treatment can be defined for the Disposition Code. If a Disposition Code is not selected, the "Do Not Call" call result treatment may be applied. |
Custom Expression | Enter a Java Script expression that evaluates the conditions for a True or False outcome. True allows the dial to occur. False does not allow the dial to occur. Note: You can refer to the user data values attached to the call using $<user data key name> . |
How to enable |
On the Custom Rules tab, select New and specify the custom rule attributes as described above. The new rule will appear on the Custom Rules page and it will populate in the Custom Rules section when you create or edit a campaign group. Notice that you only see the Required rules, meaning that those are the rules that are automatically applied to all new and existing campaigns because you checked Required when you set up the rule. |
You can create custom rules so that dialing is blocked during certain time periods or on specific dates. For example, if you want to suppress dialing on a holiday or a 'no contact day', you can specify suitable conditions in a custom rule.
Example 1
Suppose you want to create a custom rule so that dialing is blocked every year on the following days in the Eastern time zone (EST): 4th of July and 25th of December. Here's a sample condition you can use to achieve this:
let eastern_datetime_str = new Date().toLocaleString("en-US", { timeZone: "America/New_York" });
let date_eastern = new Date(eastern_datetime_str);
!(date_eastern.getMonth() === 6 && date_eastern.getDate() === 4) && !( date_eastern.getMonth() === 11 && date_eastern.getDate() === 25)
If you want the record to be redialed, for example the next day, you will need to configure a disposition code that is applied to the record in the event of a negative check result. You will also need to define a treatment for the disposition code so that dialing resumes on the specified day.
Edit or Delete Custom Rules
On the Custom Rules page, use the Actions menu next to any rule to edit or delete the rule:
- Edit - Click the pencil icon.
- Delete - Click the trash can icon.
- Duplicate - Click the document icon. The Duplicate Custom Rule dialog box opens with the settings from the original rule populated. You can change any or all of them. If you do not change the name of the Custom rule, it will inherit the name of the original Custom rule, with _duplicate1 appended to it.
External Pre-Dial Validation Rules
External Pre-Dial Validation is an optional custom step that you can use to expand (or replace, depending on the configuration) Compliance Manager's standard pre-dial validation with an HTTP or HTTPS request to an external Web/Application Server. The server must be capable of processing HTTP requests with JSON bodies and respond with 200 OK (Dial) to 409 Cancel (No Dial) responses, based on it's business logic. CX Contact supports both HTTP and HTTPS protocols together with the ability to configure the HTTP Method (POST, PUT, GET), optional HTTP Proxy, and one or more optional custom HTTP headers. CX Contact passes all properties of the record being validated in the JSON body of the external pre-dial validation request.
External Pre-Dial Validation is a type of Compliance Rule for which you can configure multiple rules and optionally associate them with Campaign Groups. Since Compliance Rules for External Pre-Dial Validation are optional, each rule must be explicitly associated with a Dialing Profile, Campaign Template, or Campaign Group to take effect.
External Pre-Dial Validation rules have the following attributes:
Association with Campaign Groups
You can optionally associate External Pre-Dial Validation Rules with Campaign Groups for any channel (Voice, SMS, Email).
- Go to the Dialing Profile > Campaign Template > Campaign Group view.
- Click Create/Edit to open the dialog.
- You'll see External Validation, together with a Change button and the associated rule to the right.
- Click Change to open a dialog containing a list of the available external validation rules.
- You can associate only one rule with a Campaign Group.
- Click X (to the right of the rule) to disassociate it from the Campaign Group.
Contact Times
Use the Allowed Contact Times by Region option to define allowable calling windows for each day of the week for a given region for a specific set of devices. Contact attempts to your contacts in those regions will be limited to the time frame you define on each day, regardless of your contact center hours and campaign time frames. For example, if you have campaigns running from 8AM to 9PM local time, and you restrict attempts in New York to 9AM to 7PM, no attempts will be made to anyone in New York until 9AM, and they will end at 7PM.
To enable Contact Times by region:
- Select the Contact Times tab.
- Select New > Contact Time and configure the following:
Name | The Contact Time name. |
Required | Select Required to apply the Contact Time rule to all Campaign Groups. |
Priority | Set the priority of this rule. If you have multiple rules the selected priority denotes the order in which the rules will be applied. A lower priority value indicates a higher priority, with 1 being the highest priority. |
Country | Select the target country for this rule or select “Any Country” to apply this rule regardless of the country being contacted. |
Region/State/Province | Select one or more Regions, States or Provinces for this rule. If not selected all regions/States/Provinces for this country will be applied to this rule. |
Devices | Select one or more devices associated with this new rule. Note: Any Device can only be selected when no other device was selected. |
Device Type | Select one or more of the following devices. Note: Any Device Type can only be selected when no other device was selected.
|
Timezone Source | Indicates the timezone source. |
Apply Disposition Code | Select a Disposition Code to be applied to a call attempt when the outcome is a negative rule check result If a Disposition Code is not selected, Treatment can be applied to the "Cancel Record" call result. |
Strict | Select one of the following:
|
Allowed Contact Times | The following types of restrictions are available for any given region:
No Contact - When you select this option, no contact attempts will be made to the affected region on the specified day. Note: When Strict is enabled All days have the same contact time is enabled and cannot be unselected. |
Edit or Delete Contact Times Rules
On the Allowed Contact Times by Region' page, use the Actions menu next to any rule to edit or delete the rule:
- Edit - Click the pencil icon.
- Delete - Click the trash can icon.
Contact Dates
Use the Do Not Contact Dates option to specify a date in which contact attempts cannot take place. This applies to any device in the account and is effective for 24 hours (midnight to midnight, local to the device).
How to enable | On the Do Not Contact Dates tab, add a Label (for example Christmas Day) and select the associated date (for example December 25). |
Delete Contact Dates Rules
You cannot edit a Contact Dates rule - the only option is to delete the existing rule and create a new one with a different date or label. To delete the rule, check the box next to the rule name and click the trash can icon.