Level up your Twilio API skills in TwilioQuest, an educational game for Mac, Windows, and Linux. Download Now


Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Flex WFO: Analytics Data Model Caveats

Flex WFO Analytics Data Model was designed for ease of use and maximum performance. There are a few things to be aware when working with measures and attributes.

Activity and talk time in intra-day segmentation

Activity Time and Talk Time are attributed to the period in which they started.

This may cause artifacts when slicing these measures by 15-minute, 30-minute, or hourly intervals, especially over-reporting and under-reporting Activity Time in the individual time intervals. Although daily reporting may also be affected, it is less common as agents usually do not spend time overnight in other activities than Offline.

The chart below shows how the activity time is attributed to time intervals within a day.

Notice that the activity is reported in the time when it started. Also, note that the time intervals following the activity may have zero activity time or activity time may be lower if the beginning of the interval is attributed to the previous activity.

image (27).png

Agents and supervisors datasets

Agents dataset and Supervisors dataset may contain people you do not actually consider agents or supervisors.

  • Everybody who ever handled a conversation is present in the Agents dataset.
  • Everybody who ever assessed a conversation is present in the Supervisors dataset.

This means that one person can be in both the Agents and Supervisors datasets. For example, when agents rate their own conversations, they are in both the datasets.

Handling Team versus Agent Team

When reporting by teams, make sure you pick the right team to segment or filter the data.

As agents can move between teams over time, reporting by their current team can be very inaccurate and may skew historical team statistics in some cases.

  • Handling Team - The team in which agents were when handling a given conversation. This is usually the right team to use for reporting as it keeps data related to a team even after the agent moves to another team. It also prevents agents from bringing historical data from the previous team, thus influencing the new team.
  • Agent Team - the current agent's team.

Non-conversation segments

In most cases, Segments represent an actual conversation between customers and agents. However, to make analytics simple and at the same time provide a detailed level of conversation structure, we use non-conversation segments (Queue, Agent Status, Missed Conversation, Rejected Conversation) to enable having more side-by-side data.

Non-conversation segments should not influence your measures reporting as they have empty values in all relevant measures. However, sometimes when you see non-conversation segments, you may wish to filter them out explicitly.

Queue type segments are present in every conversation, but in order to avoid double-counting, you may want to exclude those.

A measure like the following may include segments that are not related to any conversation:


The below measure will consist of only the segments that are related to an actual conversation:

SELECT COUNT (Segment) WHERE Kind = Conversation

Non-conversation segments have the most empty measures and attributes. This means that filtering by other attributes will also filter out non-conversation segments. Aggregation functions also filter out empty values. All the measures below will exclude non-conversation segments:

SELECT COUNT (Segment) WHERE Abandoned = No
SELECT COUNT (Segment) WHERE Wrap Up > 0
SELECT AVG (Talk Time)

Internal conversations

In internal conversations, the calling Agent is represented in the Customers dataset.

Agents in a Customers dataset have attribute Type equal to Agent. You can filter out Agents from the Customer dataset with the following condition:

SELECT COUNT (Customer) WHERE Type <> Agent
Rate this page:

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.