Skip to main content

$dialer.reportData

This method allows extending the call campaign report with arbitrary additional data.

Syntax

The method accepts three arguments.

ArgumentTypeDescriptionDefault value
headerStringColumn header in the report
valueStringColumn value for the current number
orderNumberColumn order0
$dialer.reportData("Client age", $client.age);
$dialer.reportData("Feedback", $parseTree.text, 1);

When the method is called, a new column titled as header gets added to the phone number and call attempt reports. The passed value is written in the cell corresponding to the current phone number.

Column sort order

The optional order argument determines how the new columns are arranged: they are sorted in descending order based on the value of order, and in alphabetical order when it is the same for multiple columns.

For example, the columns below with the following order values will be sorted like this:

SexFirst NameLast NamePatronymicAttitude to smoking
1000-1

How to use

tip
The method can be used for reporting any information that may be relevant for analyzing the campaign results: for example, the satisfaction rating or any negative feedback.

Consider the following example script of a survey:

require: name/name.sc
module = sys.zb-common

theme: /

state: Start
q!: $regex</start>
a: Hello! What is your name?

state: Name
q: $Name
a: Hello, {{$parseTree._Name.name}}!
script:
$dialer.reportData("Name", $parseTree._Name.name);
a: What do you think about smoking?

state: Smoking
q: *
a: Okay, I’ll put it down as “{{$parseTree.text}}.”
script:
$dialer.reportData("Attitude to smoking", $parseTree.text, 1);

After the script has been finished, the call campaign report will contain two additional columns, Name and Attitude to smoking, recording every client’s responses to the appropriate question.

The Attitude to smoking column will go first, since its order equals 1. The Name column has the default order value (0) and will be placed second.

caution
The total number of columns allowed for one campaign report is limited. Contact your account owner for further details.