Scenario
By default, Enneo processes rule-based AI agents per dark processing for emails and letters, but not purely prompt-based ones. The reason is that the reliability of text produced purely by AI is less predictable than that of a rule value. However, there are certain customer inquiries – e.g. password reset instructions or login problems with the Android or Apple app – which can be fully automated with a certain level of reliability. Instead of using the standard dark processing, the smart AI agent itself should decide whether an answer is secure enough to be sent automatically.Possible Solution
The approach consists of four steps: A custom AI tool marks safe answers, an Event Hook checks the marking and triggers the automatic execution.Step 1: Create Custom AI Tool
Under Settings -> AI Customization -> AI Tools, create a new tool, e.g. with the namemark_answer_as_safe. This tool will be invoked by the smart AI agent when it is confident that the answer can be sent automatically.
In the smart AI Agent’s prompt, there must be a reference to the tool, e.g.:
The following types of inquiries should be marked as safe: (a) Password reset or (b) Login problems with the Android or Apple app. In these cases, invoke the mark_answer_as_safe tool.
Step 2: Mark Ticket in Tool as Automatically Executable
In themark_answer_as_safe tool’s code, the ticket is marked as automatically executable via the API, for example with the following code:
Step 3: Create Event Hook for TicketCreated
Under Settings -> System Integration -> Events, create a new Event Hook for the Event TicketCreated. This event is triggered after a new ticket has been received and the AI processing has been completed. The customer-specific code checks whether the ticket has been marked as safe. If needed, additional checks can be performed, e.g. whether certain tags are set or the customer has been clearly identified. If all criteria are met, the automatic execution is triggered:executeAgentId parameter is the numeric ID of the AI agent that should be executed. All other potentially recognized AI agents are ignored.
This code example intentionally omits error handling to improve clarity.
Step 4: Automatic Processing by Enneo
After calling the Autoexecute endpoint, Enneo automatically carries out the following steps:- The answer created by the AI agent is sent to the customer.
- The ticket is closed.
- The ticket is marked as fully automated processing (L5).