Optimizing Multiple Inbound Email Actions into single Inbound Action or Inbound Email Flow

Raj Surve
Tera Contributor

Hello All,

 

I am currently working on a requirement to optimize our Inbound Email Actions in a Domain Separated instance.

 

We have approximately 133 customers. Currently, each customer has 3 dedicated Inbound Actions (New/Reply/Forward), resulting in a total of 399 Inbound Actions. Each customer requires a unique set of fields to be populated during Case insert or update operations. My goal is to optimize these into a manageable framework.

 

I tried an approach to use Inbound email flow to replace 3 inbound actions with a single flow. Based on the email received in the instance, we need to map email body content onto the case record. The catch here is, the email sender is a Contact User who does not have sufficient roles to access the email content. Unlike standard record trigger flow, the inbound email flow does not have allow us to select who can run the flow. It runs as the user who initiates the session by default. We also tried using a Subflow, but we hit a roadblock: fetching the email sys_id from the Trigger is blocked by ACLs, preventing us from passing the email data into the Subflow.

 

The alternative we found is that we can create a custom table to maintain the data of customers, which can then be set onto the Case record. That way we can reduce the inbound actions count to 3. But that means, we cannot use the filter conditions of inbound email action since, it wont accomodate these many customer recipient conditions. We are working on using the scripted conditions field available below the filter conditions, where we can call a script include, which can then fetch the data from the custom table in the form of JSON data. The only blocker here is, currently there are around 133 Customers, and validating those many via the script include will cause performance issues for the inbound action.


Please let me know if anyone has worked on a similar requirement. Any suggestions for alternative approaches would also be greatly appreciated.

 

Thank you!

1 REPLY 1

SumanthDosapati
Mega Sage

@Raj Surve 

 

Did you try using Decision table and call it in your script include instead of hard coding withing script include?

Hope that will solve your issue.

 

Accept the solution and mark as helpful if it does, to benefit future readers.
Regards,
Sumanth