Flex Insights (also known as Historical Reporting) is currently available as a public beta release and the information contained in the Flex Insights documentation is subject to change. This means that some features are not yet implemented and others may be changed before the product is declared as generally available. Public beta products are not covered by a Twilio SLA.
Any reference to "Historical Reporting," "Flex Insights API," "Flex Insights Historical Reporting," or "Flex Insights Historical Reporting API" in the Flex Insights documentation refers to Flex Insights.
Use the Number format editor to configure how numbers appear in your reports. You can round numbers, accommodate regional settings, add currency symbols, adjust colors, or append numbers with sets of characters.
To access the Number format editor, click Edit in the Detail column of a metric.
Then apply formatting syntax in the custom number formats field.
You can use built-in templates for number formatting, or any of the examples below by copy-pasting this sample code directly into your number format editor:
Raw integer number:
0
Natural integer with thousand separators such as 1,234
or 12,345,678
:
# ,##0
One decimal number with thousand separators (1,234.5
):
# ,##0.0
Two decimal number with thousand separators (1,234.56
):
# ,##0.00
This shortens large numbers and makes them easier to read - for example, 4.6B``5.8M
, 145.4K
. Numbers below one thousand are shown as exact integers.
General purpose large number:
1[>=1000000000]#,,,.0B;2[>=1000000]#,,.0M;3[>=1000]#,.0K;4[>=0]#,##0;5[<=-1000000000]-#,,,.0B;6[<=-1000000]-#,,.0M;7[<=-1000]-#,.0K;8[<0]-#,##0
Duration format will take a number (in seconds) and show it in hours, minutes, and seconds.
Duration in hours will look like 1h 23:45
or 12:34
when shorter than one hour.
1[>=3600]{{{3600||#}}}h {{{60|60|00}}}:{{{|60|00}}};2[>=0]{{{60|60|00}}}:{{{|60|00}}};3[<0]-{{{60|60|00}}}:{{{|60|00}}};
Percentages convert numbers in the range 0.0
to 1.0
into the more natural percentage format 0%
to 100%
. Use the below samples for the format you need.
Integer percentages:
0%
One decimal percentages:
0.0%
Two decimals percentages:
0.00%
You can use web colors to change the text and background color in your Flex Insights tables. You can use HTML color codes to adjust your colors.
You may wish to use the same color with the same measure to help your users quickly orient in a table. You can also combine colors with conditional formatting to change color depending on the value of a measure.
The example below shows how to set the same color for the measure text, in any situation:
[color=fecdd2]0;
The example below shows how to change the background cell color of a measure.
[backgroundcolor=fecdd2][color=b71c1c]0;
You can show different number formats depending on the value of the measure. This allows you to show positive/negative number differently or handle special cases.
To format numbers, set your conditions in square brackets followed by the format and separated by a semicolon from the next format. The first condition that matches will be used. We recommend that you include a default value at the very end.
The following example shows how to display dash when there is no value for the metric.
1[=null]—;20
The example below shows that you can use custom text instead of the original value like the "zero" in the example below.
1[=null]—;2[>0]0;3[=0]zero;4(0)
When you use conditions for percentage measures such as Abandoned Conversations %
or Silence %
, use decimal numbers instead of percents, e.g., use 0 instead of 0% and 1 instead of 100%. The example below shows a condition for more than 10% and more than 5%.
1[>0.1]Over ten percent;2[>0.05]Over five percent;3Under five percent
When you use conditions for duration measures such as Talk Time
or Activity Time
, use seconds in the conditions.
The example below shows a condition for one hour (3600 seconds) and a condition for one minute (60 seconds).
1[>3600]Over one hour;2[>60]Over one minute;3Under one minute
For more advanced number formatting techniques, please see the following articles: