Creating a Metric for AWA Presence

JHufford
Mega Guru

We are using AWA and I need to track the amount of time our agents are Available. In the past I have been doing this by pulling an excel report from the awa_agent_presence_history table and running some calculations. Unfortunately this is not meeting our needs.

I've created a metric definition:

  • Name: AWA Agent Presence Duration

  • Table: awa_agent_presence_history

  • Field: Presence State

  • Type: field value duration

I've also duplicated the "metrics events" metrics business rule for the awa_agent_presence_history table (per Define a metric (servicenow.com) )

  • Name: Metrics Events AWA Presence

  • Table: awa_agent_presence_history

  • Application: global

  • Script: same as oob Metrics Events

I'm having trouble figuring out where this calculation is being recorded so I can report on it. Or if the metric definition even makes sense or is working at all. Does anyone have pointers to get me back on track?

We have another similar report that looks at the incident state duration so I've mirrored that one

  • Table: incident_metric

  • Type: Single Score

  • Aggregation: Average

  • Aggregated Field: mi_duration

  • Filter: Definition | is | AWA Presence Duration

  • Filter: Value | is | Available

This is reporting 0 - but I think that's because it's querying the incident_metric table. I dont think that's where any of this is being stored but I dont know where it is being stored or if it's even doing anything.

3 REPLIES 3

Tsura Andreeva
Mega Sage

I wonder if you need to create a table to store the new callculated records, you can take a look at your metric and see the records in the Metric Definition 

JHufford
Mega Guru

I'm able to see them in the metric_instance table but there is no end time captured and no duration calculated

Zac_R
Tera Contributor

Following this, I'd like this capability as well. 

For example something that shows Yesterday Agent Smith spent 1hr 23min on Available.

At the moment I can only find state changed. For example Agent Smith changed state at 12pm, and again at 1:23pm. No way to count the time in Available.