time spent in public reply | Community
Skip to main content

time spent in public reply

  • May 27, 2021
  • 3 replies
  • 0 views

Can anyone help me create a metric to get the total time spent on a public reply?

3 replies

Andrei12
  • May 28, 2021

Hi @Modelle Noon B. Turrobia, 

You need to add a condition [Comment public] = TRUE to the metric Update handling time from this article https://support.zendesk.com/hc/en-us/articles/360022186134 Using this metric you can calculate time spent per update level for public comments only. 

Andrei Kamarouski | Pythia AI CEO


  • Author
  • May 28, 2021

@Andrei Kamarouski
Not sure if I got this right  - is it? 

IF ([Changes - Field name] = "Total time spent (sec)") 
THEN
IF ( [Comment public] = TRUE AND [Changes - Previous value]=NULL OR [Changes - Previous value]="")
THEN NUMBER([Changes - New value])
ELIF (REGEXP_MATCH([Changes - New value], "[0-9]+") AND REGEXP_MATCH([Changes - Previous value], "[0-9]+"))
THEN(NUMBER([Changes - New value])-NUMBER([Changes - Previous value]))
ENDIF
ENDIF

Andrei12
  • June 4, 2021

@Modelle Noon B. Turrobia, not really, you should add this to the first part of the formula. 

IF ([Changes - Field name] = "Total time spent (sec)" AND [Comment public] = TRUE) 
THEN
IF ([Changes - Previous value]=NULL OR [Changes - Previous value]="")
THEN NUMBER([Changes - New value])/60
ELIF (REGEXP_MATCH([Changes - New value], "[0-9]+") AND REGEXP_MATCH([Changes - Previous value], "[0-9]+"))
THEN(NUMBER([Changes - New value])-NUMBER([Changes - Previous value]))/60
ENDIF
ENDIF