Recent searches


No recent searches

Can't solve the ticket using zendesk api



Posted Mar 07, 2022

Hello,

I have successfully tested the Zendesk API a few weeks ago (specifically adding the public and/or internal comment as well as solving the ticket).

An example of a request payload will be

{'ticket': {'comment': {'body': '<comment string>', 'public': True}, 'status': 'solved'}}

Note that this worked perfectly a few weeks ago. Now that I am testing it again - the API works when 'status' element is not passed in (ie. I was able to add a comment but can't solve the ticket regardless of whether there's an assignee or not -- I also tried to solve the ticket without adding a comment and that also failed).

Looking at the request status logs, I am getting a 422 which is weird because this worked flawlessly a few weeks ago. Any idea what could be the issue?

 

Thanks!


0

5

5 comments

image avatar

Greg Katechis

Zendesk Developer Advocacy

Hi Mario Wijaya! If you're receiving a 422, it means that there is likely a ticket field that needs to be updated before solve. Since you already mentioned that the tickets had assignees, I won't recommend that, but that would be another reason that you would receive a 422. Is it possible that you added any tickets fields that needed to be filled out before solving since you last checked?

1


Hi Greg,

Thanks for the information. You are right - I was able to resolve by looking at the required fields to be filled.

Thanks,

 

Mario

0


image avatar

Greg Katechis

Zendesk Developer Advocacy

The only system ticket "fields" that are required by Zendesk are the Subject field (which is required on creation and not solve, so kind of a moot point here) and the assignee field. However, you can enable custom fields to be required upon solve, so have you or your team recently added this requirement to any fields/created new fields? For more information on this, take a look at this article.

1


Greg Katechis Hi Greg!

Is there a way using api/json to pass-by the custom fields requirements?

Like a custom syntax?

Triggers do pass-by the custom fields requirements..

Best regards,

Raphaël

 

 

0


image avatar

Greg Katechis

Zendesk Developer Advocacy

Hi Raphael! There is currently no way to bypass this with the API. I believe that the reason that this behavior is different with triggers is because it hooks into a lower level path in our stack that allows the call to get around the requirement. Any API request will have to include any ticket field requirements that are not already filled out, if the request is also attempting to solve the ticket.

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post