The Netsuite ecosystem had a clear distinction between email behavior in different environments and the end conclusion is that a Sandbox or Test Driven environment behaves differently compared to an actual live environment. Due to the different behaviors testing the approval by email feature can be a challenge. In this documentation, we explain how testing could be done and to which level.
Sandbox/test driven environment
Netsuite has strict behaviors for Sandbox accounts and the email functionality in these accounts does behave in a different way to protect the actual employee against potential spam. The key differences from a sandbox environment are listed below:
- A Sandbox environment will not email to actual employees
- A Sandbox environment will send emails to the current logged-in employee if they are a full administrator
- A Sandbox will record the email under the communication tab, but it will not list as actually sent
- When a communication record is present it can be taken for granted that a live environment would have actually sent out the email to the listed receiver
- A reply to for approval or rejection can only be done if the approver is equal to the current logged-in employee and they are a full administrator
- Netsuite will only actually try to send a mail if the trigger for the email is performed in the user interface from Netsuite.
With all these limitations in place testing the approval by email should be done in a strict way. The steps below explain how a test can be performed and the limitations of testing. To perform a test with an actual reply for approval or rejection the following steps are recommended to take. If a deviation is taken the outcome can be unexpected.
- Create or log in to an employee record that is holding the same email address as the email box to which you have access. The employee record must have administrator access. Make sure when you log in that the administrator role is the active role.
- Check that on the employee record the checkbox “Enable Approval By Email” is enabled under the subtab “Zone Approvals”
- Check that on the employee record the checkbox “Supper Approver” is enabled. This is to make sure that approval logs can be skipped to get to the log that set you as the next approver
- Check that on the related “Approval Configuration” the section “Approvals by E-Mail” is fully populated and that the checkbox “Enable Approval by E-mail” is checked
- Be assured that the triggered matrix has at least one matrix line that will set you as the next approver. Preferred is that your employee record would be the first trigger.
- Create your transaction and submit this for approval. At this point the approval logs will be generated which are visible under the subtab “Zone Approvals” => “Active Approval Log”
- When you were not the first approver in line then approve the transaction until your employee record is set as the next approver. For each approver that you overrule a communication record will be created and a email should be received in your inbox. (you can not reply to these because your email is different than from the actual employee that was set)
- Check the communication tab on the transactions, the email send should be visible here and should also be received in your inbox.
- You can now reply to the email with the defined magic keywords. After sending the email wait around 1 till 2 minutes and refresh the transactions. Your response should have triggered the next approval state.
- After this point no email will be send for a next approver. This is due to the fact that the approval status changes was triggered server side and that is protected agains sending email by Netsuite.
- A next UI change like approve will trigger again emails.