Flex Insights can be used to create custom metrics for tracking inbound and outbound call volume. You can define these metrics using MAQL to filter by call attributes such as direction.
Overview
Flex Insights categorizes calls using the Direction attribute. To report on inbound and outbound call totals, create custom metrics that filter the Conversations fact by this attribute.
Key fields
- Attribute: Direction (Inbound, Outbound)
- Fact: Conversations (unique count of conversations)
-
Attribute: Kind (use
Conversationto avoid counting segments)
What You Need To Know
Create an inbound calls metric
- Go to Analytics Portal > Manage > Metrics
- Click Create Metric
- Enter the following MAQL:
SELECT COUNT(Conversation) WHERE Direction = Inbound AND Kind = Conversation
- Name the metric Inbound Calls
- Click Save
Create an outbound calls metric
- Click Create Metric
- Enter the following MAQL:
SELECT COUNT(Conversation) WHERE Direction = Outbound AND Kind = Conversation
- Name the metric Outbound Calls
- Click Save
Build a report
- Go to the Analyze tab
- Add Inbound Calls and Outbound Calls to Metrics
- Add Date (Event) to View by to group by day
- (Optional) Add Agent to View by to segment by agent
Direction values
| Direction | Description |
|---|---|
| Inbound | Call initiated by a customer to a Twilio number associated with your Flex instance |
| Outbound | Call initiated by an agent using the Flex Dialpad or click-to-call |
Why filter by Kind = Conversation
A single conversation can include multiple segments (for example, queue or wrap-up segments). Filtering by Kind = Conversation ensures each call is counted once.
Troubleshoot missing outbound data
If outbound calls are missing or lower than expected:
-
Task attributes: Ensure outbound Tasks include
direction: outbound - TaskRouter: Outbound calls must be created as TaskRouter tasks to appear in Insights
- Data latency: Insights data has a 60 minute Data Refresh interval by default