It's always good to try new things,
so here I am checking out OIC integration with Netsuite.
This post covers the following -
1. Creating a new user in Netsuite, giving them login permissions and assigning roles.
2. Activating that user in Netsuite for web services access.
3. Creating a connection to Netsuite in OIC, leveraging the user created.
4. Creating a simple integration to Netsuite - Contact Creation.
5. Troubleshooting - what permissions does my user need to create a contact in Netsuite.
6. Validating the result via the Netsuite Web Services Usage Log
I begin with a discussion of the OIC connection to Netsuite -
Connecting to Netsuite from OICFor those who like reading Oracle documentation -
OIC Netsuite adapter documentation is here
Pre-requisite is naturally a Netsuite account/user.
Creating a Netsuite user is discussed in the next section.
But let's begin by looking at the the connection definition -
WSDL: This I set to
Netsuite provides a handy schema browser for those interested in viewing
all records, fields, lists, enumerations, operations, warnings,
errors, and faults in Netsuite SOAP web services.
Just click here to view.
Now to the Security settings -
Email Address is essentially your NetSuite login
Account is your company's Netsuite account - an account will be created for you, when you subscribe to Netsuite.
This is surfaced in your Netsuite URL -
Role is the Netsuite role you will use when leveraging the Netsuite adapter in OIC.
Think of it, a Netsuite user can have one or more roles assigned to her. Here you specify
which of these roles you want to use when accessing Netsuite via web services.
Password is the user's Netsuite password.
Now a short introduction to roles in Netsuite -
Roles in NetsuiteThere are, of course, a plethora of functional roles within Netsuite -
Roles have a name e.g. Administrator, CEO etc. and an internal Id.
This Id is used as the role value in my OIC connection to Netsuite.
Just to remind you, I set this to 1047.
One can view the internal id in Netsuite - Manage Roles -
Per default the internal id is not displayed, but I can do so,
by simply adding it to the search results -
Now the internal id is visible -
Here is my Ecommerce Manager with the internal Id 1047 -
Roles have Permissions - specifying what one can do in Netsuite -
e.g. the role Ecommerce Manager has Full permissions on Cash Sales,
but only View rights on Adjust Inventory.
Note the permissions are classified into different groups -
The two that interest me now are Transactions and Lists.
Transactions - e.g. doing something - Adjusting the Inventory
Lists - NetSuite provides lists for all of the major record types,
including customers, transactions, opportunities, and events.
Now to creating a new Employee in Netsuite -
Creating a new Employee in Netsuite
I create a new employee - Niall Mac Cumascaigh -
checking the box - GIVE ACCESS
I assign a couple of roles - including Ecommerce Manager -
The Netsuite API allows for automated communication between connected systems,
e.g. OIC and Netsuite. But this API Access must be enabled.
Go to Setup -
Add my new user - You too may want to create a specific Netsuite
user for OIC integration.
OIC Integration with Netsuite
Back in OIC - I test the Netsuite Connection
I now create a simple integration that will create a Contact in Netsuite -
I test this via Postman - and see the following error -
Looks like my user - Niall Mac Cumascaigh with the role Ecommerce Manager
doesn't have permissions to create a Contact.
I check in Netsuite - Setup - Users/Roles - Manage Roles
As you can see, only view rights on Contact have been specified.
I now change this.
Ok, so back to my favourite tool - Postman - I re-run the test to create a
Contact in Netsuite.
The result is the ID from Netsuite.
Now, I check in Netsuite -
Mapping for Creating a Contact in NetsuiteFinally, let's look at the mapping in OIC for the new contact.
I am no Netsuite expert, so I began by creating a contact in the Netsuite UI,
to work out which fields are mandatory - Name and Subsidiary.
Subsidiary is the division of my company to which this contact belongs.
firstName, lastName and email come from my REST Request Payload.
I have hardcoded the internalId (=1)of the Subsidiary with the id of Honeycomb Mfg.
Where did I find this value?
Setup - Company - Subsidiaries - Search
Add Internal ID to the Search Results -
One can also view this via the Netsuite Web Services Usage Log.
Netsuite Web Services Usage LogHere is a new contact -
Let's check this out -
Note the ability to specify search criteria - I choose
I can view the request/response -
Here is the request -
The response -
Grand - as we say in Ireland!