Flex Insights workspaces can scale over time in size (amount of data stored), users, dashboards, reports and metrics. That being said, performance can become an important factor to be considered with growing continuously workspaces. As your workspace grows, dashboards and reports may seem to begin taking longer times to load, navigate, or even timing out. This guide describes several practices we recommend applying to your Flex Insights workspace in the Analytics Portal, even before you start having performance issues. These have been provided by our third-party data analytics vendor and proved being effective by own experience.
General guidance
To the extent possible, we recommend all users take the following steps:
- Maintaining your workspace clean from excessive amount of unused reports, dashboards and users. Avoid using multiple reports or dashboards that produce the same information.
- Preventing many users from repeatedly running the same reports/dashboards. Use email distribution preferably.
- Using filters to limit the amount of information retrieved, e.g. Date: Today, when no past information is needed.
- Keeping an eye on users retrieving unnecessarily frequent and excessive amount of data via Insights API.
Next, some specific actions you can take in order to improve performance:
Data Refresh interval
New data is ingested into your Flex Insights workspace every 60 minutes by default. The product works in a way that all computed reports are cached, and any subsequent computation just loads the cache (to some degree of variance inflicted by various filters). However, when new data is loaded, these caches are cleared and thus all the results need to be computed again.
In workspaces ingesting data every 15 minutes, many resources are dedicated to re-caching any report being repeatedly run by users. We recommend to keep data refresh interval to 60 minutes as Flex Insights is not designed to be used as a real-time monitoring tool.
Reports and Metrics
Avoid using the IFNULL function in custom metrics when possible. If you use IFNULL for a math operation in your metric, e.g. replacing a null value with 0 in order to force a value in a division, IFNULL is the correct way. If you use IFNULL only to visualize 00:00 (or another value) in a metric instead of empty, you can achieve this in the Metric Format editor as "[=null]00:00". Learn more about metric formats in Twilio Docs.
Try to avoid using Ranking and Statistical functions within MAQL statements, they are computationally heavy, especially when being run against a big data volume. In general, if you are struggling with building a metric where you need to use complex calculation logic, consider adding this data as a custom attribute or metric through the Flex Plugin.
Use relevant data points. For instance, when reporting Workload metrics (e.g. Workload Activity Time), use Workload-based attributes only: Date - Workload, Interval 15 Minutes - Workload, Time Workload, Workload Activity, etc. Also, Workload-based metrics should not be used alongside with similar available Conversation-based metrics (e.g. "Workload Activity Time" vs. "Activity Time"). Mixing up unrelated datasets will produce incorrect results and will cause complex calculations, resulting in long rendering time and unnecessary usage of resources.
Table reports require more computational power because they provide finer levels of detail. The more attributes and metrics you use in the table report, the longer it will take to render it.
Dashboards
Try no to use too many dashboard tabs (over 10). Each dashboard tab should not contain more than 8-10 reports. Merge reports on tabs where possible if they do not provide significantly different insights compared to the report next to it. Start with high-level KPIs at the top of the dashboard and move to more granular details down the dashboard.
Avoid using extremely wide table-type reports in dashboards. Keep these as raw reports that are not needed to be loaded too frequently.
Dashboard Filters
By default, every time to change a filter value, it will automatically run the dashboard. For dashboards with many filters, use filter grouping by adding the "Apply" button, so the dashboard will only run after selecting values for all filters and hitting the button. In your dashboard's Edit mode, go to Filters and select Group. Check all filters that should be grouped and apply. A draggable "Apply" button should show up, which you can position at your convenience.
If you use a high-cardinality attribute (500+ distinct values, like TaskSID or segment ID) as a dashboard filter, it’s recommended to narrow down the list of available filter values, so they load faster. You can use one of the following strategies:
Add a Parent filter. To short-list available values in the filter, you can ask your end users to select another filter first. For instance, this could be Queue, Direction, Team Name or Date. It could be helpful to include text guidelines next to the filter, something like, “Please select queue or team name before searching for the Task SID” so users actually make that important step.
In order to add a parent filter, in your dashboard's Edit mode, select the filter and click on the configuration icon. Navigate to Parent Filters tab, click Add Parent Filter and select the desired attribute. Apply and save the dashboard.
Add a Metric filter to your filter in order to restrict values. You can pre-filter values using the condition in the metric. Potential use cases are: show most recent value, i.e. last 30 days; exclude unnecessary segment kinds, etc. Here’s an example of a metric that limits segment attribute values to those created in the last 30 days:
Once you have the metric created. In your dashboard's Edit mode, select the filter and click on the configuration icon. Navigate to Available Values tab, click on Add Metric and search your filtering metric. Apply and save the dashboard.
If you need help with slowness in your workspace, please contact Support or reach out to our team of experts to optimize the dashboards design.