The data of a design
Each base type and each template reads exactly one query on the statistics — conversations, phases of conversations, agent actions or alarms, see Report designs. When a report runs, myContactCenter appends the chosen parameters to this query as filters and converts the times from UTC to the time zone of the report — see Time zones.
So build your evaluation on the query of the base type. You could create further data sources with Add Data Source, but neither the parameters nor the time conversion apply to them.
The field list
The Field List shows the data source, below it the query with its fields,
the calculated fields and the Parameters node. The fields carry the
technical names of the database, for example SkillName or
TotalWaitDuration; what they mean is described in
Statistics fields. A search box above the tree searches for
names.
- Flags such as
IsConnectedorIsAbandonedare 0 or 1. Their sum is therefore a count:sumSum([IsConnected])counts the connected conversations. - Durations such as
TotalWaitDurationare seconds.
Dragging fields onto the surface
| You drag | Result |
|---|---|
| a field onto an empty spot | a Label control that shows the value of the field |
| a field onto an existing control | the control now shows this field; with Ctrl, an additional control is created instead |
| several fields, selected with Ctrl | a table with one cell per field |
| several fields with the right mouse button | a table with the field names — the headings |
| a field with the right mouse button or with Shift | a menu in which you choose the type of control |
| a parameter from the Parameters node | a Label control with the value of the parameter |
The usual approach: the headings in the PageHeader, the values in Detail or in a group header.
Expressions
What a control shows is determined by its Expression. In the simplest case,
it is the name of a field in square brackets, for example [SkillName]; but it
can also calculate, compare and combine texts. Other properties can be
controlled by an expression as well, for example color and visibility — see
Colors by condition.
You open the expression editor via the “f” on the selected control, via the “f” next to a property under Properties or in the smart tag under Expression. It offers fields, parameters, functions and operators to click on and suggests matching items as you type. If something is wrong, it reports The expression contains errors.
| Building block | Notation | Example |
|---|---|---|
| Field | [Name] |
[TotalWaitDuration] |
| Parameter | ?Name |
?Culture |
| Text | in single quotes | 'Skill: ' + [SkillName] |
| Condition | Iif(condition, then, else) |
Iif([IsConnected] = 1, 'connected', 'not connected') |
| Empty value | IsNullOrEmpty(…) |
Iif(IsNullOrEmpty([SenderName]), [Sender], [SenderName]) |
| Date and time | GetHour, GetDayOfWeek, AddDays, … |
GetHour([ConversationStartTime]) |
| Numbers | Round, Floor, … |
Round([TotalConnectDuration] / 60, 1) — talk time in minutes |
| Total over a group | sumSum, sumCount, sumAvg, … |
sumSum([IsConnected]) — see Summaries |
Calculated fields
A calculated field is a field that you calculate yourself: it has an expression and can then be used like any other field — displayed, grouped, sorted, filtered.
- Click Home › Data › Add Calculated Field, or right-click in the Field List and choose Add Calculated Field.
- Select the new field in the Field List and, under Properties, enter
a Name and the Expression, for example
GetDayOfWeek([ConversationStartTime])for the weekday.
In the Field List, a calculated field appears with “Report” in front of its name, for example “ReportWeekday”. So choose the name so that it makes sense when read like this.
Your own parameters
The base types include the parameters that myContactCenter knows — period, skills, languages, agents, time base and the others under Parameters. myContactCenter recognizes them by their name. So do not rename or delete them; otherwise they lose their effect.
You create your own parameters with Home › Data › Add Parameter. In the Add New Parameter window, you assign a name and type, a default value and, if necessary, a list of the allowed values. The following applies:
- As the label in the Parameters pane, myContactCenter shows the name of the parameter; it replaces a description of your own when the design is loaded. So choose a name that works as a label — consisting only of letters, digits and underscores.
- Your own parameter does not filter in the query. If you use it in the filter of the report, it affects the rows that have already been loaded for the period — see Filtering.
The period in the report
The templates show “Report contains data from … to …” at the top. Behind this
is a calculated field named _HeaderExpressionName, which myContactCenter
fills with the period before each run — in the local time and the language of
the report. How to add it to a design of your own is shown in
Header with the period.
What myContactCenter prepares when running
When a report runs, myContactCenter prepares some values itself so that they are readable:
| What | How it appears |
|---|---|
| Expressions with a field whose name contains “Duration” | as a duration, for example 00:03:25, instead of a number of seconds — including totals of such fields |
| Fields whose name contains “StartTime”, “EndTime” or “Time” | as a date or as a date with time |
| Conversation type, state, channel, trigger, assignment type, disconnect reason | translated into the language of the Culture parameter |
| Charts with a time axis | unit and interval of the axis follow Time group base and Time group count |
| Charts in a group header or group footer | show only the data of their group |
This applies to Label controls, table cells and charts that lie directly in a band, and only as long as the control has no format string of its own. Controls in a Panel, in cross tabs, sparklines, gauges and sub-reports are not prepared: there, durations remain seconds and conversation types remain untranslated.