Requirement
Client has customers outside NetSuite, and they would like to send marketing emails to NetSuite customers as well as non-NetSuite customers. Due to storage issue, they do not want to create non-NetSuite customers in NetSuite. Need to find a solution for the same.
Solution
Marketing Email Customizations
Prerequisite
- Email templates will be already created in the NetSuite and user can select that template for sending the email. We expect the Point Australia team to share the sample template during the development stage.
- Three promotions name should be given to add in CSV and custom record set up.
CSV File Set Up
We will be storing the email addresses of the potential customers in a CSV file in the file cabinet under the “Marketing Non-NetSuite Customers” Folder.
It will be the responsibility of user to upload the CSV file in the specified folder in the account. User will be selecting the CSV files in the specific CSV selecting field in the custom record. The email addresses will be stored under the Column header “Email Address” in the CSV file.
In the CSV file, there will be another three columns with header as the promotions name so that user can enter yes/no in that column to mark the customer has been subscribed or unsubscribed. In the same column, if the customer has been unsubscribed through email we will mark, “unsubscribed” as the comment in the promotion’s column.
Note: If any of the email addresses has been marked as “unsubscribed”, the user has to enter yes/No as remark and through script, we will enter the “unsubscribed” keyword to identify the subscription through email.
Marketing Email Customer Record Set up
We will set up three custom records for all the three promotions.
We will be implementing a custom record for the user to enter the following details:
- (Mandatory)
- (Mandatory)
- [AT1]
We assume that the marketing email template will be created in the NetSuite already.
Here the user has the flexibility to change the email template, subject, sender email addresses etc.
Note: We will be adding attachment option in the custom record so that while sending the promotion email, NetSuite user can add an attachment.
Here, the default CSV file will be selected and attached to the custom record. User should always edit the same CSV file.
Scheduled Script for Email Notification
We will implementing a scheduled script to send emails to customers. When the date field in the custom record is current day (script running date), the email will be sent from the custom record
Scheduled script will send email for 1 user at a time. In the script, we will be fetching the email addresses mentioned in the CSV file and send the email content to the customers.
When the user clicks the unsubscribe link in the email, the user will be navigated to a custom suitelet page where the user will get an option to unsubscribe from one or more promotion by clicking the checkboxes before the promotions option.
Then the script will find the custom record and load corresponding CSV file and update the CSV file with options selected in the suite let page.
Custom Suite let Script to handle Subscription
We will be adding a subscription option for the user in the email body we are sending to the customer. For every email we sent to the customer, we will be loading the already created email template and update the subscription link with link where we send the customer email address (after encryption) and custom record internal id (encrypted data) as parameter.
When the user clicks the unsubscribe link in the email, the user will be navigated to a custom suite let page where the user will get an option to unsubscribe from one or more promotion by clicking the checkboxes before the promotions option.
A small version of front-end coding will be implemented in this custom suite let page to add a better appearance in UI.
Then the script will find the custom record and load corresponding CSV file and update the CSV file with options selected in the suite let page.
Back up of the existing file
Whenever the marketing email sent to customers, the script will take a backup of the file and save it in another folder.
Assumptions
- As per NetSuite standard features, email messages cannot exceed 15,000,000 bytes (approximately 15 MB) in size. This includes the size of the message body and all attachments
- Email templates will be already created in the NetSuite and user can select in the custom record.
- All the scripts will be released to all subsidiaries
- At least one email address will be available in the CSV file
- Scheduled script will be run every 24 hours
- Custom encryption will be used for sending parameters in the URL
- “yes/no” option marked bey user are not case sensitive
- The same CSV file will be used every time for promotion handling
- CSV format will be constant with same headers
- If the promotion emails are sent to customers and those emails may sent to their junk email folder by their domain provider and those cases are out of scope of this development
Risks
- CSV file should be formatted properly in the CSV and if there is an error in columns header value or misalignment in column values, the script will not work as expected.
- Duplication of same email address in the CSV file is not handled in the script
- While running the scheduled script, if the user updates the CSV file, that changes will not be reflected in the script.
- We expect the CSV files editing and scheduling of one promotion email should take place before the scheduled time of the script. In other words, if the email has been scheduled to send at 12PM on 25th May, the user must complete the editing of the CSV file and the email scheduled date of 25th May should be entered before 12PM on 25th May.
- If the user accidently edited the CSV file and marked subscription option to Yes instead of No, the email will send to the customer. So, it is user’s responsibility to handle the CSV file properly
Estimate
Time and effort: 34 Hours