Updated: Sept 26, 2015
There a few techniques to achieve Aging reports (calculating duration between two time points) for Service scenarios.
Starting in 1508 there are some key enhancements to the main "Ticket" data source that will allow you to configure Aging reports.
In the Ticket data source you will find the following key figures:
Notice that we include "Today" as a key figure. We included this key figure so you can create a custom calculated key figures where you can use "Today" - "Timepoint" to calculate a duration in Days. The Ticket has standard timepoints that represent specific time stamps that a ticket always goes through in this lifecycle sequence which mirrors the ticket status lifecycle:
1. Posted On (Reported On- when the issue is reported)
2. Created On (sometimes the ticket was created in an external system and via API/migration the ticket has a Created On date after the Reported On date)
3. Initial Review On (when the ticket is set to In Process status)
6. Completed On (when the ticket is set to Completed status)
7. Closed on (when the ticket is set to Closed status -> you can set a completed ticket to closed via the time based workflow engine to prevent any change to the ticket)
Anytime during the above lifecycle after a ticket is in process and prior to a completed ticket can go into:
a. Escalated "state" which the Escalated On timepoint is captured
b. Arrived On (when the technician has arrived on site and has captured an on site arrival time)
c. Resolved On (when the technician/agent has resolved the issue)
d. Changed On (when the ticket was last saved)
Today based age duration is usually relevant only for tickets that are not completed in closed status (you usually measure age for SLA compliance for tickets that are either in open or in process). Thus you will take an extra step to create a restricted key figure on the calculated key figure to only capture an Age duration for tickets in status in process or open to filter out tickets that are completed or closed.
All the above examples only work with duration calculations in days. C4C analytics can only calculate duration between Dates and Integers/Decimals. If you need to calculate age in minutes/seconds, you will need to do the following options:
Option 1: export the data into excel and use the timepoints to calculate the diff of Date/Time in excel
Option 2: use standard age key figures in seconds for a few standard duration scenarios such as
Total Time at Requestor (aggregate duration in seconds that a ticket is in customer action)
Total Time at Processor (aggregate duration in seconds that a ticket is in processor action)
For the standard durations that are in seconds, you can configure a custom key figure to calculate the duration in hours, days, etc... using simple math of Total Time at Processor (seconds) / 3600 = Total Time at Processor (hours)
Option 3: add Integer or Decimal fields to the Ticket, and using workflow engine field update rules to capture each timepoint as a UNIX EPOCH timestamp (these are counter based timestamps that increment from 1970 and beyond).
At a high level do the following
1. Add a decimal extension field to the BO (the decimal field is used to store a UNIX EPOCH time stamp)
2. Create a field update workflow rule that will populate this extension field the EPOCH Time in the extension field (This has been available since 1505 as a key user activity).
3. Add a calculated extension field if you want to calculate a duration between two decimal extension fields
4. Add key figures into analytics to do reporting
Then you can decide how to do durations. Duration can be calculated either in analytics (run an analytical report which will calculate duration when the report is run) or stored as a calculated field on the BO. The former is good for compliance/KPI reporting, such as give me distribution of tickets with a duration, counters on specific durations, etc... The later is good if you need to drive a workflow process from the duration (when the duration exceeds a threshold, then trigger a workflow to do something else)
To calculate duration in the BO as a calculated field, create a calculation rule where you subtract one decimal field from another field (similar to how you would do this in analytics).