Difference between revisions of "PEC-OU/Current/CXContact/ListRules"
If you select Selection (Advanced) from the Type menu, the standard Contacts fields populate here, in addition to the following fields:
Field Name in User Interface | Field Name in Contact List |
---|---|
Agent ID | agent_id |
Application DBID | app_id |
Number of Attempts | Attempts |
ISO country Code (Contact) | c_country_code_iso |
Original Record | c_original_record |
Postal Code | c_postal_code |
State/Region Code | c_state_code |
Time Zone DBID (Contact) | c_tz_dbid |
Time Zone Name (Contact) | c_tz_name |
Call Result | call_result |
Call Time | call_time |
Campaign DBID | campaign_id |
Area Code | cd_area_code |
Country Code (Device) | cd_country_code |
ISO Country Code (Device) | cd_country_code_iso |
Device Index | cd_device_index |
Device Type | cd_device_type |
Device Exchange | cd_exchange |
Device Extension | cd_extension |
Device Mask | cd_mask |
Device Number | cd_number |
State/Region Code (Device) | cd_state_code |
Timezone DBID (Device) | cd_tz_dbid |
Time Zone Name (Device) | cd_tz_name |
Chain ID | chain_id |
Number in Chain | chain_n |
Contact Info (Device) | contact_info |
Contact Info Type | contact_info_type |
Contact From | daily_from |
Contact Till | daily_till |
Scheduled Time | dial_sched_time |
Group DBID | group_id |
Record ID | record_id |
Record Status | record_status |
Record Type | record_type |
Switch DBID | switch_id |
Treatment History | treatments |
Time Zone DBID | tz_dbid |
If you select Selection (Suppression) from the Type menu, the standard Contacts fields populate, in addition to the following fields:
Field Name | Description | Specification File Keyword |
---|---|---|
Suppress From | This is the start date and time that the record becomes active in the target suppression list. | from |
Suppress Until | This is the end date and time that the record becomes inactive in the target suppression list | Till |
If you select Selection (Contacts) from the Type menu, the following filters are available from the Fields menu:
Field Name | Specification File Keyword |
---|---|
First Name | firstname |
Last Name | lastname |
Client ID | clientid |
Company Name | companyname |
Time Zone | timezone |
Postal Code | postal_code |
Country Code | country_code |
State/Region | state |
Original Record | originalrecord |
All Devices | All Devices |
Device1 - Device10 | device1 - device10 |
Other 1-Other20 (Important: These fields populate only if you have not applied a labeling schema to the selection rule (you did not select a labeling schema from the Labels menu). | other1 - other20 |
All other labels defined in the labeling schema being applied to the selection rule. | other1 - otherN, where N <= 250 |
If you select Selection (Advanced) from the Type menu, the standard Contacts fields populate here, in addition to the following fields:
Field Name in User Interface | Field Name in Contact List |
---|---|
Agent ID | agent_id |
Application DBID | app_id |
Number of Attempts | Attempts |
ISO country Code (Contact) | c_country_code_iso |
Original Record | c_original_record |
Postal Code | c_postal_code |
State/Region Code | c_state_code |
Time Zone DBID (Contact) | c_tz_dbid |
Time Zone Name (Contact) | c_tz_name |
Call Result | call_result |
Call Time | call_time |
Campaign DBID | campaign_id |
Area Code | cd_area_code |
Country Code (Device) | cd_country_code |
ISO Country Code (Device) | cd_country_code_iso |
Device Index | cd_device_index |
Device Type | cd_device_type |
Device Exchange | cd_exchange |
Device Extension | cd_extension |
Device Mask | cd_mask |
Device Number | cd_number |
State/Region Code (Device) | cd_state_code |
Timezone DBID (Device) | cd_tz_dbid |
Time Zone Name (Device) | cd_tz_name |
Chain ID | chain_id |
Number in Chain | chain_n |
Contact Info (Device) | contact_info |
Contact Info Type | contact_info_type |
Contact From | daily_from |
Contact Till | daily_till |
Scheduled Time | dial_sched_time |
Group DBID | group_id |
Record ID | record_id |
Record Status | record_status |
Record Type | record_type |
Switch DBID | switch_id |
Treatment History | treatments |
Time Zone DBID | tz_dbid |
If you select Selection (Suppression) from the Type menu, the standard Contacts fields populate, in addition to the following fields:
Field Name | Description | Specification File Keyword |
---|---|---|
Suppress From | This is the start date and time that the record becomes active in the target suppression list. | from |
Suppress Until | This is the end date and time that the record becomes inactive in the target suppression list | Till |
If you select Selection (Contacts) from the Type menu, the following filters are available from the Fields menu:
Field Name | Specification File Keyword |
---|---|
First Name | firstname |
Last Name | lastname |
Client ID | clientid |
Company Name | companyname |
Time Zone | timezone |
Postal Code | postal_code |
Country Code | country_code |
State/Region | state |
Original Record | originalrecord |
All Devices | All Devices |
Device1 - Device10 | device1 - device10 |
Other 1-Other20 (Important: These fields populate only if you have not applied a labeling schema to the selection rule (you did not select a labeling schema from the Labels menu). | other1 - other20 |
All other labels defined in the labeling schema being applied to the selection rule. | other1 - otherN, where N <= 250 |
(Published) |
(Published) |
||
Line 44: | Line 44: | ||
If you selected '''Selection (Advanced)''' as the rule type, the '''Use Visual Editor''' switch is enabled. Switch this to the '''Off''' position if you want to enter a raw SQL WHERE clause rather than use the default visual editor to define the filtering criteria. For example, type <tt>Country='Mexico';</tt> to select records containing Mexico in the Country field. | If you selected '''Selection (Advanced)''' as the rule type, the '''Use Visual Editor''' switch is enabled. Switch this to the '''Off''' position if you want to enter a raw SQL WHERE clause rather than use the default visual editor to define the filtering criteria. For example, type <tt>Country='Mexico';</tt> to select records containing Mexico in the Country field. | ||
− | {{NoteFormat|If the Visual Editor is switched off after you enter selection criteria using the Visual Editor, the active content will be converted into raw SQL. As a result, the transition between the Visual Editor and raw SQL is made easier. The ability to transition back to the Visual Editor will not be possible after the SQL is manually edited.}} | + | {{NoteFormat| |
+ | *If the Visual Editor is switched off after you enter selection criteria using the Visual Editor, the active content will be converted into raw SQL. As a result, the transition between the Visual Editor and raw SQL is made easier. The ability to transition back to the Visual Editor will not be possible after the SQL is manually edited. | ||
+ | *CX Contact has a built-in protection for SQL injection. The following clauses are not allowed in the SQL WHERE expression: | ||
+ | ** ; | ||
+ | ** CR/LF | ||
+ | ** – (two dashes) | ||
+ | ** – (long dash) | ||
+ | ** select (in any case) | ||
+ | ** delete (in any case) | ||
+ | ** drop (in any case) | ||
+ | ** update (in any case) | ||
+ | ** alter (in any case) | ||
+ | ** truncate (in any case) | ||
+ | ** insert (in any case) | ||
+ | ** create (in any case)}} | ||
[[File:CXC_Rules_VisualEditor.png|700px|center]] | [[File:CXC_Rules_VisualEditor.png|700px|center]] |
Revision as of 13:35, February 22, 2021
Contents
Learn how to create and manage List Rules.
Use the List Rules feature to apply a set of rules to a contact list. There are three types of list rules:
- Selection rules - used to target specific records in a list based on filtering criteria. Only records that satisfy the criteria are imported.
- Upload rules - used to apply record splitting options to a contact list at the time of upload. Splitting criteria can be based on quantity, percentage, field, or custom criteria.
- Filtering rules - used to target specific records in a list based on filtering criteria. These rules can be applied dynamically, while a campaign group is running. They do not need to be created at the time a list is being imported into CX Contact.
- Import rules - used to import all list rules (Selection, Upload and Filtering).
This page describes how to create list rules. It also explains how to edit, delete, and duplicate a list rule.
Create a Selection Rule
To create a new selection rule, go to the Rules page and select New -> Selection Rule.
On the Selection Rules page, start by naming the selection rule.
Then, from the Type menu, select the type of selection rule you want to apply:
- Contacts - The selection rule applies to a contact list.
- Suppression - The selection rule applies to a suppression list.
- Advanced - The selection rule applies to a contact list export and filtering rules.
From the Labels menu, you can apply a labeling schema. The labels defined in the schema will replace the default labels in the Field menu. See Create or Manage User Field Labels for more information about labels.
If you selected Selection (Advanced) as the rule type, the Use Visual Editor switch is enabled. Switch this to the Off position if you want to enter a raw SQL WHERE clause rather than use the default visual editor to define the filtering criteria. For example, type Country='Mexico'; to select records containing Mexico in the Country field.
- If the Visual Editor is switched off after you enter selection criteria using the Visual Editor, the active content will be converted into raw SQL. As a result, the transition between the Visual Editor and raw SQL is made easier. The ability to transition back to the Visual Editor will not be possible after the SQL is manually edited.
- CX Contact has a built-in protection for SQL injection. The following clauses are not allowed in the SQL WHERE expression:
- ;
- CR/LF
- – (two dashes)
- – (long dash)
- select (in any case)
- delete (in any case)
- drop (in any case)
- update (in any case)
- alter (in any case)
- truncate (in any case)
- insert (in any case)
- create (in any case)
Now, define the filtering criteria, as follows:
- Field - If you want to filter a list by a particular field in your list, select the field here. The fields populated depend on the type of selection rule being applied:
- Type - These options vary, depending on the Field selection.
- Operator - Select the operator available with the selected Field.
- Value - Enter a defining value to search for in that field.
This table describes the supported operators for each Field Type.
String | Numeric | Area Code | Country Code | Timezone | Exchange | State Code | |
---|---|---|---|---|---|---|---|
Equal | • | • | • | • | • | • | • |
Not Equal | • | • | • | • | • | • | • |
Like | • | ||||||
Not Like | • | ||||||
In | • | • | • | • | • | • | |
Not In | • | • | • | • | • | • | |
Is Valid | • | • | • | • | • | ||
Is Not Valid | • | • | • | • | • | ||
Is Empty | • | • | • | • | • | • | |
Is Not Empty | • | • | • | • | • | • | |
Contains | • | ||||||
Does Not Contain | • | ||||||
Custom JS Expression | • | • | |||||
Less Than | • | ||||||
Less Than or Equal | • | ||||||
Greater Than | • | ||||||
Greater Than or Equal | • |
Conditions and Condition Sets
Example
If you want to extract all customers with the last name Smith with a 506 area code from the existing contact list, specify the following:
Now click the plus sign (+) and specify the following:
|
When you're finished creating the selection rule, it will appear in the table of list rules on the main List Rules page. Then, when you create an upload rule, you can apply the selection rule to the list being uploaded.
Create an Upload Rule
Use an upload rule to apply splitting criteria to create additional contact lists.
To create a new upload rule, from the Rules page, select New -> Upload Rule.
On the Upload Rules page, specify a name for the rule.
Then, from the Type menu, select the type of selection rule you want to apply:
- Contacts - The upload rule applies to a contact list.
- Suppression - The upload rule applies to a suppression list.
If you want to use a specification file, set the Specification File switch to the On position and select a specification file from the Specification File menu. If you want to use a data mapping schema, set the Specification File switch to the Off position and choose a data mapping schema to the Data Mapping menu.
At this point, you can do one of two things:
- Option 1 (available for either type of rule): In the Selection Rules section, apply an existing selection rule to the list being uploaded. To do that, select the rule from the Selection Rule menu. Notice that only the selection rules matching the rule Type (Contacts or Suppression) populate in the Selection Rule menu.
- Option 2 (available for Upload (Contacts) rules only): Check the Use Splitting box to split the contacts into targeted lists. See the Splitting Criteria section below for more information.
Splitting Criteria
Splitting criteria determines how a contact list will be split into targeted lists. There are three types of splitting criteria, plus an option to customize the split based on previously-defined selection rules.
- Split by quantity – Specify how many contacts from the uploaded file will appear in each new list. If the original list size is not a multiple of the quantity specified, then the final list will contain the remainder of the contacts.
- Split by percent – Specify the percent of contacts from the uploaded file that will appear in each new list. If the percentage specified is not a factor of 100, the final list will contain the remainder.
- Split by field – Split the file by unique contacts in the specified field. For example, “create a separate new list for each unique value contained in the Other3 field.” Note: If you created labels for user fields (Other1-OtherN) and you selected the Display option when you created those labels, the new defined labels will replace the Other labels in this menu. See Create or Manage User Field Labels for more information.
- Custom – This allows you to split the file using previously-defined selection rules. Once you select the Custom splitting option, all available selection rules populate in a new menu, labelled List rule 1. All the rules listed in this new menu will be an exact match to all selection rules listed in the List Rules section of CX Contact. You can use any of these selection rules to split a contact list.
Select Create remainder file when you want the remaining records not included in a selection rule criterion to go into a separate contact list.
Apply Multiple Selection Rules
You can use the plus sign (+) icon next to a rule to create additional contact lists by applying additional selection rules to the splitting criteria (the short video demo to the left shows you how). If you do this, the system will move through the list of rules sequentially, starting with List rule 1, then List rule 2, and so on, and look for records matching that rule. Note: You can only choose one selection rule per contact list.
To change the order of the selection rules, simply hover over any selection rule (List rule 1, List rule 2, etc.) and drag it to the new location within the list.
To delete any selection rule from the splitting criteria, click the trash can icon next to that rule.
The Use Waterfall rule option is enabled by default so that when the system matches a record to a selection rule, it will stop attempting to match that record to subsequent selection rules. If you disable this option, the system will attempt to match a single record to all selection rules, meaning that the record could potentially be duplicated in contact lists.
Output Name Formats
When you select Custom splitting, you must specify an output name format. The following naming conventions are supported for this field.
Token | Replaced with |
---|---|
LIST | Constant part of the contact list name, as provided via API call |
yyyy | Current year with century as a decimal number (ex. "2017") |
MM | Current month number as zero-padded decimal number (ex. "05", "08", "11") |
dd | Current day in month number as zero-padded decimal number (ex. "07", "31") |
hh | Current hour (24-hour clock) as a zero-padded decimal number (ex. "17", "00", "08") |
mm | Current minutes as a zero-padded decimal number (ex. "59", "01", "19") |
%d | Sequential part number of the generated list |
ACCOUNT | Tenant Name in human readable form |
%v | Value of the contact field used for splitting on (ex. "CA" if splitting by State) |
%r | Rule name for the corresponding custom bucket |
When you're finished creating the upload rule, it will appear in the table of list rules on the main List Rules page. Then, when you import a new list, you will have the option to apply the upload rule to the list being imported.
Create a Filtering Rule
Use filtering rules to target a subset of records within the contact list. Unlike selection rules and upload rules, filtering rules can be applied dynamically, while a campaign group is running. They do not need to be created at the time a list is being imported into CX Contact.
To create a filtering rule, go to the Rules page and select New -> Filtering Rule.
On the New Filtering Rules page, start by naming the filtering rule.
Then, from the Labels menu, you can apply a labeling schema. The labels defined in the schema will replace the default labels in the Field menu. See Create or Manage User Field Labels for more information about labels.
At this point, you can do one of two things:
- Option 1: In the Selection Rules section, apply an existing selection rule to the list being uploaded. To do that, select the rule from the Selection Rule menu. Note: If there are no selection rules to choose from, you must use Option 2.
- Option 2: Check the Use ordering box to define the order in which records are processed and displayed in CX Contact. See the Ordering section below for more details.
Ordering
In this section, you can define how you want to order and display the records within a contact list. For example, if you want to display the records in ascending order based on Last Name, you would select the Last Name from the Choose Field for Ordering menu and then select Ascending.
You can optionally set the Use visual editor switch to Off to instead enter a SQL ORDER BY clause to define the order. For example, to sort in ascending order by Country, in the SQL ORDER BY field, enter Country ASC;
When you're finished creating the filtering rule, it will appear in the Filtering Rules menu on the General tab of a dialing profile, campaign template, or campaign group. You can apply it to any campaign group at any point, even while the campaign group is running.
Edit or Delete a List Rule
From the Rules page, you can edit or delete a rule:
- Edit - Click the pencil icon from the Actions menu.
- Delete - Click the trash can icon from the Actions menu or check the box to the left of the rule and click Delete (located at the top of the page, next to the New option).
Duplicate a List Rule
You can duplicate any selection or upload rule from the Rules page.
Locate the rule you want to duplicate, and from the Actions menu, click the document icon. A copy of the original rule opens. You can change any or all of the rule's properties, or leave the default properties, and then click Update Rule. The new rule will appear on the List Rules page.
Import Rules
To import a rule, select Lists > List Rules and click Select file (.json).
Locate and select the .json file that contains the rules you want to import. Click Open and then Import. The imported rule will appear. You can edit the imported rule before saving it. You will then return to the List Rules page.