Skip to content

Commit

Permalink
Add NetSuite integration configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
mrtnzlml committed Feb 8, 2024
1 parent 7c3a89c commit 42168b1
Show file tree
Hide file tree
Showing 26 changed files with 167 additions and 5 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions docs/extensions/master-data-hub/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"label": "Master data hub",
"position": 1,
"link": {
"type": "generated-index",
"description": "TODO"
}
}
7 changes: 7 additions & 0 deletions docs/extensions/master-data-hub/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
sidebar_position: 1
---

:::warning[WORK IN PROGRESS]

:::
8 changes: 8 additions & 0 deletions docs/integrations/netsuite/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"label": "NetSuite",
"position": 1,
"link": {
"type": "generated-index",
"description": "5 minutes to learn the most important NetSuite concepts."
}
}
64 changes: 64 additions & 0 deletions docs/integrations/netsuite/configuration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
title: 'Configuration'
sidebar_position: 1
---

To configure an access token in NetSuite for SOAP communication, especially when there is no integration user yet, involves several steps that include creating an integration record in NetSuite, setting up a role with the necessary permissions, creating an integration user, and then generating the access token. Below is a step-by-step guide:

## 1. Create an Integration Record in NetSuite

1. **Log in to your NetSuite account** as an administrator (https://system.netsuite.com/).
1. Navigate to **Setup > Integrations > Manage Integrations > New**.
1. Fill in the **Name** of the integration and ensure that **State** is enabled.
1. Check the **Token-Based Authentication** to use token-based auth along with SOAP.
1. **Save** the integration. Note the **Consumer Key** and **Consumer Secret** presented upon saving; these are important for authentication.

![NetSuite Integration configuration](./img/netsuite-integration.png)

## 2. Create a Role with Necessary Permissions

1. Navigate to **Setup > Users/Roles > Manage Roles > New**.
1. Provide a **Name** for the role and assign it permissions necessary for the operations the integration will perform. At a minimum, for SOAP communication, you might need permissions like **SOAP Web Services, Log in using Access Tokens**, and any specific permissions related to the data you wish to access or modify (Lists).
1. **Save** the role.

![NetSuite Role configuration](./img/netsuite-role.png)

## 3. Create an Integration User

1. Go to **Lists > Employees > Employees > New**.
1. Fill in the necessary information for the user. Under the **Access** tab, ensure you **Check** the **Give Access** option, set a **Password**, and **Assign the Role** you created earlier.
1. **Save** the employee record.

## 4. Generate the Access Token

1. Log in as the user who will be the integration user, or have them log in.
1. Navigate to **Setup > Users/Roles > Access Tokens > New**.
1. Select the **Application Name** (the integration you created in Step 1), the **User**, and the **Role** you've assigned to this integration.
1. **Save** to generate the Token ID and Token Secret.

## 5. Use the Access Token in SOAP Communication

With the Consumer Key, Consumer Secret, Token ID, and Token Secret, you can now configure Rossum.ai SOAP client for communication with NetSuite:

```json
{
"ACCOUNT": "__change_me__",
"API_URL": "__change_me__",
"WSDL_URL": "https://webservices.netsuite.com/wsdl/v2022_1_0/netsuite.wsdl",
"CONSUMER_KEY": "__change_me__",
"CONSUMER_SECRET": "__change_me__",
"TOKEN_KEY": "__change_me__",
"TOKEN_SECRET": "__change_me__",
"ROSSUM_PASSWORD": "__change_me__",
"ROSSUM_USERNAME": "__change_me__"
}
```

Account ID (`ACCOUNT`) can be found under **Setup > Company > Company Information**.

## Important Notes

- Ensure your NetSuite account has the **Token-Based Authentication** feature enabled. This can be checked and enabled under **Setup > Company > Enable Features > SuiteCloud**.
- The permissions assigned to the role will dictate what operations can be performed through the SOAP API. Make sure to adjust these according to the least privilege principle, granting only the permissions necessary for the tasks the integration will perform.

This process sets up a secure method for your application or integration to communicate with NetSuite using SOAP. If you encounter any specific issues during setup or need more detailed instructions, NetSuite's official documentation and support resources can provide additional guidance tailored to the latest platform updates and best practices.
10 changes: 10 additions & 0 deletions docs/integrations/netsuite/export-webhook.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: 'Export webhook'
sidebar_position: 3
---

:::warning[WORK IN PROGRESS]

TODO: describe how to configure exports of VendorBills, VendorCredits, ... (common use-cases)

:::
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/integrations/netsuite/img/netsuite-role.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions docs/integrations/netsuite/import-webhook.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
title: 'Import webhook'
sidebar_position: 2
---

:::warning[WORK IN PROGRESS]

TODO: describe how to configure full and differential imports or various types

:::

## Full data imports

Schedule: `0 0 * * 6`

```json
{
"import_config": [
{
"ns_type": "Item",
"search_type": "search",
"master_data_name": "NS_InventoryItem",
"basic_search_config": {
"attributes": [
{
"ns_type": "SearchEnumMultiSelectField",
"operator": "anyOf",
"searchValue": "_inventoryItem",
"attribute_name": "type"
}
]
}
}
],
"concurrency_limit": 1
}
```
18 changes: 15 additions & 3 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// There are various equivalent ways to declare your Docusaurus config.
// See: https://docusaurus.io/docs/api/docusaurus-config

import {themes as prismThemes} from 'prism-react-renderer';
import { themes as prismThemes } from 'prism-react-renderer';

/** @type {import('@docusaurus/types').Config} */
const config = {
Expand Down Expand Up @@ -77,9 +77,21 @@ const config = {
type: 'docSidebar',
sidebarId: 'tutorialSidebar',
position: 'left',
label: 'Tutorial',
label: 'Integrations',
},
{to: '/blog', label: 'Blog', position: 'left'},
{
type: 'docSidebar',
sidebarId: 'extensionsSidebar',
position: 'left',
label: 'Extensions',
},
{
type: 'docSidebar',
sidebarId: 'docusaurusSidebar',
position: 'left',
label: 'Docusaurus',
},
{ to: '/blog', label: 'Blog', position: 'left' },
{
href: 'https://github.com/rossumai-community/cookbook',
label: 'GitHub',
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
},
"devDependencies": {
"@docusaurus/module-type-aliases": "3.1.0",
"@docusaurus/types": "3.1.0"
"@docusaurus/types": "3.1.0",
"prettier": "^2.8.8"
},
"browserslist": {
"production": [
Expand Down
8 changes: 8 additions & 0 deletions prettier.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
bracketSpacing: true,
printWidth: 100,
singleQuote: true,
tabWidth: 2,
trailingComma: 'all',
quoteProps: 'consistent',
};
4 changes: 3 additions & 1 deletion sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
const sidebars = {
// By default, Docusaurus generates a sidebar from the docs folder structure
tutorialSidebar: [{type: 'autogenerated', dirName: '.'}],
tutorialSidebar: [{ type: 'autogenerated', dirName: 'integrations' }],
docusaurusSidebar: [{ type: 'autogenerated', dirName: 'docusaurus' }],
extensionsSidebar: [{ type: 'autogenerated', dirName: 'extensions' }],

// But you can create a sidebar manually
/*
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6671,6 +6671,11 @@ postcss@^8.4.17, postcss@^8.4.21, postcss@^8.4.26, postcss@^8.4.31:
picocolors "^1.0.0"
source-map-js "^1.0.2"

prettier@^2.8.8:
version "2.8.8"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da"
integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==

pretty-error@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-4.0.0.tgz#90a703f46dd7234adb46d0f84823e9d1cb8f10d6"
Expand Down

0 comments on commit 42168b1

Please sign in to comment.