Type an initial message and click Send to initiate a new support conversation.

Click the red End Chat button.

Click the link at the bottom of the window to rejoin the session.

In a new window, log in as the Agent and accept the Chat and send a message to the user.

Click the End Chat button to end the session.

Navigate to chat_queue_entry_list.do and open the record for that conversation.

Inspect the value of the Duration field.

If the field does not appear, you may have to add it to the form or list.

Note that instead of the duration of the record showing how long the agent has chatted with the end user, the duration will be something like 23:59:56, which is a whole day minus the time between the time the user left the chat and the agent accepted.

Workaround

As a temporary workaround, use the work_end field on chat_queue_entry, which correctly reflects when the conversation was closed. You can also edit the SNC - Chat Queue Entry Duration Business Rule to use that in any case where the closed_at is before the opened_at.

The edited script for the business rule is as follows:

(function executeRule(current, previous /*null when async*/) {

var dateDiff;var opened = new GlideDateTime(current.opened_at);var closed = new GlideDateTime(current.closed_at);