How to Integrate with NetSuite using the Token Based Authentication on Boomi


This article outlines how to fetch/connect to the NetSuite application using the Token based authentication mechanism with the REST API services / Boomi NetSuite connector. 

Boomi offers a specific NetSuite Integration guide  as the recommended way to integrate. 

Example:
In this example, we will illustrate how to retrieve the data using the Token based authentication(OAuth1) from NetSuite for the vendorBill Object type using the 'Query' operation and use the VendorBill data to Create a vendorCredit records. When we used the token based credentials from the Boomi Vault we were unable to see the records for the vendorBill and the Query operation wasn't returning any records. So, used this approach to resolve the issue. 

Note: The "Vault" keyword refers to the Boomi internal repository where all the credentials related information are stored and this can be used to connect to the Netsuite connector connection details. Details like Account Number, consumer key and consumer secret etc..

When we tried integrating it on Boomi platform to use the 'NetSuite connector' to retrieve the data from 'Vendor Bill '  object and pass it on to the next component for the processing, though the connection was successfull with the NetSuite API, we encountered issues with the data retrieval due to insufficient permissions or incorrect configuration of the token-based authentication settings.
 

Step by Step process to process to successfully connect to Netsuite using the Token based authentication method : 

1. User Role :

User should be able logging into the NetSuite application using the 'Administrator' previlige or user specific role based credentials and then change the role from a specific user 'Role' to 'Administrator' role from the top most right corner.  

     AdministratorLogin

   2. Enable REST webservice features: 

       Now, we need to make sure the 'REST webservice' features are enabled.
ss
       2.1) To do so, navigate to Setup --> Company --> Enable features --> Then navigate to 'Suite Cloud' tab.

 



Menu

Now, we need to select 'SuiteCloud' tab as given below: 
     

SuiteCloud

 2.2) Under the 'SuitTalk(WebServices)' section, make sure REST Web Services checkbox is checked(Enabled)  and also under the 'Manage Authentication' Section —> Token Based Authentication checkbox is checked(Enabled) 


ManageAuthentication

3. Integration :

Now lets navigate back to the NetSuite Suite Application and this step is to create the Integration.

3.1) Navigate to Setup --> Integration —> Manage Integration —> New Integration —> Give the name as ‘Boomi Rest Services Integration’ and make sure the Token Based Authentication is enabled and OAuth2.0 is disabled and TBA: Authorization Flow is also disabled and Save the Integration.


WSIntegration

3.2) Important thing to note here is don’t navigate away from this integration page and on the bottom of the page under the Client Credentials section. If you move away you will loose the details of Consumer key/ secret.  You can copy the Consumer Key / Client Id , Consumer Secret / Client Secret. 

Confirmation

 Note: Now, next step is to create a Access Token and To do so go to home dashboard by opening a new tab don’t navigate away from this page and you will loose the credentials.
 

4. Create Access Tokens: 

4.1 Click on the 'Manage access Tokens' under the "Settings" section on the left most corner which will navigate to the My Access Tokens UI and on this UI user can see the name of the Tokens which was saved in the previous step 3.1. In this case, Token Access Name  ‘Boomi Rest Services Integration'  as the application name. 

4.2 Click on the New My Access Token button and select the application name from the drop down as 'Boomi Rest Web Services' against we need to create the Access Token. 
TokenCreation

and click on Save and you can see we have logged as ‘Administrator’ role and if you are not logged in as Administrator role just make sure your role as access to Rest Web Services permissions and also permission for access tokens . Token Id  and Token Secret can be copied from here.

Confirmation

5. Boomi NetSuite Connector Integration : 

On the NetSuite Connection dialogue window , enter the test Account Number , Consumer Key, Consumer Secret, Token Id and Token Secret created in the above steps and test the connection. 

 

5.1) Test Connection  output will be 'Success'


Screenshot 2023-10-15 at 20.27.15.png

5.2 ) Test the Boomi NetSuite integration process: 


NetSuiteConnector-Process.png


6. Postman Integration: 

Now, Let’s open a Postman and postman is an integration tool which simulates the other end of the Integration(NetSuite) it connects to NetSuite and provides the data. In other words, to create an integration with NetSuite Some other system can read and post the data and we are using the Postman as the other system.

6.1 Postman URL formation: 

Now, lets go to the Setup --> Company --> Company Information and copy the URL which is under SUITETALK (SOAP AND REST WEB SERVICES) section shown below  and copy it to the postman Get URL as the "First" part of the URL: https://tstdrv1178941.suitetalk.api.netsuite.com and "Second" part of the URL is from the API documentation of the "NetSuite"

First Part of the URL: https://tstdrv1178941.suitetalk.api.netsuite.com

FirstPartOfURL.png


Second part of the URL needs to be copied from the NetSuite API documentation link below [ From services/rest/record/v1] onwards : 

https://system.netsuite.com/help/helpcenter/en_US/APIs/REST_API_Browser/record/v1/2022.1/index.html

 

NetSuite REST API Browser: Record API v1

https://[accountid].suitetalk.api.netsuite.com/services/rest/record/v1

Append the 2nd part of the URL to the first part, it looks like below: 


https://tstdrv1178941.suitetalk.api.netsuite.com/services/rest/record/v1

Last part of the URL needs to be copied from the record type / object type i.e., In this example, it is 'vendorBill', and search the record type which you are looking for and copy the PATH 'GET/vendorBill' 

Final URL: https://tstdrv1178941.suitetalk.api.netsuite.com/services/rest/record/v1/vendorBill 


ThirdPart.png
 

Now, before we send this we need to setup the "Authentication", Lets go to Authentication and select 'OAuth1' which basically means "Token Based Authentication" and select the Add authorization data to "Request header" , Signature Method: HMAC-SHA256 .

Now, copy the integration Consumer Key and Secret , Token Id and Token secret which was created in the earlier steps above to the respective fields on the postman and finally set the NetSuite account number to 'Realm' field  which is nothing but your test account Id i(In CAPS) : TSTDRV1178941 and then hit the Send button to see the results!! 

Now, you have successfully integrated with the NetSuite with postman and also from Boomi. Both results will give the same results in terms of number of records. 

PostMan