Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

When is the “post reply” from agent event triggering?

edited December 2016 in Mods and Customizations
I'm trying to figure out when exactly is the "post reply" from agent event triggering. I installed a plugin and set everything up listening to Signal::(model.update) event. Then I'm supposed to send user notification via Facebook when an agent replies to the users ticket. The problem is it is firing so many times.

It fires when user creates a ticket, when an agent opens the ticket, when the agent is writing something and, as far as I've noticed, twice when the agent actually clicks the "post reply" button!

So far I've figure out that the ticket has many methods where I can see whats actually in the database. Messing around with it (I think I tried all of them) I came across the $ticket->isAnswered() method, which becomes 1 only when the agent actually replies the first time, but then I have to deal with the last 2 times it triggers the Signal::(model.update) and ofcourse this won't work at all if the user replies to the same thread again.


  • Just want to make sure I understand this correctly. Your ideal scenario is to alert you on a post reply from agent, then you alert that agent via social media? Neat idea for a plugin, could make OSTicket ideal for ZD customers :)  
  • Not precisely, I'm notifying the user via Facebook that there has been a reply to his ticket. But it fires when the agent writes as well as when he posts so I can't tell the difference and the user will end up getting 2 notifications instead of just one.
  • edited December 2016
    It's going to be hard to say as this is a third party plugin, we do not support them and ask that you speak to the author of the software. Otherwise let's see if someone else can assist with answering what trigger is used when a create ticket took place. 
  • @meas scp/tickets.php

    look for "Reply posted successfully"
Sign In or Register to comment.