Jump to content

First response time between ticket open and ticket response


Recommended Posts

Hi,

In the interest of sharing, I just thought I would share some code I have written to find out the amount of time it took to respond to a ticket, excluding and auto-response.

SELECT t.id AS TicketID,
t.title,
t.message,
t.status,
t.urgency,
t.date, ttr.tid, ttr.message, MIN(ttr.date) AS TicketReplyDate,
TIMEDIFF(ttr.date, t.date) AS FirstResponseTime
FROM tblticketreplies ttr
JOIN tbltickets t ON ttr.tid = t.id
WHERE ttr.message NOT LIKE '%Thanks for reaching out!%'
GROUP BY ttr.tid ASC

In addition to this, I also converted the FirstResponseTime to an integer within my reporting tool, this was outside of the SQL code:

FirstResponseDurationInMinutes = DATEDIFF('Support Ticket Response Times'[date], 'Support Ticket Response Times'[TicketReplyDate], MINUTE)
FirstResponseDurationInHours = 'Support Ticket Response Times'[FirstResponseDurationInMinutes] / 60

This is certainly a requirement in KPI reports we run, so hopefully someone finds this useful!

Nick

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated