Scenario
By default, Enneo only processes rule-based AI agents via dark processing for emails and letters, not purely prompt-based ones. This is because the reliability of purely AI-generated text is less predictable than that of a rule-based system. However, there are certain customer inquiries — e.g. password reset instructions or login issues with the Android or Apple app — that can be answered fully automatically with sufficient reliability. Instead of using standard dark processing, the smart AI agent should decide on its own whether a response is safe enough to be sent automatically.Possible Solution
The approach consists of four steps: A custom AI tool marks safe responses, an event hook checks the marking and triggers the automatic execution.Step 1: Create a Custom AI Tool
Under Settings -> AI Customization -> AI Tools, create a new tool, e.g. namedmark_answer_as_safe. This tool is called by the smart AI agent when it is confident that the response can be sent automatically.
The smart AI agent’s prompt must reference the tool, e.g.:
The following types of inquiries should be marked as safe: (a) password reset or (b) login issues with the Android or Apple app. In these cases, call the tool mark_answer_as_safe.
Step 2: Flag the Ticket as Auto-Executable in the Tool
In the code of themark_answer_as_safe tool, the ticket is flagged as auto-executable via the API, e.g. with the following code:
Step 3: Create an Event Hook for TicketCreated
Under Settings -> Integration into Other Systems -> Events, create a new event hook for the TicketCreated event. This event is triggered after a new ticket is received and AI processing is completed. In the custom code, check whether the ticket has been marked as safe. Additional checks can be performed as needed, e.g. whether specific tags are set or the customer has been clearly identified. If all criteria are met, trigger the automatic execution:executeAgentId parameter is the numeric ID of the AI agent to be executed. Any other potentially detected AI agents will be ignored.
Error handling is deliberately omitted in this code example for better clarity.
Step 4: Automatic Processing by Enneo
After calling the autoexecute endpoint, Enneo automatically performs the following steps:- The response created by the AI agent is sent to the customer.
- The ticket is closed.
- The ticket is marked as fully automated (L5).