Interrupt ticket submit | The place for Zendesk users to come together and share
Skip to main content
Question

Interrupt ticket submit

  • August 17, 2022
  • 5 replies
  • 0 views

Thomas38

Hi,

I’m trying to figure out a way to interrupt the ticket submission until the agent fills out a few fields in a modal, is that possible somehow?

The modal opens when a ticket is submitted as solved, and supposed to interrupt the submitting until the agent clicks a submit button in the modal. I’ve tried using save hook events (https://developer.zendesk.com/api-reference/apps/apps-support-api/ticket_sidebar/#ticket-save-hook-events), but can’t quite figure out how to make it work.

Any hints would be much appreciated!

5 replies

Oleg13
  • August 17, 2022

Hey @thomas38,

What have you tried so far (how does your code look)?

 

Unofficial discord community of likeminded developers:
https://discord.gg/EHVRdSVDc4


Eric27
  • August 18, 2022
Hey Thomas,

You can see how to do this here.

Hope this helps!

Thomas38
  • Author
  • August 22, 2022

Hi Oleg and Eric,

Thanks for responding. This is the code I’m using:

client.on('ticket.save', async () => {
client.context().then(create_modal); //this creates the modal
returnPromise.reject(false);
});
This immediately fires the “his app has prevented the submission of the ticket...”-message - how do I prevent this and instead continue the saving process after the fields in the modal have been filled out and the submit button was pressed there?

Thomas38
  • Author
  • September 1, 2022

I’m still stuck with this, if anyone has an idea or even sample code that would be much appreciated!


Tipene
  • Employee
  • September 1, 2022

Hey @thomas38,

Here's a link to an example app that you might find helpful:

https://github.com/zendesk/demo_ticket_submission_and_save_events

Feel free to reach out with any questions!

Tipene