Event on Ticket Creation via Email | Community
Skip to main content

Event on Ticket Creation via Email

  • March 31, 2022
  • 4 replies
  • 0 views

Hi there,

We have an app that sends an HTTP request when new tickets are created. The idea is to generate an alert in our own product.

All words find when I create the ticket manually. However, when the ticked is created via email the event (ticket.saved) does not seem to be triggered.

In the manifest the app is marked as a background app:

  "location": {
    "support": {
      "background": "assets/iframe.html",
      "ticket_sidebar": {
        "url": "assets/iframe.html",
        "flexible": true
      }
    }
  }
 
Am I missing something? Any help is highly appreciated.
Thanks
Ron
 

4 replies

Tipene
  • April 4, 2022
Hey Ronald,
 
System created tickets such as email and API tickets don't automatically fire the ticket.saved event on creation. For this particular use case, web hooks and triggers might be the best way to accomplish what you're looking to do. Here's an article that goes in to a bit more detail:
 
https://support.zendesk.com/hc/en-us/articles/4408839108378-Creating-webhooks-in-Admin-Center
 
I hope this helps! Feel free to reach out with any questions.
 
Tipene

  • Author
  • April 6, 2022

Thanks @tipene,

OK, that explains the behavior then. Would be nice to be able to handle this in our app somehow.

Cheers

Ron


  • August 24, 2022

Does this mean, we can not use the below event?

 client.on('ticket.create', function(data) {
        console.log('ticket  created!');
    });
    //----------updated --------------
    client.on('ticket.update', function(data) {
        console.log('ticket  updated!');
    });

  • August 26, 2022
Hi Amit,
 
After double checking our ticket events, it looks like ticket.create or ticket.update aren't valid events that our framework recognizes. Therefore, it wouldn't produce the desired result. 
 
Apologies for any inconvenience this may cause.
 
 
Erica