How to add total time spent value via API
Posted Mar 11, 2022
Hi
I am using the time tracking app addon from Zendesk
https://www.zendesk.com/in/marketplace/apps/support/35111/time-tracking/
I really like the way the total time spent is tracked there. I am in the middle of a move from old system to zendesk ticketing system. In this partway move I need to use the old system to enter tickets, but a copy needs to be entered here in zendesk.
There lots of blockers preventing me from creating in zendesk ticket in the first place.
I am able to create new tickets via the API but unable to update Total time spent value.
I have reached out to support, and they requested me to raise a post here in the community.
I found a similar post but no reply there
How can I get the Total time spent value from time tracking App through API? – Zendesk help
Can anyone help me solve this problem? or provide an alternate way to track time spent working on a ticket.
0
1 comment
Abilash Amarasekaran
I got this working. Thanks to help from Jongun Woo for figuring out how to do it.
The Total time spent is treat as a custom field and has a unique value to it.
You can get the custom filed value using the GET ticket using the following API
Tickets | Zendesk Developer Docs
Or you can right click on the "Total time spent (sec)" column header in the tickets view and look for this value in the HTML code
The highlighted value is the custom field value.
Once you find it you can use the create ticket API and add in the custom value as shown here
Creating and updating tickets | Zendesk Developer Docs
One last thing is the value is in seconds so please enter the value in seconds.
3
Sign in to leave a comment.