Difference between revisions of "Script on Cati call"

From Catglobe Wiki
Jump to: navigation, search
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category:Questionnaire_Functions]]
+
[[Category:CATI_module]]
 
= Script on Cati call =
 
= Script on Cati call =
 
Add the ability to call a script after each time a number has been dialed, also set via the cati settings. This will allow us better control of when to do various stuff, and also allow custom logic for some cases... e.g. in the rerecruitment we can say that when it reach the maxdial status, then we opt people out of panel. Or we can send SMS to people with answering machines that we will call them back.
 
Add the ability to call a script after each time a number has been dialed, also set via the cati settings. This will allow us better control of when to do various stuff, and also allow custom logic for some cases... e.g. in the rerecruitment we can say that when it reach the maxdial status, then we opt people out of panel. Or we can send SMS to people with answering machines that we will call them back.
Line 6: Line 6:
 
The script gets the following parameters:
 
The script gets the following parameters:
  
1. The current cati contact in same format as returned from CATI_getCATIContacts
+
1. The current cati contact in same format as returned from [[CATI_getCATIContacts]]
  
 
2. Times called
 
2. Times called
Line 13: Line 13:
  
 
== Setup ==
 
== Setup ==
Define script at CATI setting on Fieldwork management:
+
Define "Script to execute after call" at CATI setting on Fieldwork management:
  
 
[[File:2018-05-23_15-25-57.png]]
 
[[File:2018-05-23_15-25-57.png]]

Latest revision as of 11:22, 18 November 2021

Script on Cati call

Add the ability to call a script after each time a number has been dialed, also set via the cati settings. This will allow us better control of when to do various stuff, and also allow custom logic for some cases... e.g. in the rerecruitment we can say that when it reach the maxdial status, then we opt people out of panel. Or we can send SMS to people with answering machines that we will call them back. It should be noticed that the calling of this script is on the critical path, and must therefore be severely restricted in the amount of work done, ie in the case of sending SMS, the only thing the script should do is add respondent to a group and another script scheduled to run e,g. every 30 min takes care of the actual sending of SMS.

The script gets the following parameters:

1. The current cati contact in same format as returned from CATI_getCATIContacts

2. Times called

The current user context is set to the user of the qas, and the qas context is the dialed qas.

Setup

Define "Script to execute after call" at CATI setting on Fieldwork management:

2018-05-23 15-25-57.png


Script on Workflow:

array a = Workflow_getParameters();
array currentCatiContact = a[0];//same format as returned from CATI_getCATIContacts
number timesCalled = a[1];
....

2018-05-23 15-39-30.png