Adding routing to profilers
Routing may be added to a profiler to change the sequencing of pages when a profiler is being run, depending on the answers given to questions by the panellist.
When no routing is set up, a profiler will display the pages in the order they are defined in the Pages tab. With routing, the profiler may jump to a specific page depending on the answer to a question.
Routing is defined by creating one or more rules. A rule is based on a page (i.e. a “Rule Page”) and determines the page that the panellist is directed to once the questions on the “Rule Page” have been answered and the Next button is clicked.
Routing rules can only be based on the user-defined pages set up using the Pages tab of Profiler Manager.
To create routing rules, select the required profiler from Profiler Manager and click on the Routing tab. The Routing tab will be displayed with the pages listed down the left-hand side.
To create a new routing rule click on the page you want the rule to run on and then select New Rule from the toolbar.
The New Profiler Routing dialog will open.
At the top of the dialog box are the following fields:
Rule Name
This is a mandatory field and should contain a brief description of the rule. Rule names do not need to be unique.
Rule Page
This is a read-only field which displays the page name that the rule belongs to. The rule will run after the panellist has entered the fields on that page and pressed the Next button.
Route To
This is a radio button which allows you to select the page to which the profiler should route to if the rule is true. You can select one of the following options:
Select Page | Select a specific page from the dropdown list. By default this will show the next page in the sequence, but you can select another page from the dropdown list. The dropdown list will only show pages which come after the selected rule page in the sequence of pages. |
Finish | The profiler will route to the Finish page. |
Screened Out | The profiler will route to the Screened Out page. This option is only available for preRegistration type profilers and requires that the community website is set up correctly to make use of pre-Registration profilers. |
The bottom part of the screen is divided into two sections.
Profiler Preview
On the left-hand side is the Profiler Preview section which shows a summary of the pages in the profiler, and can be expanded to show the questions within the pages. The Profiler Preview is a useful reminder of the profiler layout when building routing rules.
The Profiler Preview can be hidden by clicking on the Undock button, and can be re-displayed by clicking on the Profiler Preview bar on the left-hand side of the screen. Hiding the Profiler Preview will stretch the Routing Criteria across the bottom of the screen.
Routing Criteria
On the right-hand side is the Routing Criteria screen. It is here that the rules are defined.
Creating a new rule
Rules are created based on questions from pages of the profiler. Rules are made up of one or more conditions. If there is more than one condition they will be joined with a logical operator, either AND or OR.
Conditions may also be grouped and the groups joined together with a logical operator AND or OR.
As an example we will set up a rule on Pets Profiler.
Example: Route to Cats Page based on region and pets type
To route from First Page to Cats Page if panellist lives in the South and has cats.
- From Profiler Manager, open the Pets Profiler and click on the Routing tab.
- Select the page from which the rule is to run, in this case First Page, and click on New Rule in the toolbar to open the New Profiler Routing screen.
- Enter the Rule Name Cats and live in South, select the default Route To radio button and select Cats Page from the dropdown list.
- To add a new condition, click on the Add button in the Question bar.
This will bring up the Select Question dialog.
- Expand First Page to see all the questions on the page, select Region and click OK. Only one question may be selected.
The New Condition dialog box will open.
- Accept the default option Question has a value, select South and click OK.
The first part of our routing criteria has been defined and looks as follows:
- To add the next part of the condition, click the Add button again. This will bring up the Select Question dialog.
- Expand First Page to see all the questions on the page, select Pets_Type and click OK.
- The New Condition dialog box will open. Accept the default option Question has a value and select Cats. Leave the default Option of All and click OK.
The second part of our routing criteria has been defined. The screen now looks as follows:
Notice that the Outer Group is set to AND which is what we want for this rule. Click on OK to leave Edit Profiler Routing. The new rule will be displayed under the page it belongs to.
At this point the rule has not been saved, so save the changes by clicking on Save before creating the next rule.
Now, when running the Pets Profiler in Q_Community, if the panellist has Cats and lives in the South they will be routed straight to the Cats Page from First Page (missing out the Dogs Page).
In this example the routing conditions are based on questions on the same page. Questions do not need to be on the same page as the routing rule.
Currently there is nothing to stop the user from basing a condition on a question which occurs on a later page. In this case, the routing will fail, as the question will not have an answer with which to evaluate the condition.
As another example, an additional rule could be set up on Cats Page to go straight to the Finish page when Cats Page has been completed. No conditions would need to be added to this rule. The routing criteria would look as follows:
When running the profiler, if the panellist lands on the Cats Page and clicks Next, they will be routed straight to the Finish page (missing out Hamster Page, Reptiles Page and Final Page).
Routing Condition Types
Depending on the type of questions selected in a condition, there may be a number of different options available.
Dates
If a date type question is selected (for example DateofBirth), the user may define the condition using the properties from the following dialog.
Users may select one of the radio buttons to define the condition required:
Field | Description |
Question value is | Define a condition based on a specific date. Choose from a dropdown list of Equals (default), GreaterThan or LessThan. Enter the required date either by typing it directly into the field or by clicking on the calendar button. If the condition should also include the date specified then the Inclusive box should be checked. (The Inclusive box is not available if Equals is selected). |
Question value between | Define a condition based on a range of dates. Enter the required start and end dates either by typing directly into the fields or by clicking on the calendar button. |
Question is missing a value | Define a condition based on the panellist not entering a value for this question. This will only be useful if the Date question is not set as Required. |
Negate | Define a condition which performs the logical operation NOT. Checking this box will negate the condition, that is, if the condition is True it will return False, and if the condition is False it will return True. |
Some examples of conditions based on Date of Birth.
Numeric Variables
If a numeric type question is selected (for example NoInHH), the user may define the condition using the properties from the following dialog.
Users may select one of the radio buttons to define the condition required:
Field | Description |
Question value is | Define a condition based on a specific value. Choose from a dropdown list of Equals (default), GreaterThan or LessThan. Enter the required value either by typing it directly into the field or by clicking the up/down arrows until the required value is reached. If the condition should also include the value specified then the Inclusive box should also be checked. (The Inclusive box is not available if Equals is selected). |
Question value between | Define a condition based on a range of values. Enter the required start and end value either by typing directly into the fields or by clicking on the up/down arrows until the required values are reached. |
Question value one of | Define a condition based on a selection of possible values. Enter the list of values by typing them into the field separated by commas. |
Question is missing a value | Define a condition based on the panellist not entering a value for this question. This will only be useful if the question is not set as Required. |
Negate | Define a condition which performs the logical operation NOT. Checking this box will negate the condition, that is, if the condition is True it will return False, and if the condition is False it will return True. |
Some examples of conditions based on NoInHH.
Text Variables
If a text type question is selected (for example Postcode), the user may define the condition using the properties from the following dialog.
Users may select one of the radio buttons to define the condition required:
Field | Description |
Question has a value | Define a condition based on one or more possible values. Enter the list of values by typing them into the field separated by commas. |
Question is missing a value | Define a condition based on the panellist not entering a value for this question. This will only be useful if the question is not set as Required. |
Negate | Define a condition which performs the logical operation NOT. Checking this box will negate the condition, that is, if the condition is True it will return False, and if the condition is False it will return True. |
Some examples of conditions based on Postcode.
Yes/No Variables
If a Boolean type question is selected (for example InternetUser), the user may define the condition using properties from the following dialog.
Users may select one of the radio buttons to define the condition required:
Field | Description |
Question has a value | Define a condition based on the value Yes or No. Select either Yes or No (default). |
Question is missing a value | Define a condition based on the panellist not entering a value for this question. This will only be useful if the question is not set as Required. |
Negate | Define a condition which performs the logical operation NOT. Checking this box will negate the condition, that is, if the condition is True it will return False, and if the condition is False it will return True. |
Some examples of conditions based on InternetUser.
Single Categoric Variables
If a single code type question is selected (for example Annual Salary), the user may define the condition based on properties from the following dialog.
Users may select one of the radio buttons to define the condition required:
Field | Description |
Question has a value | Define a condition based on one or more specific values. Select the required value(s) from the list. More than one value may be selected. |
Question is missing a value | Define a condition based on the panellist not entering a value for this question. This will only be useful if the question is not set as Required. |
Negate | Define a condition which performs the logical operation NOT. Checking this box will negate the condition, that is, if the condition is True it will return False, and if the condition is False it will return True. |
Some examples of conditions based on Annual Salary.
Multiple Categoric Variables
If a multiple code type question is selected (for example SundayNewspapersRead), the user may define the condition using properties from the following dialog.
Users may select one of the radio buttons to define the condition required:
Field | Description |
Question has a value | Define a condition based on one or more specific values. Select the required value(s) from the list. More than one value may be selected. As the panellist may choose multiple answers when running the profiler, choose an option from the dropdown list to define how the condition is to work: All (default) – Panellist reads all of the papers checked, and may (or may not) read some that are not checked. Any – Panellist reads any (at least one) of the papers checked, and may (or may not) read some that are not checked. Exactly – Panellist reads exactly the papers checked, and none that are not checked. None – Panellist reads none of the papers checked, and may (or may not) read some that are not checked. Only - reads any (at least one) of the papers checked, and none that are not checked. |
Question is missing a value | Define a condition based on the panellist not entering a value for this question. This will only be useful if the question is not set as Required. |
Negate | Define a condition which performs the logical operation NOT. Checking this box will negate the condition, that is, if the condition is True it will return False, and if the condition is False it will return True. Negate may only be selected if the option Question is missing a value is selected. |
Some examples of conditions based on SundayNews.
Grouping Conditions
When a condition is created it is created within an Outer Group. The Outer Group is set by default to use the logical operator AND, but may be changed to OR.
To make a change to the Outer Group click on Edit in the bar next to the Outer Group. This will bring up the Edit Group dialog.
The dialog box has the following fields:
Name
This is a mandatory field which contains the group name. By default this is set to Outer Group or New Group (when adding new groups – see later). The name may be changed to something more meaningful. Group names do not need to be unique.
AND/OR
This is a radio button which allows you to select the logical operator that is used for this group of conditions. By default it is set to AND.
Operator | Description |
AND | All conditions within the group must be True for the rule to be True. |
OR | At least one of the conditions within the group must be True for the rule to be True. |
Creating new groups of conditions
The user may add new groups of conditions to make a more complex rule using a combination of AND and OR logical operators.
To create a new group, select one or more conditions by clicking on the check box next to them and then clicking on Group in the Routing Criteria bar.
We will add another condition to our previous example and use grouping to change the logic.
Example: Route to Cats Page based on region, pets type and pets number
To route from First Page to Cats Page if panellist has cats and either lives in the South or has more than 5 pets.
- Add a new condition based on Pets_Number to our rule. Open the Pets Profiler, click on the Routing tab, expand the First Page to see the rule previously created, and click on the Edit Rule button.
This will show the definition of the rule we previously created.
- Click on Add in the Question bar to bring up the Select Question dialog.
- Select Pets_Number and click on OK.
The New Condition dialog will appear.
- Select the default option Question Valueis, select GreaterThan from the dropdown list and type in the value 5. Click OK.
The new condition has been defined and the routing criteria screen looks as follows:
Now we need to group the conditions based on Region and Pets_Number. To do this, select these conditions by checking the box next to them and clicking on Group in the Routing Criteria bar.
A new group called New Group will be created which may be expanded by clicking on the > next to it to see the conditions within it.
The new group can be edited to change the name to something more meaningful, and the operator can be changed to OR if required.
Note that the Outer Group still exists with the operator AND.
- To complete the example, change the logical operator of the new group by clicking on Edit next to New Group and changing the AND to OR.
The routing criteria screen will now look as follows:
Click on OK to return to Edit Profiler and click on Save to save changes.
Now when running the profiler, if the panellist has Cats and either lives in the South or has more than 5 pets they will go straight to the Cats Page from the First Page (missing out the Dogs Page).
Adding Conditions to Groups
As there are now two groups in our rule, if we want to add a new condition, we can either add it to the Outer Group or the New Group by clicking on Add within the relevant area of the screen.
Creating Groups within Groups
For more complex rules groups may themselves be grouped together. To do this, select one or more groups by clicking on the check box next to them and then clicking on Group in the Routing Criteria bar.
Deleting Groups and Conditions
To delete a condition click on the Delete button next to its name and it will be deleted.
To delete a group click on the Delete button next to its name and the group will be deleted, but the conditions will remain. The Outer Group cannot be deleted.
Sorting Routing Rules
If there is more than one rule on a page that is True, the first rule that evaluates to True will be used. To change the order that rules are evaluated within a profiler page, the Sort function on the Routing tab should be used.
From the Routing tab select the required page and click on Sort on the toolbar.
A dialog box will appear showing a list of rules for the selected profiler page.
To change the sort order, select one of the rules use one or more of the sorting options to move it up or down. Once you are satisfied with the order click on the OK button, or click Cancel to leave the order as it was.
To make the change permanent remember to click on Save before continuing. Rules will now be displayed in the new order on the Routing tab, and also be used in the new order when running the profiler in Q_Community.
Editing Rules
To edit an existing routing rule, select the rule from the Routing tab by expanding the page name to show the rules. Click on the rule and select Edit Rule from the toolbar.
This will open the Edit Profiler Routing dialog where changes can be made.
Deleting Rules
Rules may be deleted from a profiler page. Unlike profiler pages these are permanently deleted from the database and will not be available to restore later.
To delete an existing routing rule, select the rule from the Routing tab by expanding the page name to show the rules. Click on the rule and select Delete Rule from the toolbar.
The rule will disappear from the screen.
Rules may only be deleted one at a time.
Remember to save changes to the profiler by clicking on Save.