Multi-entity Authentication – Legacy tax

Introduction

If you have two or more legally distinct selling entities in a single NetSuite instance that require connection to multiple Anrok instances, please follow the steps below to establish persistent authentication. Before starting these steps, please ensure you have multiple Anrok instances already provisioned, one for each legally distinct NetSuite selling entity. 

 


Step 1

Create the Anrok integration record in NetSuite

  1. In the NetSuite app CleanShot 2023-07-28 at 16.20.15@2x.png, go to Customization  > Lists, Records, & Fields > Record Types > New.
  2. Enter the following information: 
    • Name: Anrok Integration
    • ID: _anrok_integration
    • Access type: No Permissions Required for Internal Roles
    • Uncheck Include name field.
    • Click Save.
  3. Select the new Anrok Integration record from the Edit column. Click New Field to add the following new fields:
    • Subsidiary
      • Label: Subsidiary
      • ID: _subsidiary_anrok
      • Type: Free-Form Text
      • Click Save.
    • Secret name
      • Label: Secret name
      • ID: _secret_name_anrok
      • Type: Free-Form Text
      • Click Save.
    • Metadata
      • Label: Metadata
      • ID: _metadata_anrok
      • Type: Text Area
      • Click Save.

Step 2

Create Anrok integration entries for each subsidiary

  1. In the NetSuite app CleanShot 2023-07-28 at 16.20.15@2x.png, go to Customization  > Lists, Records, & Fields > Record Types.
  2. For each subsidiary that you would like to connect to Anrok, complete the following steps: 
    • Click New Record in the Anrok Integration row.
    • For subsidiary, provide the subsidiary internal ID that you would like to connect to Anrok. Example Subsidiary ID: 12
    • For secret name, use the naming format from the below example where the last digit of the name should be the subsidiary ID from the above step. 
      • Example: custsecret_anrok_api_token_12
      • Note: Make sure to replace 12 with your actual Subsidiary ID. 
    • Click Save.

Step 3

Generate an Anrok certificate for each separate entity

During this step, generate an Anrok certificate to use in NetSuite during Step 5. Complete Steps 3-7 one time for each subsidiary you are integrating to Anrok. If you have three subsidiaries, you will complete Steps 3-7 a total of three times.

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 4

Create Integration Record for Application

Once you've generated an Anrok certificate, you will need to create an individual integration record for that subsidiary. 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 {Subsidiary ID or Subsidiary Name} . For example, use something like Anrok client credentials oauth application 12-APAC for your company's APAC Subsidiary with Subsidiary ID: 12.
    • 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 5

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 for the current subsidiary. In the example provided above, that is Anrok client credentials oauth application 12-APAC.
    • 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 6

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 re-authenticate 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.

If successful, 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 to generate a new API key for each of your Anrok <> NetSuite connections.  


Step 7

Create an Anrok API key for each subsidiary

For each subsidiary that you would like to connect to Anrok, complete the following steps. Before generating the API key, make sure you are within the correct Anrok instance using the dropdown menu in the upper left of your Anrok account. Each subsidiary will have a different Anrok API key. 

  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 the NetSuite integration you would like to map to this subsidiary, then select Manage Anrok API key.
  3. Select Generate Anrok API key, then copy  anrok_copy.png  the API key.
  4. In the NetSuite app CleanShot 2023-07-28 at 16.20.15@2x.png, go to Setup > Company > API Secrets.
  5. Click Create New, then under the Details tab, enter the following information using subsidiary ID 1 as an example. You should replace 1 with your actual subsidiary ID in both the Name and ID fields. Using the example from above, the ID would be _anrok_api_token_12:  
    • Name — enter Anrok API Token {subsidiary_id}.
    • ID — enter _anrok_api_token_{subsidiary_id}.
    • Password — paste your Anrok API key.
  6. 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.
  7. When you are finished, click Save.
    • Note: If you have any extra Anrok API keys from the initial setup that are not tied to a specific subsidiary, you should also delete those API Secrets in NetSuite you are no longer using. 

If you have other remaining subsidiaries, complete Steps 3-7 for each remaining NetSuite Subsidiary and its corresponding Anrok account. Once this is completed for each subsidiary, your authentication is complete, and no further action is needed. You now have a persistent connection from NetSuite to each Anrok account.


 

Can't find what you're looking for?

Submit a request to our customer care team!