Adapter Configuration

Adapter Class - This value must be added to the adapters.json configuration file:

com.kineticdata.calendar.adapters.netsuite.NetsuiteAdapter

Connection Configuration

Consumer Id, Consumer Secret, & Application Id

To be able to authenticate and use the NetSuite SOAP API an Integration needs to be created. Upon creation, each Integration is also assigned a Consumer Id/Secret and an Application Id (which are used as authentication values for the NetSuite Calendar Adapter).

Creating an Integration

After creating, copy and save the Consumer Id, Consumer Secret, and Application Id because they won't be able to be accessed again after you leave this page.

Token Id and Token Secret

In order to allow concurrent requests, Token-Based Authentication needs to be used to make the NetSuite SOAP API calls. To use successfully do this an Access Token/Secret need to be created and passed as authentication values for the Adapter.

When in the NetSuite Consoles (as opposed to the Schema Browser), generally an easy way to determine the desired object's name is to go to a search list and look for the searchType in the URL.

ie. A search of employees shows a URL of https://system.na3.netsuite.com/app/common/search/search.nl?searchtype=Employee&whence= and we can confirm using the Schema Browser that Employee does indeed have both EmployeeSearch and EmployeeSearchAdvanced methods

Anything objects with a Search and SearchAdvanced method also seem to require a corresponding SearchBasic object, so looking under the Search section here should be another good way to determine what Standard Objects are available to use.

Custom Objects

Custom Objects are determined based on the Custom Record Id

The Configuration Object for a custom record is going to be in the form of custom_{customId}

ie. If a Custom Record Id is 129, the Configuration Object will be custom_129

How to determine the Custom Record Id?

An easy way to determine the Custom Record Id is to view a single record and to look in the URL for the recType={customId}

ie. https://system.na3.netsuite.com/app/common/custom/custrecordentry.nl?rectype=219&id=101&whence= has a Custom Record Id of 219

Saved Search Id

Queries/Filters in this adapter are handled by setting up a Saved Search in NetSuite and then referencng that Id in the adapter configuration

A Saved Search is not required, although if a Saved Search Id is not supplied all records for a type are returned and displayed in the calendar

When viewing a Saved Search, the Saved Search Id that should be used in the calendar can be found in the URL as searchid={id}

Use Search Columns

true or false (string) - Determines whether the Adapter retrieves the fields directly from the records or from a search result set

If set to true, the fields returned from the Adapter call will be the ones defined in the Saved Search result set

If set to false, the fields returned from the Adapter call will be all the fields attached to the mapped Object

Field Mappings

Required Fields (Core Mappings)

Id: A unique id for the object being returned

Name: Field that should be displayed as the main name identifier for a calendar event

Description: A short description of the event

Start: A date/time field denoting the start of the event (expected in iso8601 format)

End: A date/time field denoting the end of the event (expected in iso8601 format)

IsAllDay: An optional Core Mapping field - a boolean denoting whether an event is specified as an All Day Event

Determining the NetSuite Field Mapping Values

Standard Fields

Standard Fields on Standard Objects can be found by looking at the {Object}SearchBasic model in the Schema Browser ({Object} is the field that was previously mapped

The scriptId for a custom field can be found in the Customization Management portion of NetSuite

Join Fields

If 'Use Search Columns' is set to true, there is a chance that the fields that will be returned will also contain join fields (fields attached to an object that is included in the returned object, ie. An opportunity references a location and you want to map the name field from that location object)

To do this, reference both the parent object and the subfield with a . in-between them

With the location name example (location field is 'location' and a name field of 'name'), the mapping would be location.name. If you wanted to map to the adress, you would do location.address