So we have an inhouse time tracking app that does our billing. In that app we can put time in on any given day within the time period (even if that date has passed.) I have been tasked to figure out how we can have our time entries sent to ZenDesk when they enter their time in our inhouse app (we already do this with Azure Dev Ops so the users only have to enter time once.) Mainly because ZenDesk does not allow you to add a Date for what you are adding your time for.
Looking through your API I initially thought the ticket update PUT method would do the trick and the "update_stamp" field, that was not the case once I read what that field means. So perhaps the cleanest way (open to suggestions here) is to just add some metadata. This seems great as I can add a specific date and even an Id that ties back to our database!
What I am having difficulty with is how can I pull that out of the Audit data to show the date on my report in ZenDesk.
Here is a portion of what I see in the Audit json for a single ticket - look for Avantia Almanac below. The for_date field is what I would want to report on. Perhaps even the minutes_added (which I would make comparable to the custom_field for time tracking id=20629773663757):
{
"id": 20629773663373,
"ticket_id": 10,
"created_at": "2023-10-23T12:45:23Z",
"author_id": 20470818766989,
"metadata": {
"system": {
"client": "PostmanRuntime/7.33.0",
"ip_address": "54.86.50.139",
"location": "Ashburn, VA, United States",
"latitude": 39.0469,
"longitude": -77.4903
},
"custom": {
"origin": "Avantia Almanac",
"description": "Time entry",
"minutes_added": 15,
"for_date": "2023-10-20T00:00:00Z",
"reference_id": 234
}
},
"events": [
{
"id": 20629773663501,
"type": "Comment",
"author_id": 20470818766989,
"body": "Worked on the issue and figured it out",
"html_body": "<div class=\"zd-comment\" dir=\"auto\">Worked on the issue and figured it out</div>",
"plain_body": "Worked on the issue and figured it out",
"public": true,
"attachments": [],
"audit_id": 20629773663373
},
{
"id": 20629773663629,
"type": "Change",
"value": "1800",
"field_name": "20498642885645",
"previous_value": "900"
},
{
"id": 20629773663757,
"type": "Change",
"value": "900",
"field_name": "20498635630477",
"previous_value": "240"
},
{
"id": 20629773663885,
"type": "Notification",
"via": {
"channel": "rule",
"source": {
"from": {
"deleted": false,
"title": "Notify requester and CCs of comment update",
"id": 20470811394957
},
"rel": "trigger"
}
},
"subject": "[{{ticket.account}}] Re: {{ticket.title}}",
"body": "{{ticket.latest_comment_html}}",
"recipients": [
20504170294157
]
}
]
}
Any thoughts? Is this possible, is there a better way?