Rate this page:

Automated telephone surveys and notifications

Building automated telephone surveys and notifications has never been easier - with VoxImplant you can build even complex scenarios in minutes. A special feature called CallLists should be used for that purpose. Every record in a CSV file is sent with the CreateCallList request will be processed with a VoxEngine scenario, the result can be stored and accessed using the GetCallListDetails method of the HTTP API.

The process can be divided into a few parts: 1. Creating a CSV file with the list of phone numbers and additional data that can be passed to a scenario 2. Creating a Voximplant application with a scenario that will process every line of the CSV file and a rule for this scenario 3. Making a request to the HTTP API to start automated calling process.

Designing CSV-file structure

First of all, you need to design your CSV file that will be sent to HTTP API, its data will be passed to VoxEngine scenario as customData in form of a JSON-string, that can be converted into a JavaScript object. The first line of the file will contain parameter names, let's see the example for sending automated notifications about the scheduled appointment:

John;Snow;16501234567;November 15th
David;Ericsson;16501234568;November 16th

The CSV-file contains names of the callees, their phone numbers, and appointment dates; the first string describes parameter names.

VoxEngine scenario

Ok, we have our CSV-file design, now we can create VoxEngine scenario that will process every string of the file and make a call and depending on the result report to CallList processor if we can consider this call successful or not. If we report that it wasn't successful CallList processor can try again after some time (that can be set in HTTP request).

Scenario code

Scenario code

Save the scenario, create VoxImplant application and application rule that will attach the scenario to the application. No need to change the Pattern field - it's not used when the scenario launched via HTTP request.

Launching automated dialing via HTTP API

API method to launch dialing is described in the documentation, let's take a look at the parameters:

  • account_name — your VoxImplant account name
  • api_key — your VoxImplant API KEY
  • rule_id — id of the application rule that has the assigned scenario
  • priority — dialing priority, if you have more than one CallList
  • max_simultaneous — maximum number of simultaneously processed records from CSV file
  • num_attempts — number of dialing attempts, new attempt will happen in case of CallList.reportError
  • name — CallList name, useful to differentiate different CallLists from each other
  • file_content — CSV file should be sent in the request body
  • interval_seconds — time for the next attempt (in seconds)
  • encoding — CSV file encoding, should be specified if different from UTF-8
  • delimiter — CSV file columns delimiter, default is ; The getCallListDetails request result will look similar to (if calls were connected successfully):
November 15th;John;16501234567;Snow;;;"{""result"":true,""duration"":27}";"2014-11-24 19:21:39";1;2;Processed
November 16th;David;16501234568;Ericsson;;;"{""result"":true,""duration"":20}";"2014-11-24 19:21:39";1;2;Processed

What about surveys?

Ok, now we know how to make telephone notifications, but what if we need to make a telephone survey? It's rather easy to change the scenario we created before to start collecting data from callee input - we will modify handleCallConnected, handleCallDisconnected, and will add a new handleToneReceived function:

Telephone survey

Telephone survey

Here is the result:

John;16501234567;Snow;;;"{""result"":true,""duration"":27,""rating"":""3""}";"2014-11-24 20:17:13";1;2;Processed

You can always use the ASR module to let your customers answer using voice or make calls via your SIP infrastructure by changing the callPSTN function to callSIP one. Don't forget that you can also make HTTP requests right from the scenario to pass the data to your backend in real-time. Feel free to change the scenarios according to your needs.