Trigger for sending email when ticket is closed

Hi,

I’m trying to create a trigger that sents the customer an email when the ticket is closed, but I can’t find a reliable way of detecting when the ticket is closed.

The obvious solution seems to be to set two conditions: “State” is “Closed” and “State” has changed, but Zammad for some reason doesn’t allow you to use the state field in more than one condition - this seems like an arbitrary limitation rather than a technical limitation, so perhaps someone could explain the logic behind that.

If I instead set “State” is “Closed” and “Action” is “Updated”, then an email is sent everytime a closed ticket is updated. I’ve also tried using “Closing time” has changed, but it would never trigger.

How have other people achieved this? I assume a notification when a ticket is closed would be a very common requirement.

Infos:

  • Used Zammad version: 5.1.x
  • Used Zammad installation type: source
  • Operating system: OpenSUSE 15.3
  • Browser + version: Chrome

Cheers

Hey Wardrop,

let me try to recap: “state” = “closed” and “Action” = “Updated” is ok but it could happen that it send a second email if something is added to the closed ticket, right? For me this behaviour is correct.

But if you would like to receive only one email I would add a custom field to every ticket like “final_close_message” and add this to your trigger.

if state = closed && action = updated && final_close_message = false then

  • send email
  • change final_close_message = true

Best regards
Christoph

1 Like

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.