4.2.4.34. Netsuite Gateway In
In Babelway, we now have a Netsuite gateway in that allows clients to pull INVOICES (only) from their Netsuite platform using SOAP web services (note that it is possible to fetch any other type of document using the HTTP advanced client gateway but it is trickier - there’s a how to in the help guide that I’ll adapt with that).
In order to do this, create a Netsuite gateway IN. ALL the parameters needed to complete the gateway come from your Netsuite setup (see matching Netsuite setup section below):
The messages the gateway generates are XML and contain both some internal Netsuite metadata and the invoice data. Once you have created your gateway we recommend creating an “empty” channel (not defined, no transform, not defined, null gateway out). Use it to poll Netsuite once in order to have some sample content with which to create your message tree. In particular, the content will vary from one netsuite to another depending on the custom fields you’ve created. This will also allow you to troubleshoot the business errors that could arise from your setup: missing grants for certain documents, content updates (to update the Babelway date field) that could be blocked by business flows etc.
The Netsuite setup requirements
You need to be a netsuite administrator to be able to do this
Netsuite account ID
This is the easiest information to get: Setup > Setup Manager > Integration > SOAP Web Services Preferences > ACCOUNT ID:
Setting up an integration
Your netsuite needs to allow SOAP service calls and token integration:
Go to Setup > Setup Manager > Enable features > Suitecloud:
In the suitecloud tab, enable SOAP services and token based authentication:
You then need to create an integration record for Babelway:
You will be using the issue token integration flow which is configured as you can see below:
Make sure that:
- You choose a name that identifies your connection to Babelway
- The state is “enabled”
- That you select Token-based authentication where:
- Token-based authentication is checked
- TBA: ISSUETOKEN ENDPOINT is checked
- TBA:AUTHORIZATION FLOW is UNCHECKED
When you click save, the client key and secret will be displayed one time only. Use this in your babelway gateway configuration.
Getting an access token
Create a role to be used for this integration with the following permissions:
Transactions: The role will need to be able to update invoices (to update the babelway specific field):
Reports: SuiteAnalytics Workbook (allows the use of saved searches)
Lists: Perform search
Setup: Use access tokens
Attribute this new role to a user of your choice:
Create an access token for this user and this role:
Select your integration name, the user, the role you just attributed them.
The token information you receive after saving will only be displayed once and will be used in your gateway configuration.
Determine the list of documents to fetch
Babelway will require a custom date/time field which will be used to indicate the time at which the document was synchronized. Go to Customization > List, Records, & Fields > Transaction Body Fields
Add a field. Keep track of its ID for your babelway gateway. In the below example the field is “custbody11”:
Add your custom field to the invoice form that you plan on using:
Create a saved search that at the minimum includes the following criteria:
- Your new custom date time field is empty (avoids pulling duplicate invoices from Netsuite)
- The record type is Invoice
Add any other relevant criteria for your business integration requirements.
Keep track of your Saved Transaction Search ID for your babelway setup. In the above example, it is customsearch659.