You can authenticate with NetSuite 2016 CRM to create your own instance of the NetSuite 2016 CRM element through the UI or through APIs. Once authenticated, you can use the element instance to access the different functionality offered by the NetSuite 2016 CRM platform.
Use the UI to authenticate with NetSuite 2016 CRM and create an element instance. NetSuite 2016 CRM authentication uses either Custom (Netsuite's Token-Based) or Basic authentication, and you'll need to sign in to NetSuite 2016 CRM as part of the process. See the setup page for more details on how to obtain the authentication information you'll need.
If you are configuring events, see the Events section.
To authenticate an element instance:
Complete the fields required for your selected authentication type:
Basic | Custom |
---|---|
Consumer Key | |
User Password | Consumer Secret |
App ID | Access Token ID |
Access Token Secret |
Click Show Optional Fields.
Choose whether to enforce single sessions:
true
to you ensure that Cloud Elements does not send multiple requests to your NetSuite 2016 CRM at one time. This may be necessary for certain trial NetSuite accounts.false
to allow multiple requests. You must also provide a Single Session Lock Key which can be any alphanumeric value that is unique within the Cloud Elements environment.Optionally type or select one or more Element Instance Tags to add to the authenticated element instance.
Click Create Instance.
Provide your NetSuite 2016 CRM credentials, and then allow the connection.
After successfully authenticating, we give you several options for next steps. Make requests using the API docs associated with the instance, map the instance to a virtual resource, or use it in a formula template.
Authenticating through API is similar to authenticating via the UI. Instead of clicking and typing through a series of buttons, text boxes, and menus, you will instead send API calls to our /instances
endpoint. The end result is the same, though: an authenticated element instance with a token and id for future API calls.
If you are configuring events, see the Events section.
To create an element instance:
Construct a JSON body based on your authentication type, either Basic or Custom. See Parameters for detailed descriptions.
Basic Authentication
{
"element": {
"key": "netsuitecrmv2"
},
"configuration": {
"netsuite.sandbox": false,
"netsuite.accountId": "my_account_id",
"netsuite.single.session": true,
"netsuite.single.session.key": "my_unique_key",
"authentication.type": "Basic",
"user.username": "my@somewhere.com",
"user.password": "my_secret_password",
"netsuite.appId": "my_app_id",
"event.notification.enabled": false
},
"tags": [
"<Add_Your_Tag>"
],
"name": "<INSTANCE_NAME>"
}
Custom Authentication
{
"element": {
"key": "netsuitecrmv2"
},
"configuration": {
"netsuite.sandbox": false,
"netsuite.accountId": "my_account_id",
"netsuite.single.session": true,
"netsuite.single.session.key": "my_unique_key",
"authentication.type": "custom",
"consumer_key": "consumer_key_1234567",
"consumer_secret": "secret_1234567",
"token_id": "token_1234",
"token_secret": "token_secret_1234",
"filter.response.nulls": true,
"event.notification.enabled": false
},
"tags": [
"<Add_Your_Tag>"
],
"name": "<INSTANCE_NAME>"
}
Call the following, including the JSON body you constructed in the previous step:
POST /instances
Locate the token
and id
in the response and save them for all future requests using the element instance.
curl -X POST \
https://api.cloud-elements.com/elements/api-v2/instances \
-H 'authorization: User <USER_SECRET>, Organization <ORGANIZATION_SECRET>' \
-H 'content-type: application/json' \
-d '{
"element": {
"key": "netsuitecrmv2"
},
"configuration": {
"netsuite.sandbox": false,
"netsuite.accountId": "my_account_id",
"netsuite.single.session": true,
"netsuite.single.session.key": "my_unique_key",
"authentication.type": "Basic",
"user.username": "my@somewhere.com",
"user.password": "my_secret_password",
"netsuite.appId": "my_app_id",
"event.notification.enabled": false
},
"tags": [
"Accounting"
],
"name": "NetSuite Instance 1"
}'
curl -X POST \
https://api.cloud-elements.com/elements/api-v2/instances \
-H 'authorization: User <USER_SECRET>, Organization <ORGANIZATION_SECRET>' \
-H 'content-type: application/json' \
-d '{
"element": {
"key": "netsuitecrmv2"
},
"configuration": {
"netsuite.sandbox": false,
"netsuite.accountId": "my_account_id",
"netsuite.single.session": true,
"netsuite.single.session.key": "my_unique_key",
"authentication.type": "custom",
"consumer_key": "consumer_key_1234567",
"consumer_secret": "secret_1234567",
"token_id": "token_1234",
"token_secret": "token_secret_1234",
"filter.response.nulls": true,
"event.notification.enabled": false
},
"tags": [
"Accounting"
],
"name": "NetSuite Instance 1"
}'
See setting up the NetSuite service for information on how to obtain authentication parameters.
Parameter | Description | Data Type | Required |
---|---|---|---|
'key' | The element key. netsuitecrmv2 |
string | |
Namename |
The name for the element instance created during authentication. | Body | |
Connect TO Sandboxnetsuite.sandbox |
whether to use a NetSuite sandbox | boolean | Y |
Account IDnetsuite.accountId |
the NetSuite account ID | string | Y |
Enforce Single Session netsuite.single.session |
whether to use single session to limit API requests to this account | boolean | N |
Specify Single Session Lock Keynetsuite.single.session.key |
the unique key for this single session (only applicable if single session = true) | Y if enforcing | |
Authentication Typeauthentication.type |
the authentication type, which must be either casic or custom |
string | Y |
Emailuser.username |
the email of a NetSuite authenticated user (only applicable for Basic authentication) |
string | Y if Basic Authentication |
User Passworduser.password |
the password of a NetSuite authenticated user (only applicable for Basic authentication) |
string | Y if Basic Authentication |
App ID netsuite.appId |
the App ID of a NetSuite integration (only applicable for Basic authentication) |
string | Y if Basic Authentication |
Consumer Keyconsumer_key |
For Custom authentication, the consumer key of a token-based NetSuite integration. | string | Y if Token Based Authentication |
Consumer Secretconsumer_secret |
For Custom authentication, the consumer secret of a token-based NetSuite integration. | string | Y if Token Based Authentication |
Access Token ID token_id |
For Custom authentication, the token ID of a token-based NetSuite integration. | string | Y if Token Based Authentication |
Access Token Secrettoken_secret |
For Custom authentication, the token secret of a token-based NetSuite integration. | string | Y if Token Based Authentication |
Filter null values from the responsefilter.response.nulls |
whether or not to filter out null values from the response | boolean | N |
In this example, the authenticated element instance ID is 12345
and token starts with ABC/D...
. Your values will be different. Make sure that you save the id
and token
for future requests.
{
"id": 12345,
"name": "NetSuite Instance 1",
"token": "ABC/D/efgHIJK1234lmnopQRS+1tuVWx+yz98765",
"element": {
"id": 988,
"name": "NetSuite Instance 1",
"key": "netsuitecrmv2",
"description": "NetSuite 2016 CRM.",
"active": true,
"deleted": false,
"typeOauth": true,
"trialAccount": false,
"configDescription": "NetSuite 2016 CRM",
"signupURL": ""
},
"provisionInteractions": [],
"valid": true,
"eventsEnabled": true,
"disabled": false,
"maxCacheSize": 0,
"cacheTimeToLive": 0,
"cachingEnabled": false
}