Vedachalam Mahadevan
11/11/2024, 9:13 AMCeligo AI
11/11/2024, 9:13 AMAI generated answer (using internal Slack threads):Based on the conversations, it seems that Email Capture Plugin scripts are typically written in SuiteScript 1.0. Here is a sample script provided in the threads:
javascript
/**
* @NApiVersion 2.0
* @NScriptType emailcaptureplugin
* @NModuleScope SameAccount
*
* @description Email Capture using SS2.X
*/
define([], function () {
function process(email) {
log.debug('EMAIL');
log.debug('getFrom',email.getFrom());
}
return {
process: process
};
});
However, it's important to note that this script is written in SuiteScript 2.0, and there seems to be some uncertainty in the threads about whether Email Capture Plugins can be written in SuiteScript 2.0. Some users have mentioned that they have been told it's possible, but there are no examples of this in the NetSuite help documentation.
To use an Email Capture Plugin, you need to enable it in Customizations -> Plug-ins and upload a 1.0 script file. The function takes a single parameter which is an email object with getSubject()
and getTextBody()
functions which return those properties as strings. You can then parse them and kick off a scheduled script to do whatever processing you need.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
11/11/2024, 9:14 AMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.859064937
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.839195609
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.831548452
Celigo AI
11/11/2024, 9:14 AM