If you’ve already tried to create a Pigment - NetSuite integration, you might have followed a set of instructions listed in our Connect Pigment with Netsuite article. Due to the manual nature of this integration, some technical errors may arise during the process. In this article, we cover troubleshooting solutions to the most common NetSuite integration errors that Pigment customers encounter.
Here is a list of common errors related to Pigment - Netsuite integration:
- Error: Authentication to NetSuite failed while accessing RESTlet.
Description: Potential cause is that the token initially issued has a role with incorrect permissions, or the token is no longer valid.
Solution: 1. Ensure that the Role used for the token creation has the appropriate permissions and that no permissions have been revoked on NetSuite side. 2. Test the connection again.
If the issue persists, please follow these steps: 1. Revoke the old token 2. Ensure the role used for the token creation has the appropriate permissions (click here for more details). 3. Recreate a new token 4. Create a new NetSuite connection in Pigment with the new token information.
Note: You MUST delete the old tokens. Otherwise you will continue to run into errors if you simply create a new token without deleting the old one(s).
- Error: NetSuite Saved Search was not found.
Description: The Saved Search ID entered in the ID Field of the import configuration is directing to a saved search that either does not exist or for which the integration does not have the appropriate permissions to access it.
Solution: 1. Verify that the Saved Search ID entered in the configuration is correct and matches the one in NetSuite. 2. Ensure the Pigment user in NetSuite has access to the Saved Search. To address this, please verify the full selection of your NetSuite transactions permissions at this step.
- Error: RESTlet not found. Check that REST API is enabled and RESTlet customscriptexportsavedsearch is installed.
Description: The script is not installed correctly and cannot be found.
Solution: 1. Delete all the old scripts installed from your previous attempts. 2. Re-install the script and ensure the following: File Name = exportSavedSearch.js, Name field = exportSavedSearch.js, Script ID = exportSavedSearch 3. Hit save and ensure the URL or external URL ends with “deploy=1”.
- Error: Insufficient permission to execute customscriptexportsavedsearch RESTlet.
Description: In NetSuite, encountering an “insufficient permissions” error when trying to execute a RESTlet script can be due to several reasons. The most common causes are related to User Role permissions, Script Deployment Level and Employee Record Restrictions.
Solution: 1. Role Permissions: The most common cause is that the Role assigned to the user does not have the required permissions. You should ensure that the Role has:
- Permission for ‘Web Services’ (this allows API access).
- Permission for ‘Log in using Access Tokens’ if token-based authentication is being used.
- Relevant permissions to any records or transactions that the RESTlet is trying to access.
2. Script Deployment Level: If the RESTlet is deployed at an ‘Admin’ level, only users with administrative roles can access it.
3. Employee Record Restrictions: Even if a role has the required permissions, the employee record itself might have restrictions that prevent certain access.
If an issue still persists after completing the steps above, please delete an old script and deploy a new one, carefully following each step outlined here and taking into account the guidelines above.
- Error: Missing `Documents and Files` permission.
Description: The role is missing the following permission: 'Documents and Files'.
Solution: Make sure to set the “Documents and Files” permission to “Full” in the Lists Permission section. Find the detailed instructions here.
- Error: Missing `Persist Search` permission.
Description: The role is missing the following permission: 'Persist Search'.
Solution: Make sure to set the “Persist Search” permission to “Create” in the Lists Permission section. Find the detailed instructions here.
- Error: Authentication to NetSuite failed while accessing SOAP services.
Description: The role is missing the following permission: 'SOAP Web Services'.
Solution: Make sure to set the “SOAP Web Services” permission to “Full” in the Setup Permission section. Find the detailed instructions here.
If the issue persists, please also verify that you successfully selected the SOAP Web Services during the Step 1.
- Error: Could not find the script file. Make sure it contains a lowercase 'js' extension.
Description: RESTlet cannot find the script fileSolution: Delete the previous script file and create a new one, making sure to put exportSavedSearch.js as a File Name when creating a new script. Find the detailed instructions here.
- Error: Unexpected Error.
Description: Sometimes, NetSuite may fail on a request and not return a specific error message to NetSuite Connector. In such case, NetSuite Connector shows that NetSuite reported an unexpected error with an error ID.
Solution: 1. Please, check the Netsuite script deployment error log 2. If there are no errors indicated there, please, contact our Support team, indicating the error log information. 3. If there is an error, we recommend contacting NetSuite Customer Support and provide the error ID mentioned in the error message. 4. Our Support team is ready to advise you further if the issue persists.
Common questions related to Pigment - Netsuite Integration:
1. What is the purpose of the RESTlet script for NetSuite integration?The RESTlet script is allowing Pigment to add some custom logic to make the saved search load faster. Technically speaking, we ask NetSuite to generate the saved search in a CSV format, store it in their file storage and notify us when it’s finished. At that time, a second API call is triggered to retrieve the CSV file.
2. Why am I not seeing a complete data set in Pigment?
If you are not seeing a complete data set when you compare a CSV export of the Saved search in NetSuite to the same results in Pigment, this is likely due to your NetSuite integration role not having complete access to the data set. To address this, please verify the full selection of your NetSuite transactions permissions at this step.