Recent searches


No recent searches

ticket.saved event triggering twice for every ticket save.

Answered


Posted Oct 29, 2021

I have build a background app using ZAF, the purpose of which is to track changes in ticket field values and call an api on my server if specific conditions are met. I am making use of the ticket.saved event as mentioned in the documentation. However, on saving a ticket, the event is called twice - once during update and once during save. Is there a way for me to avoid this "double trigger" issue? Or is there some other event or similar hook that can help me serve the purpose?

If anyone of you know a solution to the issue,could you please help?


0

6

6 comments

image avatar

Tipene Hughes

Zendesk Developer Advocacy

Hi Gayathry S,

Thanks for reaching out!

Would you mind dropping a snippet of the relevant code here so I can look into this a bit further for you? Just be sure to redact any sensitive information.

Thanks!

Tipene

0


Tipene Hughes Here is the code, Every time a ticket is saved, the data is consoled twice.

0


image avatar

Tipene Hughes

Zendesk Developer Advocacy

Thanks, Gayathry S!

Nothing immediately stands out here as to why that would be happening and I've just tried to reproduce using the code you sent and it's working fine on my end.

Do you mind if I move this to a private ticket so I can take a look at the full code base?

0


Tipene Hughes Hi, When tickets are saved there are two notifications that I can see - one that the ticket was updated and that the ticket was saved. Does this help? 

0


image avatar

Tipene Hughes

Zendesk Developer Advocacy

No, that's expected behavior and generally shouldn't have any effect based on the code you've shared. 
 
I'd need to dive a bit deeper into your code to be able to determine what's causing the issue so let me know if you'd like to move this to a private ticket or, feel free to provide additional context in screenshots here!
 
Tipene

0


Tipene Hughes Sure, let us move to a private ticket

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post