- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2025 11:01 AM - edited 01-06-2025 12:24 PM
Hi All,
We're looking for a solution using a business rule (or flow?) to identify and parse an email address in a body of text in the Description field of a new case, and then copy that email address to the 'Requested For' field. Has anyone set-up anything similar?
I started on the following business rule that could be an option, but I'm open to any suggestions that others may have. Thank you!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2025 06:36 PM
Hi @JW22
If I understood your requirement clearly, you want to set the Requested For user as per the email ID of the employee received in the email body. I think you can go ahead with a flow with trigger type as Inbound Email with specific filter conditions as per requirement. Inside the flow, you can make use of a flow variable to parse the email body and get the email ID. With the email ID, you can make use of Lookup Record Action to get the user record and use it to set the requested for field while creating the case.
var emailBody = fd_data.trigger.inbound_email.body;
var employeeEmail = emailBody.match(/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+)/gi);
return employeeEmail[0];
Thanks and Regards
Amit Verma
Please mark this response as correct and helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2025 12:29 PM
Gotcha. Well you should be able to handle this in the Inbound Email Actions. Here's a link to the docs for creating those actions (with script). The doc includes an email where the short description is set; I assume you could do the same with requested_for:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2025 06:36 PM
Hi @JW22
If I understood your requirement clearly, you want to set the Requested For user as per the email ID of the employee received in the email body. I think you can go ahead with a flow with trigger type as Inbound Email with specific filter conditions as per requirement. Inside the flow, you can make use of a flow variable to parse the email body and get the email ID. With the email ID, you can make use of Lookup Record Action to get the user record and use it to set the requested for field while creating the case.
var emailBody = fd_data.trigger.inbound_email.body;
var employeeEmail = emailBody.match(/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+)/gi);
return employeeEmail[0];
Thanks and Regards
Amit Verma
Please mark this response as correct and helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2025 11:07 AM
Thanks Amit, I appreciate it!