Inbound Action - Email working with Flow Designer / Reference Field population.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2019 07:02 AM
Hello Everyone!
I have an issue where I can't seem to get my Reference variables to populate information while I work in Flow Designer. I'm using the Inbound Email Action to ingest emails based on specified conditions. That seems to be working fine without issue. I then use the "Create Record" action to create an Incident record off of that email. That also seems to be working just fine. I have a few different variables I'm populating based on the Email within the Incident automatically.
The problem I'm facing is the Inbound Email has a line of text that states the Assignment Group the incident needs to be assigned (e.g. Assignment Group: Database Administrators)
Based on this Assignment Group line of text... I need to ensure the incident is assigned to the appropriate Assignment Group. This assignment group is a reference field. I don't have much experience with using Inline Scripts... which from my understanding the Reference Fields within the Flow Designer require.
Any and all help would be appreciated!
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2019 09:49 PM
Hi Zach,
You will be able to return the value using a "Look up Records" action in Flow Designer.
Look up the table "Groups" (sys_user_group) and filter of "Name" which is where you drag in the name of the group from your Email.
Then, you have the Record as a data-pill from the Look Up Records action which you can drag straight in to the "Create Record" action of your incident.
This should save you needing any scripting!
I hope that helps,
Andrew

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2019 05:23 AM
Andrew,
Thanks so much for your response! You've been really helpful.
The problem I'm still facing is within the body text of my email there is a line that states "Assignment Group: " and then continues with the value of the assignment group. That value within the body text will be different. The email originates from the same Sender, the Subject is the same, but depending on the issue that line of text in the body.. "Assignment Group:" will be different.
I'm trying to grab what that value is and attach it to my Create Incident Record action.
You gave me a great starting point with the Look Up Group Records action, but I'm still uncertain how I'm able to grab that one line of text. Any further assistance would be much appreciated!
(I have by the way, added Name is "Trigger > Body Text" hoping that would pull it but I'm unable to add that as a data pill within my create incident record action)
Thanks again!!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2019 02:47 PM
I've been having a look at this issue in my PDI and I (somehow) seem to have completely broken my Inbound Email Trigger. I do have an idea however:
In the Look Up Record action, you could replace the "Conditions" with the code block:
var assignmentGroup = fd_data.trigger.inbound_email.body.assignement_group;
return ("nameSTARTSWITH" + assignmentGroup);
and it *might* get you where you need to be.
I'm sorry I can't test this right now, but I may be able to try in a company sub-prod later today.
Thanks,
Andrew

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2020 03:56 AM
Has anyone had any further luck with this? I have been able to get the email body using: