Stopping and starting the clock on a request via CRM Script

lock
push_pin
done
Answered
2

Hi All,

I am trying to stop the clock on a request, when an internal user replies to the request and Continue the clock when the customer replies to the request, either by email or by the portal.  Support have confirmed this cannot be done in the standard system, and have suggested that I might be able to do this via a CRM Script.

 

I assume I can use the "New internal message on request" and "New external message on request" events, to either start or stop the clock, but I cannot find how to stop and start the clock via CRM Script.  Is this possible to do via scripting?

 

Many thanks,

 

Trevor

12 Dec 2024 | 12:30 PM

All Replies (2)

Hi Trevor,

Hope you are well :-)  The issue with your question is really that "there is no clock". All we have got are datetime fields, and the difference between them. The built-in system measures how much time is spent in different statuses, and then whenever a status is changed, we calculate the time since last calculation, and add that difference to one of the counters (time_spent_internally, etc). So, if you use statuses, and just make sure you switch status for the two events you described, you should be able to get timings out of the box. For instance, if the request is in status "Waiting for internal answer", which should be configured to measure time in time_spent_internally, until the user replies, and then changes to e.g. "Waiting for customer", you should be able to measure the time spent correctly.

Sverre

 

13 Dec 2024 | 07:31 AM
Hi Sverre,

Thank you for your reply, hope you are well. So if I set the request to a status that has a "Track Time As" to "None" or "Externally", would that mean that the Escalation Levels would be paused, because I only want to escalate the request if the once the time spent internally reaches the time specified in the escalation event. Also does time spent "In Queue" affect the escalation levels.

Many thanks,

Trevor
17 Dec 2024 | 09:25 AM

Add reply