# Connect to NetSuite REST on Workato
The NetSuite REST connector supports OAuth 2.0 machine-to-machine (M2M) authorization. This enables Workato to securely access NetSuite without the need to store user credentials.
Complete the following steps to set up a NetSuite REST connection.
# Prerequisites
To connect to NetSuite in Workato, ensure you have the following:
- The privilege to create connections in Workato.
- Access to a NetSuite Admin account.
- An understanding of the required NetSuite permissions.
# Create an integration record in NetSuite
Complete the following steps to create a new integration record. The integration record represents an app, platform, or tool you want to integrate with NetSuite.
Navigate to Setup > Integration > Manage Integrations > New.
Navigate to Setup > Integration > Manage Integrations > New
Provide a name for the integration record in the Name field.
Clear the following checkboxes:
- TBA: Authorization flow
- Token-based authentication
- Authorization code grant
Select the Client credentials (machine to machine) grant checkbox.
Select the following scopes:
- RESTlets
- REST Web Services
- SuiteAnalytics Connect
Create an integration record in NetSuite
Click Save.
Copy the Consumer key / Client ID and Consumer secret / Client secret and store them in a secure location. The Consumer key / Client ID is required when configuring the NetSuite REST connection in Workato.
Copy the client credentials
# Create key and certificate files
Complete the following steps to create key and certificate files:
Open a new terminal window and use the following command to list available elliptic curves and algorithms:
openssl ecparam -list_curves
Generate a private key using the prime256v1
elliptic curve with this command:
openssl ecparam -name prime256v1 -genkey -noout -out private-key.pem
Create the corresponding public key from the private key:
openssl ec -in private-key.pem -pubout -out public-key.pem
Self-sign the private key and generate a PEM certificate:
openssl req -new -x509 -key private-key.pem -out cert.pem -days 365
# Create a machine-to-machine certificate in NetSuite
Complete the following steps to create a machine-to-machine certificate in NetSuite:
Navigate to Setup > Integration > OAuth 2.0 Client Credentials (M2M) Setup.
Click Create New. The Create a New Client Credentials Mapping dialog appears.
Configure the following fields:
- Entity
- Select the entity that uses the client credentials. Refer to our NetSuite SOAP connector documentation to learn how to set up an integration user.
- Role
- Choose the role that defines the permissions for the entity. Ensure the selected role has the necessary permissions for the integration. Refer to our NetSuite SOAP connector documentation to learn how to create an integration role.
- Application
- Select the integration record you created in the Create an integration record step.
- Certificate
- Upload the certificate you created in the Create key and certificate files step. The file should be saved on your computer as
cert.pem
.
Create a new client credentials mapping
Click Save.
Copy the Certificate ID and store it in a secure location. Workato requires this value to establish the NetSuite REST connection.
Copy the Certificate ID
# Configure the Workato NetSuite REST connector
Complete the following steps to establish a connection with NetSuite REST in Workato:
Connect to NetSuite REST
Enter a name for your NetSuite connection in the Connection name field.
Enter the folder or project where you plan to store your NetSuite connection in the Location field.
Enter your Account ID in the Account ID field.
To find your Account ID, sign in to NetSuite as an Administrator, navigate to Setup > Company > Company Information, and locate your account ID.
You can also find it at the beginning of the NetSuite URL. For example, if the URL is https://1234567.app.netsuite.com/
, your Account ID is 1234567
.
SANDBOX ACCOUNT ID FORMAT
You must replace underscores (_
) with a hyphen (-
) and capitalize letters if you are using a sandbox account. For example, 1234567_sb1
must be updated to 1234567-SB1
.
Enter the client ID you saved from the Create an integration record in NetSuite step into the Client ID field.
Enter the private key from the Create key and certificate files step into the EC Private Key field. Ensure the key is in PEM format and has a length of 256, 384, or 521 bits.
To extract the key, open the private-key.pem
file and copy the text, starting from -----BEGIN EC PRIVATE KEY-----
and ending with -----END EC PRIVATE KEY-----
.
Enter the certificate ID from the Create a machine-to-machine certificate in NetSuite step into the Certificate ID field.
Optional. Click Advanced settings > OAuth 2.0 scopes and select a value.
- Select OAuth 2.0 scopes and add them along with REST Web Services to define the minimum scope required for a NetSuite REST connection. You must enable the selected scopes in the corresponding integration record.
Optional OAuth 2.0 scope settings
Click Connect.
Last updated: 9/11/2024, 10:40:01 PM