Skip to main content

Timeline Formulas: Formula Metrics and Column Formulas on the Timeline Widget

Timeline Formulas: Formula Metrics and Column Formulas on the Timeline Widget

The Timeline widget draws one row per agent from the timelines Qvasa already collects: statuses, calls, chats, ticket assignments, replies and scheduled activities. Timeline formulas let you define your own rows and your own columns on top of them, so the timeline can answer the question your team actually asks, such as who is idle on a live channel and not working email? or what share of each agent's online time went to calls?

There are three pieces, and this article covers all three:

  • Formula metrics (sometimes called custom timeline metrics): a new timeline row built from existing rows with a short formula, such as online on messaging AND NOT in a chat AND NOT around a reply. Each one gets its own lane under an agent and its own colour.

  • A formula metric's columns: the numbers each agent gets from that row, such as its total time, how many stretches it had, or the longest one. A formula metric can carry up to 10 columns.

  • Column formulas: one value per agent computed from the timeline's other columns, such as idle minutes divided by online minutes, shown as a sortable, filterable column with a totals row.


Before you start

  • Two features must be on for your account: the Timeline dashboard widget and column formulas. If the Timeline metrics and Timeline columns tabs are missing from the Formulas page, contact Qvasa support to have them turned on.

  • You need a formula permission. The same two permissions that cover table column formulas apply here: Manage their own formulas lets you create formulas and change the ones you created; Manage everyone's formulas lets you change any formula on the account. Admins have both. Anyone can view the lists and use saved formulas on a timeline they can edit.

  • Each formula reads real data. A formula can only read timelines your account collects. The ready-made templates read default Zendesk statuses, work items (calls and chats), Zendesk replies and internal notes, and, for the schedule-based ones, a Workforce Management schedule with a Productive Work category and a Messaging activity.


Step 1: Create a formula metric from a template

Go to Settings, open the Formulas card, click the Timeline metrics tab, then Templates. Five ready-made formula metrics cover the most common questions:

  • Messaging idle: online on messaging with no chat offered or in session.

  • Idle, not on email: messaging idle, and not within a few minutes of writing a public reply or internal note.

  • Productive work while online on messaging: scheduled for productive work and online on messaging.

  • Out while scheduled: scheduled for productive work and online on no channel.

  • Conformance on messaging: scheduled for productive work on the Messaging activity and actually online on messaging.

Click the plus on a template. Qvasa saves it as a formula of your own, with Total time and Count columns, and opens it in the editor so you can rename it, change its colour or adjust the formula. If the name is already taken, the new one ends in - v2.


Step 2: Write your own formula metric

On the Timeline metrics tab, click New formula. The editor has four parts.

  • Details. A Name (required), a Label for what its stretches are called on the timeline (the name, unless you give another), a Colour for its lane, and a description.

  • Insert a timeline. The browser on the left lists every timeline the formula can read, grouped by metric, plus your other saved formula metrics. Search it, or type {{ in the formula box to jump to the search, and the row you pick is inserted where your cursor is.

  • Formula. Combine timelines with the functions under the box: AND, OR, NOT and CONCURRENT (how many of something is open at once, so CONCURRENT(chats) >= 2 is the time an agent had two or more chats going); AROUND, which turns a moment such as a reply into a range before and after it; LONGER_THAN, SHORTER_THAN and FILL_GAPS to shape stretches; OVERLAPPING and NOT_OVERLAPPING to relate two timelines; and WHERE to keep only stretches with a given attribute. Hover a function for its signature; click it to insert it. A formula can read other formula metrics, up to three levels deep.

  • The check. The editor validates as you type. A valid formula shows This formula is valid and lists the timelines it reads; an invalid one names the character and what to fix. Under it, What it does reads the formula back in plain words, Edge cases says how each function you used treats boundaries, and on an edit, What this edit reaches lists every widget and schedule row that uses the formula and whether it is still valid after your change.


Step 3: Give it columns

A formula metric is a set of stretches on the timeline. Its columns turn those stretches into one number per agent, which is what you sort, filter and roll up. Each column is one call of a column function over the formula's own stretches, written as {{this}}:

  • TOTAL_TIME and COUNT: a new formula starts with these two, as Total time and Count.

  • LONGEST, SHORTEST and AVERAGE_LENGTH: the length of the stretches.

  • SHARE: the stretches as a share of the date range, shown as a percent.

  • FIRST_START and LAST_END: clock times, such as when an agent was first out while scheduled.

  • IN_NOW and CURRENT_LENGTH: whether the agent is in a stretch right now and for how long, which only have a value while the date range includes now.

Click + Add a column for more, up to 10, and give each a name: on the widget its header reads Metric · Column, for example Idle, not on email · Total time. Admins can click Preview on the settings page to see the formula and its columns on up to five of today's agents; from a Timeline widget, the preview runs on that widget's first agents.


Step 4: Put it on a Timeline widget

Open a dashboard in edit mode and click Configure timeline on the Timeline widget. The Formula metrics section holds the formula metrics on this timeline: add a saved one from the library on the left, or click New formula metric to write one in place, with the same editor in a lightbox. On each card, tick the columns you want shown. The Formulas section below it lists the account's column formulas (Step 5) as toggles, and the Columns list on the right shows the order every column will take.

A timeline shows up to 5 formula metrics and 30 columns in all. Nothing changes until you click Save, which reloads the timeline to compute the new rows. On the widget:

  • Lanes. Expand an agent's row and each formula metric draws its own lane under the native ones, labelled by its label and in its colour.

  • Columns. Each ticked column is a column on the left, formatted by what it measures: durations as durations, shares as percents, clock times as times of day. Click a header to sort by it, highest first, then lowest first.

  • No value. A dash means the formula found nothing for that agent in the date range; hover it for the reason.


Step 5: Add a column formula

A column formula is arithmetic across an agent's columns: native ones such as Time online in Messaging, a formula metric's columns, and columns from metrics not on the widget. It gives one value per agent. Create one on the Timeline columns tab of the Formulas page, or from New column formula in Configure timeline, which saves it and places it on that widget in one step.

  • Formula. Pick columns from the Insert a timeline column browser and combine them: for example Idle, not on email · Total time divided by Time online in Messaging. Three templates come ready: Share of Online Time on Calls, Wrap-up per Call and Messaging Share of Online Time.

  • Show the result as a number, a percent, a duration or text, with the decimal places you want. An agent with no denominator shows a blank cell, never an error.

  • Rollup. Click + Add a rollup to give the column a totals row: pick a preset such as Total, Average or Median, or write a rollup formula, including one that combines the column totals. On the widget it sits in the sticky Rollups row under the headers and covers every agent the dashboard filters leave in, so a column filter never changes it.

  • Sort and filter. Click the header to sort, or its funnel to keep only agents above or below a value; the toolbar then reads Showing X of N agents.

The same editor builds column formulas on configurable tables; that side is covered in Column Formulas and Column Rollups.


Step 6: Show a formula metric on the WFM schedule timeline

Formula metrics also work as activity rows on the Workforce Management Schedule timeline, so a team lead can see, say, Out while scheduled under each agent next to the schedule itself. Open Activity rows, click Edit, then + Add formula metric on a row, pick the formula and set its filters. The lane appears under every expanded agent for everyone who opens the view, and its Total time and Count roll up on the row.


What done looks like

Your Timeline widget has a lane for each question that matters to the team, a column for each number you want to rank agents by, and a rollup row that gives the team's figure at a glance. Sorting by a column formula such as idle share puts the agents who need attention at the top, and a column filter narrows the timeline to only them.


Troubleshooting

  • The Timeline metrics and Timeline columns tabs are missing. The Timeline widget or column formulas are not turned on for your account; contact Qvasa support.

  • There is no New formula button, or a formula's name is not a link. You don't have a formula permission, or the formula was created by someone else and you can only manage your own. Clone it and edit your copy.

  • A formula can't be deleted. It is in use, and the message names where: another formula that reads it, a Timeline widget, or a schedule timeline row. Remove it from each of those first.

  • A template is refused. It reads a schedule category, activity or metric your account doesn't have. Build the formula from the timelines you do collect instead.

  • A column shows a dash for an agent. The formula found nothing for that agent in the date range, or the column only has a value while the range includes now. Hover the dash for the reason.

  • Limits. 5 formula metrics and 30 columns per timeline, 10 columns per formula metric, 12 column filters, and 500 formula metrics per account. At a limit the button that would exceed it is disabled and says so.

Did this answer your question?