Require agents to comment before closing ticket

  • Used Zammad version: Latest

Can anyone provide details on how to make it mandatory for agents to update a ticket with at least 1 note or emai reply, before being allowed to close the ticket?

So to be clear, it should be obligatory for the agent to provide a note or to send an email to customer, when changing ticket state to “closted” - as in, it should not be possible to change to this state without providing note/email reply.

What have you tried so far? Have you tested your use case with triggers?

Not really, as I am still very much a newbie in the land of Zammad, so I am unsure how to proceed. To be honest I was hoping that someone had a working solution to share :slight_smile:

So I had a look at triggers and I can see how it would be possible to identify tickets which are being changed to state “closed” by the current user, but I cannot see any option to then require a note to be submitted as part of closing a ticket - only option for object “note” is that of adding a predefined note:

As Workaround: You can create two core workflows. The first one has a higher priority, for example, 1. There, you specify for the Edit mask under Selected Conditions that all those with the role “Your Agent Roles” will then have the status “Closed” removed under Action.

The second workflow has a different priority than Example 2. There, again in the Edit mask under Selected Conditions, you specify the role “Your Agent Roles” and “Updated By is the current user.” As an Action, you add the status “Closed” again.

This should ensure that as soon as the current user with the role “Agent” only sees the status “Closed” after they have updated the ticket. However, this also means that once the customer has finally updated the ticket, the agent has to update the ticket again, such as with a note that the issue is resolved or something similar, so that the status “Closed” appears again.

I’m afraid I don’t quite follow. Any chance you could show me what you mean with a couple of screenshots? :slight_smile:

You need to configure the two core workflows as follows:



However, if the customer has recently updated the ticket, the agent must update the ticket again so that the workflow is correct and the “closed” status appears again

To be safe, I would still include the group of agents as conditions in the workflows so that no unexpected effects appear for others

Thank you very much for elaborating.

Your proposed solution works, except for the fact that any update of the ticket will activate the workflow to show the status of “closed”.
This is not ideal because then an agent can get away with closing the ticket without providing any note or email explanation, just as long as they make some other update to the ticket, such as setting themselves as owner.

Any suggestion on how to improve the solution?

You create another field via the Object Manager.

A yes/no field with the name, for example, (Agent has created a message).
You hide this field in both ticket forms using the workflows.

Then you create a trigger and set the conditions as Action is Created (but the action is from the Articles section), and Sender is Agent and
“Agent has created a message” to No.

This trigger should then fire for every article created by an agent and the “Agent has created a message” field is No.

Then you add the conditions to the two workflows above:
For the workflow that hides the status, you add the condition: “Agent has created a message” is No.

For the workflow that displays the status, you add the condition: “Agent has created a message” is Yes. And here you can then remove the updated by as a condition.

Hi Kevin,

I tried following your proposed solution, but it’s not quite clear to me, what to select in the “execute changes on objecs” section of the trigger:

Hey,

you let the trigger change the field “Agent has created a message” to Yes.

So every time when the field “Agent has created a message” is “no” and a agent creates a article in a ticket the trigger fires and set the file “Agent has created a message” to “Yes”.