This article is relevant if you are using NetSuite’s Email Plug-ins and you wish to have the email become a standard message object.
Background
My firm, Prolecto Resources, has written a number of custom NetSuite email plug-ins designed to facilitate integration using email. For example, in my 2020 article, Fully Automate Complex NetSuite Data Imports, I discuss how we can handle NetSuite-based complex data import requirements that push well beyond the out-of-the-box CSV import tool. In the framework, one option is to use an email listener to have files land in a specified NetSuite file folder so that a script can pick up the file to parse it for complex, yet scalable, data imports.
More recently, a client asked us a reasonable question. “Can I see the email that was sent to us that uses the plug-in processor just like all the other inbound emails we receive”? Based on topic research and follow-up with NetSuite Support, the quick answer is “no”. But, there is a reasonable workaround.
Listening to Email Events
The NetSuite message object throws events — thus it would lead a SuiteScript developer to believe one could listen for the email plug-in to fire when an email arrives and then take some sort of action. However, based on our testing and follow-up with NetSuite Support, the standard message object does not raise events based on the email plugin.
Thus, the only way to listen to the email plug-in is with the event that NetSuite provides you via that framework — good enough. But, as of the writing of this June 2021 article, NetSuite offered no built-in facility to write the standard email message when the email message arrived. So we take matters into our own hands.
Write Your Own NetSuite Email Message Record
After understanding that NetSuite will not write the standard email event, Boban D., Senior Analyst on the Prolecto Resources Services Team, took matters into his own hands. The good news is all the information is available about the inbound email message such that you can create your own email message record — just like if NetSuite would have done it for you.
Boban searched every word in the subject line to see if it could be matched to a transaction. If a match was found, then it links the email message to those transactions. In addition, any file attachments also get cross-reference in the email messages file attachment sublist. The primary recipient was marked as the email listener inbound email address.
Click the images to see the related images.
Work with NetSuite Innovators
While this article likely will be helpful to a NetSuite Administrator, it’s important to understand why I call Prolecto Resources a leading NetSuite Implementation and Innovation Practice. The operative word is Practice. The nature of the professional services we offer demands that our team members are always learning. NetSuite is robust, complex, and capable. Yet, it is too comprehensive for one person to know every detail about Oracle’s NetSuite ERP service. Instead, our commitment is to focus, stay open-minded, ground our speculations and interpretations, become skillful, and then ultimately produce client solutions — the practice is the mechanism to know that must keep getting better and better to be competitive and valuable. Thus, this article is a reinforcement of that consideration — these nuanced learnings make a difference as we solve our clients’ challenges.
If you found this article valuable, feel free to receive notifications as I publish new articles. If you are looking to solve an inbound NetSuite email challenge, let’s have a conversation.