Email to Case AI Agent Issue

desaiakash0
Tera Contributor

Hi All,

I have a requirement where an inbound email triggers a flow to create an HSPII record. The system then looks up the HSPII data and anonymizes the email content if it matches a predefined pattern.
Based on a Decision Table, if the sender’s business email (for example, kfctesting@example.com) has the AI Agent flag set to true, the flow invokes the AI Agent. The AI Agent is responsible for creating a customer case and masking the email data.
If the AI Agent flag is false, the flow follows alternate logic:

If the case type is available, a customer case is created directly.
Otherwise, another Decision Table is evaluated to determine whether the email recipients contain a specific business address (e.g., business@example.com), and based on this outcome, a customer case is created.

After case creation, the flow updates the email record and then iterates through each HSPII data item to create HSPII relationship records.

Flow Overview

Trigger: Inbound Email
Actions:

Process data and anonymize email
Decision Table evaluation:

If AI Agent = true → invoke AI Agent
Else:

If case type is not empty → create customer case
Else → evaluate recipient-based decision table and create customer case

Update email record
Create HSPII relationships for each HSPII item

 


Issue / Question
The AI Agent successfully creates customer cases, but the case details do not appear in the Flow execution context. However, when reviewing the AI execution table (sn_aia_execution_plan), the execution shows as completed and the case number is visible.
In addition, the AI Agent sometimes takes more than 20 minutes to complete the case creation, and in certain scenarios, it appears to get stuck indefinitely.
Could someone help identify why the AI Agent execution is taking so long and why the resulting case is not reflected in the Flow execution context?

0 REPLIES 0