When Workers ("Agents") are deleted from TaskRouter, their historical data is preserved in Flex Insights. If a Worker is re-created with an identical name, duplicate Agent records may result in Flex Insights.
To minimize the impact of duplicate records on your reporting, a filter can be applied to display only "Active" Agents. This will exclude Agent data in the "Deleted" state.
Filtering is supported with:
- Dashboards
- KPIs
- Reports
Follow the steps below to apply the filter across each of these types.
Dashboards
Create a Custom Metric
A Custom Metric is required to implement the exclusion logic for Dashboards. If you need more guidance, consult our documentation for details on creating metrics.
Create a metric with the following MAQL:
In the following example, this metric is titled, "[Metric Filter] Active Agents".
Edit the Dashboard
- From within the Analytics Portal, navigate to your Dashboard with the Agent filter
- Click the gear icon in the top-right and select "Edit" from the drop-down menu
- Select the Agent attribute drop-down filter
- Click the first icon on the left
- Click on "Available Values"
- Add the custom metric created in the previous step ([Metric Filter] Active Agents)
- Click "Apply" to finish.
KPIs
- Navigate to your KPI dashboard
- Add a filter for "Agent State" attribute
- Select only "Active" from the options
- Click "Apply" to finish
Reports
- From within the Analytics Portal, navigate to your Report
- Select the "Filter" option
- Choose "Select from a List of Values (including date ranges)"
- Select "Agent State" as the attribute to filter
- Select only the "Active" state
- Click "Apply" to finish