In this article
This part of the documentation explains technique of usage of different actions.
Restore previous call attributes
You may need to restore attributes of a call which were removed in the result of some event. The Call Extended Status, Priority, User Assignment, the Time to Call and other call and interview attributes can be among them. This may happen, for example, when a call is assigned the "Returned Not Dialed" or "Returned Dialer Expired" extended status where calls are returned from a predictive dialer call queue.
Certain situations may require re-using these call attributes. The CATI Supervisor module provides the means to restore them and to automate this procedure.
There is an action called "Restore previous call attributes" which can be used to this end in the appropriate scheduling script . There is also a similar function that you can use in a custom script.
When a scheduling script action is used, all attributes of the calls which match the criteria specified in the scheduling script (by way of applying filters and adding the required action to the desired sub-rule) will be restored.
The same happens when you create and run a custom script containing the "Restore previous call attributes" function. The main difference from the scheduling script action is that custom script allows you to create more complex and versatile condition for executing the function or, in other words, more precise filters.
To restore call attributes using a scheduling script action
- Create a new or start editing an existing scheduling script pertaining to the survey containing calls which attributes you are going to restore.
- Pinpoint the desired rule or sub-rule you would like to add the "Restore..." action to. Pay attention to the sequence in which rules, sub-rules and sub-rule actions are executed - attribute restoring should be executed only for calls which require this action. Add the "Restore previous call attributes" action to the desired scheduling script sub-rule.
- The "Restore previous call attributes" action has no configurable parameters so you do not have to adjust anything else.
- Save the scheduling script.
- Insert the following code snippet at any possible place inside the custom script you are editing, and save this script. The custom script may consist of this function alone.
- Specify all the required conditions (appropriate variable names, other parameter values which will trigger the function execution) by adding them to the script.
- Save the custom script.
- Add the Run Custom Script action to the scheduling script. Specify the name of the function (MyFunction in the above example) as a parameter of the Run Custom Script action. See the picture below for an example.
- Please take into account the sequence of rule, sub-rule and action execution - the Custom Script action which calls the appropriate custom script and executes the RestorePreviousCallState function should be specified for the appropriate sub-rule (all other existing rules/sub-rules/actions should be taken into account).
You can create a filter for the action you add: this way you can specify the condition which the call should match for its attributes to be restored (this can be a particular extended status or any other parameter value which triggers the "Restore..." action).
An example of the scheduling script using the "Restore previous call attributes" action is shown below.
Figure 1 - An example of scheduling script containing the "Restore previous call attributes" action
Pay attention to sub-rules 1.5, 1.6 and 1.7. All these sub-rules use the "Restore previous call attributes" action to restore attributes of calls after they were assigned different extended statuses. We can see that this action is applied to calls with "Returned Not Dialed", "Returned Dialer Expired" and "Terminated" statuses. You can also see that other actions will be applied to these calls after their attributes are restored: sometimes it is needed to tailor the restored call attributes for a new interviewing round.
To restore call attributes using a custom script function
Figure 2 - In the above example the function we have specified in the script is called "MyFunction".
Figure 3 - An example of the scheduling script containing a reference to the custom script
Pay attention to sub-rule 1.5. This sub-rule uses action which calls the custom script with the name "MyFunction".