Hi All,
We have an internal Excel tool that recovers suspended tickets using vba and WinHttp.WinHttpRequest.5.1
Following is the process that we follow:
1. - Read the tickets in the suspended queue (using a winhttp and .json url)
2. - fetch the json data for the suspended ticket (excel vba formula)
3. - grab the "author" details from the above json data (excel vba formula)
(Below is the text from API documentation to add this step:
Note: During recovery, the API sets the requester to the authenticated agent who called the API, not the original requester. This prevents the ticket from being re-suspended after recovery. To preserve the original requester, GET the suspended ticket before recovery and grab the author value.)
4. - recover the suspended ticket and pass on the "author" value as parameter (using a winhttp)
5. - get the recovered ticket number (excel vba formula)
We have successfully recovered 1000+ tickets, however, for less than 1% tickets we are facing the challenge (randomly in between without any pattern).
While recovering the ticket we pass on the author value as parameter and below is the code (step 4):
We have tried to resolve this for almost a month but in vein.
Q1 - Even though the author value is passed on as parameter why does the requester change to the user who called the API and not to the original requester. (for 1% of the recovered tickets)
Q2 - The API documentation says the the syntax for CURL is:
What is the significance of
Following is the Excel VBA code used by us:
Could you please help me with the above two questions.
We have an internal Excel tool that recovers suspended tickets using vba and WinHttp.WinHttpRequest.5.1
Following is the process that we follow:
1. - Read the tickets in the suspended queue (using a winhttp and .json url)
2. - fetch the json data for the suspended ticket (excel vba formula)
3. - grab the "author" details from the above json data (excel vba formula)
(Below is the text from API documentation to add this step:
Note: During recovery, the API sets the requester to the authenticated agent who called the API, not the original requester. This prevents the ticket from being re-suspended after recovery. To preserve the original requester, GET the suspended ticket before recovery and grab the author value.)
4. - recover the suspended ticket and pass on the "author" value as parameter (using a winhttp)
5. - get the recovered ticket number (excel vba formula)
We have successfully recovered 1000+ tickets, however, for less than 1% tickets we are facing the challenge (randomly in between without any pattern).
While recovering the ticket we pass on the author value as parameter and below is the code (step 4):
Code:
HTTPReq.send ({"author":{"id":null,"name":"Postmaster","email":"postmaster@em.ucla.edu"}})
This is done using "PUT" and "/api/v2/suspended_tickets/{id}/recover.json"
We have tried to resolve this for almost a month but in vein.
Q1 - Even though the author value is passed on as parameter why does the requester change to the user who called the API and not to the original requester. (for 1% of the recovered tickets)
Q2 - The API documentation says the the syntax for CURL is:
Code:
curl https://{subdomain}.zendesk.com/api/v2/suspended_tickets/{id}/recover.json \
-X PUT -v -u {email_address}:{password} -d '{}' -H "Content-Type: application/json"
What is the significance of
in the curl statement above?\ -X, -v, -u, -d
Following is the Excel VBA code used by us:
Code:
Set HTTPReq = CreateObject("WinHttp.WinHttpRequest.5.1")
HTTPReq.Option(4) = 13056
HTTPReq.SetTimeouts 120000, 120000, 120000, 120000
HTTPReq.Open "PUT", "https://{mydomain}.zendesk.com/api/v2/suspended_tickets/{suspended ticket id}/recover.json", False
HTTPReq.SetCredentials {userid}, {password}, 0
HTTPReq.setRequestHeader "Content-Type", "application/json"
HTTPReq.send ({"author":{"id":null,"name":"Postmaster","email":"postmaster@domain"}})
HTTPReq.WaitForResponse -1
msgbox HTTPReq.responseText
Could you please help me with the above two questions.