Automation to close tickets sometimes not sending closing email

  • Used Zammad version: 5.0
  • Used Zammad installation type: package
  • Operating system: Debian 10
  • Browser + version: Chrome 99

Expected behavior:

  • We have an automatation to close tickets, which have the state “wait for close”. The event is triggered every 10 minutes. On closing, an email schould be sent to the customer, which informs him, that the ticket is closed. Additionally, a internal note should be created on the ticket and the ticket should get closed.

Actual behavior:

  • Sometimes the ticket gets closes, but no email is send and no internal note is written to the ticket. If i then set the ticket again to “wait for close”, the whole process is working.

Where can i look to what is happening? Or for which keywords i have to search in the production log, to find the place, where the event happens?

That entirely depends on your schedulers configuration. Especially the “where to send the email” part.
If I’d had to guess:
Either the ticket group affected has no email address set or the ticket customer doesn’t.

There is no group change on the ticket and the customer send an email to create the ticket, so he have an email address. This is, what the history looks like:

 - 20.06.2022 09:26
aktualisierte Ticket Status von 'in Bearbeitung' → 'warten auf schliessen'
aktualisierte Ticket Besitzer von '-' → 'Eiko Richter'
aktualisierte Ticket Warten bis '21.06.2022 09:26'
aktualisierte Ticket last_owner_update_at '20.06.2022 09:24' → '-'
erstellt Artikel
aktualisierte Ticket Letzter Kontakt (Agent) von '20.06.2022 09:24' → '20.06.2022 09:26'
aktualisierte Ticket Letzter Kontakt von '20.06.2022 09:24' → '20.06.2022 09:26'
aktualisierte Ticket last_owner_update_at '20.06.2022 09:26'
E-Mail sent to 'dxxxxxxke@xxxxxxxxxxxx.de'
 - 21.06.2022 09:32
aktualisierte Ticket Status von 'warten auf schliessen' → 'geschlossen'
aktualisierte Ticket Warten bis '21.06.2022 09:26' → '-'
aktualisierte Ticket last_owner_update_at '20.06.2022 09:26' → '-'
Benachrichtigung sent to 'eixxxxxxxxter@exxxxxxxh.de(update:online,email)'
 - 21.06.2022 11:21
aktualisierte Ticket Status von 'geschlossen' → 'warten auf schliessen'
aktualisierte Ticket Warten bis '20.06.2022 08:00'
 - 21.06.2022 11:23
added Ticket Tag 'bereits geschlossen'
aktualisierte Ticket Status von 'warten auf schliessen' → 'geschlossen'
aktualisierte Ticket Warten bis '20.06.2022 08:00' → '-'
erstellt Artikel
erstellt Artikel
E-Mail sent to 'dxxxxxxxxe@xxxxxxxxxxxx.de'
Benachrichtigung sent to 'exxxxxxhter@exxxxxxxxxxxh.de(update:online,email)'

I answered the customer and set the ticket to “wait for close” in one turn. The sheduler triggers the event, the ticket gets closed, but no email is sent, no internal notice is written to the ticket and no tag is added. Then i set the ticket manually to the “wait for close”-state and everything is working fine.

The auto-answer part on new tickets is working without any problems and the customer is getting the relevant email. At the moment, i’m writing this post here, another ticket in the same group was closed without any problems. I also do not find any errors in the production log, so i’m at my wits end.

I’ve tried around a bit with some tickets opened via my contact form - it looks like the closing mechanism works, if the ticket is not opened on the left menu side. I will test this with another agents.

What exactly are you doing with the default state pending close?
This is a default state which will be automatically switched to closed by Zammads core if the pending till has been reached. This of course does not trigger any email to the customer.

If you use a scheduler task to do something, you may wanna use different states that behave differently instead of default functions that might interfere with your configuration.

Said states and how they behave on a default behavior basis by core are described here: State — Zammad (for Agents) documentation

1 Like

Ah, your answer leading me to the right way. :smile:

I have a scheduler task, which checks every 10 minutes, if there are tuckets with state „pending till close“ and closing time ist relative to one minute before. So i think, there is somerhing like a race condition, and if the time matches before the scheduler runs, the ticket gets closed without the closing note.

I will try to use a custom state to get the expected behaviour.

1 Like

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