Skip to main content

We know how to get the data into a report but how do we write customer calculations based on the data we have pulled from the global action sets and then manipulate it to form specific variables such as counts and percentages?

An example would be: If a customer queue time is >1 and agent active time for the specific call = 0 (or Null) then add one to an int variable called “Abandoned”. 

 

We would then want to report on the above variable “Abandoned” and use it in further calculations to work out SLA. 

Hi Kenosha,

In order to calculate a custom field value the selections that will make up the calculation must first be included in order to populate the field list in the Custom Fields definition - these fields do not need to be used in the output, however the usual T-SQL rules around grouping of selected columns will apply.

 

For your specific case, you can use two different ways to assign the “Abandoned” value to each record.

You may use the CASE function, or the IIF function - examples of both options are below.

 

CASE

CASE WHEN (Inbound_sys_INBOUND_CALL_RING_TIME >= 1 AND (Inbound_sys_INBOUND_CONNECTED_CALL_DURATION = 0 OR Inbound_sys_INBOUND_CONNECTED_CALL_DURATION IS NULL)) THEN 1 ELSE 0 END

 

IIF

IIF((Inbound_sys_INBOUND_CALL_RING_TIME >= 1 AND (Inbound_sys_INBOUND_CONNECTED_CALL_DURATION = 0 OR Inbound_sys_INBOUND_CONNECTED_CALL_DURATION IS NULL)),1,0)

 

 


Reply