I'm working with the Dell Boomi platform and NetSuite.
I have a unique situation where we need to retrieve emails from an inbox with a mail(IMAP) connector then take the body of the email and read it line by line to extract specific information.
This is a crude diagram of what I need to do.
The mail(IMAP) connector works perfectly, but I can't figure out what to do from there. I'm trying to learn Boomi and it's proving more of a challenge.
Basically I need to create 3 variables from the body of the email:
var customer = [];
var memo = [];
var amount = [];
The email body being parsed would look something like this with no headers:
-----Original Message-----
From: info@somesite.com
Sent: Wednesday, August 28, 2019 9:07 PM
To: reports@somesite.com;
Subject: Event Log: Report Recap Subject Line
Example 123456, 123412532452346346: ALKNBAQWIOET235QA08WSAQ2038YTQ12{
Example 120985, 109285710928561239: IO2Q0AIHJG698AE64A98GA654AG98DGF{
Example 489072, 987651498795654987: S54DGFH9A84D65F4A6SDF98A4SD138A4{
12341253643876843589, #12345, 100.00
12387019287654984616, #12324, 125.00
12359870923654987465, #51232, 100.00
This portion of the email is what I need to read from and ignore the rest
12341253643876843589, #12345, 100.00
12387019287654984616, #12324, 125.00
12359870923654987465, #51232, 100.00
I assume I would need a Data Process shape to manipulate the information. But I don't understand what scripting should be included to pull these into variables that can be connected to a map in a future step.
Crudely written, I need the script to do the following:
customer
variable, store the value after the , into the memo
variable (#12345) then store the last , value as the amount
variableI'm sorry if this doesn't make much sense. I'm really hopeful that I can find help here though. I'm trying my best to learn this but it's just over my head, desperate, and I just need help...
My current process in Boomi, I have no clue what to do after this, again the email is pulling perfectly.
One way to solve it would be to basically split the document by line, push it through a map and then evaluate whether the first column is greater than zero via a route. Skip the variables and just handled it via a map. This assumes you have some fundamental understanding of DellDoomi.
Moving from left to right:
That will basically split your email message into individual documents per line.