- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2024 02:02 PM
Hello there,
At this time, I am currently and successfully able to parse out name value pairs from inbound emails by way of the Parse Email Flow Action . Also, I am able to successfully apply those values to an existing catalog item on text fields, however I am experiencing a situation where I'd like some assistance.
Currently our inbound email comes in as such:
- Employee: Doe, John
- Employee Number: 123456
- Status: Active
- Effective Date: 11/4/2024
- Supervisor: Doe, Jane
However, what I would like to do is convert the Employee and Supervisor field data format from "Doe, John" (lastname, firstname) to "John Doe" (firstname lastname).
Is there a possible way to script this or use the Transform Function options to change the format? Looking for guidance for this little item, but all other aspects of this Parse Email Action for now works well (just need to work on getting it added to the Reference field 😉)
Thank you.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2024 03:03 PM
Hello @Joel O
You can check the @OlaN response as well but never tried it.
If you wanna go with script try like below:
var formatUserName = JSON.parse(JSON.stringify(fd_data._2__parse_email_body_text.email_variables.Employee)); //replace the key name with actual name and check the code
formatUserName = formatUserName.split(",");
return formatUserNamestr[1].trim() + " " + formatUserName[0].trim();
(=tested)
Let me know if you stuck anywhere
Murthy

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2024 02:45 PM
Hi,
You can either script this, or use the transform functions to parse the name in the correct format.
If you're using the no-code approach with the transform functions, you will need to store the data in two flow variables.
First use a split transform, using the comma-sign as a delimiter will split the name in two parts.
Then apply the transform function (in utilities) to store the two parts in two different flow variables (one for first name, and one for last name).
Finally add these two variable-data together in the correct order, where you need to use the full name.
See example below.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2024 07:48 PM - edited 10-30-2024 07:51 PM
Hi @OlaN
Looked into your solution and looks like the variables seem to be working as I'm looking at my current execution details. Here is a sample of the Flow setup, however in my execution I get an error when submitting the catalog item. I am able to submit the same catalog item manually and prior to adding the Flow variables, the parsing was working as expected.
Screenshots of setup and error:
First Name
Last Name
Add variables
Error Log in execution details
Hoping you can assist and shed some light on what this might mean.
Thank you.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2024 12:12 AM
I believe the issue is that there is some mismatch between the result/output from your first step and the required input into the Flow variables.
Is the output from your first step some sort of array ?
You might need to store the unconverted full name in a string before you begin processing the parts of the name in your Flow variables.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2024 06:00 AM - edited 11-01-2024 10:05 PM
Hi @OlaN
Reviewing the logs deeper it appears I do have it set as a string in my first step in parsing out the email variables, which not realizing it when I use that variable in the Flow Variables that I set up it would do the same and grab the entire list.
Step 1:
Step 2:
To your point of storing the unconverted full name, could you provide guidance on how I can begin to extract that from the entire string?
Thank you for your assistance