Scenario
By default, Enneo only triggers automatic execution (dark processing) of AI agents on the first incoming email of a ticket and only when exactly one AI agent is detected. Standard dark processing does not apply in two situations:- Multiple AI agents detected: A customer raises multiple concerns in a single email, e.g. a cancellation and a revocation. Enneo detects both AI agents but does not auto-execute either as a safety measure.
- Follow-up replies: A customer replies again to an existing ticket. AI processing runs (tags, AI agent detection, parameter extraction), but automatic execution is not triggered again.
Possible Solution
An event hook reacts to incoming tickets or customer replies, checks the detected AI agents, and triggers automatic execution for each one individually.Step 1: Create an Event Hook
Under Settings -> Integration into Other Systems -> Events, create one or both of the following event hooks:- TicketCreated — triggered after a new ticket is received and AI processing is completed. Use this when multiple AI agents on the initial email should be auto-executed.
- TicketResponse — triggered when a reply to an existing ticket from the customer is received and AI processing is completed. Use this when AI agents should also be auto-executed on follow-up replies.
ready and executes each one individually:
The
executeAgentId parameter is the numeric ID of the AI agent to be executed. It is set per call for one AI agent at a time.The allowMultipleIntents=true parameter allows automatic execution even when multiple AI agents have been detected on the ticket. Without this parameter, execution is rejected when multiple agents are detected as a safety measure.The allowWithReplies=true parameter allows automatic execution even when the ticket already contains inbound customer replies. Without this parameter, execution is rejected as soon as a customer reply exists on the ticket. This parameter is only relevant for the TicketResponse event.Error handling is deliberately omitted in this code example for better clarity.
Step 2: Automatic Processing by Enneo
After each call to 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).
Notes
- The TicketCreated event is suitable for initial emails with multiple concerns. The TicketResponse event is suitable for follow-up replies. Both events can be configured simultaneously with the same code.
- The
allowWithReplies=trueparameter is necessary because Enneo by default blocks automatic execution as soon as an inbound customer reply exists on the ticket. For the TicketCreated event, this parameter has no effect since there are no replies yet. - The
allowMultipleIntents=trueparameter is necessary because without it, execution is rejected when multiple agents are detected as a safety measure. - The
executeAgentIdparameter ensures that only the desired AI agent is executed per call. - It is recommended to maintain an allowlist (
allowedAgentIds) of AI agents approved for automatic execution.