Interrupt ticket submit
답변함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!
-
Hey Thomas Busse,
What have you tried so far (how does your code look)?
Unofficial discord community of likeminded developers:
https://discord.gg/EHVRdSVDc4 -
-
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? -
I’m still stuck with this, if anyone has an idea or even sample code that would be much appreciated!
-
Hey Thomas Busse,
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
댓글을 남기려면 로그인하세요.
5 댓글