Authenticate your NetSuite integration

Re-authenticate your integration

This guide outlines the process for establishing persistent authentication between your NetSuite account with Anrok using SuiteTax or Legacy Tax. To complete this guide, you must have the following permissions: 

  • Administrator role in your NetSuite account. If you have a NetSuite integration user, you can use that instead for all NetSuite-related actions.
  • Any user role for your company's corresponding Anrok account.

An unauthenticated connection means Anrok is calculating tax and ingesting transactions from NetSuite, but your OAuth credentials have expired. To import new products or reprocess historical transactions, complete Steps 1-4 to re-authenticate.

Important CleanShot_2024-05-03_at_20.22.03_2x-removebg-preview.png

This guide is sufficient to establish a single entity connection to Anrok. If you have multiple Anrok accounts for more than one NetSuite subsidiary, then please contact us to review before re-authenticating your account.

 


 

Step 1

Generate an Anrok certificate

During this step, generate an Anrok certificate to use in NetSuite during Step 3.

Try generating an Anrok certificate in the demo above ☝️

  1. In the Anrok app CleanShot 2023-07-20 at 12.02.21@2x.png, go to Data sources. Take me there!
  2. Next to NetSuite, select Three Dots then Re-authenticate.
  3. Click Generate Certificate. The certificate file will download automatically and be saved locally on your machine.

Important CleanShot_2024-05-03_at_20.22.03_2x-removebg-preview.png

After generating the certificate, do not close this page. The certificate requires an ongoing connection to the Anrok server when completing the NetSuite OAuth integration.

 


 

Step 2

Create Integration Record for Application

Once you've generated an Anrok certificate, you will need to create an integration record for the application. This will allow Anrok to connect to the Customer Key/Client ID generated to complete the integration.

Try creating Integration Records for Applications in the demo above ☝️

  1. In the NetSuite app CleanShot 2023-07-28 at 16.20.15@2x.png, go to Setup > Integration > Manage integrations > New.
  2. Under Integration, complete the following information:
    • Name — enter Anrok client credentials oauth application {MMM/YY} . For example, use the name Anrok client credentials oauth application Jun/26 for a record created in June 2026.
    • Under Token-based Authentication, deselect all checkboxes.
      • Note: You may need to check the "Token-Based Authentication" box in order to uncheck the "TBA: Authorization Flow" box, and then you can uncheck both.
    • Under Oauth 2.0, click the checkbox  CleanShot 2023-07-31 at 11.51.24@2x.png  next to Client Credential (Machine to Machine) Grant. Deselect any other checkboxes.
    • Under Scope, click the checkboxes  CleanShot 2023-07-31 at 11.51.24@2x.png  next to Restlets, Rest Web Services, and SuiteAnalytics Connect.
  3. When you are finished, click Save
  4. Under Client Credentials, record the Consumer Key/Client ID.

Important CleanShot_2024-05-03_at_20.22.03_2x-removebg-preview.png

After closing this page, you will not be able to view the active Customer Key/Client ID again. To access a new Customer Key/Client ID: Select the Integration Record > click Edit > Reset Credentials.

 


 

Step 3

Create a mapping for the M2M client credential

Next, you will need to create a mapping for the machine-to-machine client credential. This will ensure Anrok is able to receive important transaction and product updates from NetSuite.

Try creating a mapping for the machine-to-machine client credential in the demo above ☝️

  1. In the NetSuite app CleanShot 2023-07-28 at 16.20.15@2x.png, go to Setup > Integration > OAuth 2.0 Client Credentials (M2M) Setup.
  2. Click Create New, then complete the following:
    • Entity — select the appropriate entity. Note: if you have an integration user, you can choose that entity here. 
    • Role — select an Administrator role.
    • Application — select the Anrok client credentials oauth application with the current MM/YY. In the example provided above, that is Anrok client credentials oauth application Jun/26.
    • Certificate — choose the certificate generated in Anrok.
  3. When you are finished, click Save.
  4. Record the Certificate ID in a secure location. You will enter this in Anrok in the next step.

 


 

Step 4

Connect to NetSuite

Once you've create a mapping for the machine-to-machine client credential, you can then input the information required in Anrok to connect to NetSuite.

Try connecting with NetSuite in the demo above ☝️

  1. In the open Anrok page CleanShot 2023-07-20 at 12.02.21@2x.png, enter the following: 
    • Consumer Key/Client ID: enter the Client ID created from Step 2.4.
    • Certificate ID: paste the Certificate ID recorded in Step 3.4.
  2. When you are finished, click Connect. If the connection is successful, you will be redirected to your Anrok Data Sources tab. In any other case, contact us for additional assistance.

Your authentication is complete, and no further action is needed. You should no longer see an info icon next to your NetSuite integration in your Anrok account. 

Proceed to the next section of this guide only if you also need to generate a new API key for your Anrok <> NetSuite connection.  


 

Update API Key and Secret

This is most commonly required when you generate (or "refresh") your sandbox from a NetSuite production account that has an existing Anrok integration. The API key originally associated with your Anrok account will not be valid for your sandbox. 

If you are receiving an "invalid API key" error from Anrok when invoicing in NetSuite, then update your Anrok API key in NetSuite to remediate.


Step 1

Generate an Anrok API key

Try generating an Anrok API key in the demo above ☝️

  1. In the Anrok app CleanShot 2023-07-20 at 12.02.21@2x.png, go to Data sources. Take me there!
  2. Under Integration sources, click the option menu button anrok_option_menu.png next to NetSuite, then select Manage Anrok API key.
  3. Select Generate Anrok API key, then copy  anrok_copy.png  the API key.
  4. When you are finished, click Done.

 


 

Step 2

Create an API secret in NetSuite

NetSuite requires an Anrok API secret to authenticate its communication with Anrok and send live transaction data. This prevents users outside of your NetSuite instance from adding unauthorized transactions to your Anrok account.

Try creating an Anrok API secret in the demo above ☝️

  1. In the NetSuite app CleanShot 2023-07-28 at 16.20.15@2x.png, go to Setup > Company > API Secrets.
  2. Click Create New, then under the Details tab, enter the following information:
    • Name — enter Anrok API Token.
    • ID — enter _anrok_api_token.
      • Note: this value must be exact in your NetSuite account. If you have a pre-existing _anrok_api_token, you should delete the historical version, then create a new record. 
    • Password — paste your Anrok API key.
  3. Navigate to the Restrictions tab, then complete the following:
    • Select the checkbox  CleanShot 2023-07-31 at 11.51.24@2x.png  next to Allow For All Scripts.
    • Select the checkbox  CleanShot 2023-07-31 at 11.51.24@2x.png  next to Allow For All Domains.
  4. When you are finished, click Save.

 

Can't find what you're looking for?

Submit a request to our customer care team!