If your Stuut team gave you an interactive OAuth 2.0 login link instead, complete that authorization rather than the M2M setup below. Don’t configure both methods unless Stuut asks you to switch.
Before you begin
You will need:- A NetSuite administrator who can create Integration Records and OAuth 2.0 Client Credentials (M2M) mappings
- Your NetSuite account ID (for example
1234567, or1234567-sb1for a sandbox), found under Setup → Company → Company Information - A Stuut administrator account
What Stuut syncs
Stuut is read-only by default. It writes to NetSuite only for the optional features you turn on (see Optional features).
Stuut reads through NetSuite’s REST Web Services and SuiteQL over HTTPS, and after the first import it fetches only records that changed.
Set up the connection
1. Enable NetSuite features
As a NetSuite administrator, go to Setup → Company → Enable Features. Enable:- OAuth 2.0 under SuiteCloud
- REST Web Services under SuiteCloud / SuiteTalk (Web Services)
- SuiteAnalytics Workbook under Analytics
2. Create the Stuut integration role
Go to Setup → Users/Roles → Manage Roles → New and name the role something likeStuut Integration.
Add these permissions:
Transactions
Reports
Lists
Setup
Log in using OAuth 2.0 Access Tokens is what allows M2M sign-in. The other permissions decide which records Stuut can read.
3. Assign the role to a dedicated service account
Create or choose a dedicated NetSuite employee record to act as Stuut’s service account, and assign it theStuut Integration role. Avoid using an individual administrator’s everyday account.
4. Start the connection in Stuut and download the certificate
- In Stuut, go to Settings → Connectors → All connectors and choose NetSuite.
- Enter your Account ID, choose Machine-to-machine (M2M), and continue.
- Click Download certificate to save
certificate.pem.

Configure NetSuite connection in Stuut
5. Create the Integration Record
In NetSuite, go to Setup → Integration → Manage Integrations → New. Set:- Name:
Stuut Collections - Production(or your preference) - State: Enabled
- Under OAuth 2.0, check Client Credentials (Machine to Machine) Grant
- Under Scope, check REST Web Services and RESTlets. RESTlets is only used for invoice PDFs, but leaving it on now saves editing the record later.
The confirmation page also shows a client secret. Stuut doesn’t use it, so you don’t need to record it.
6. Upload the certificate and map it to the role
Go to Setup → Integration → Manage Authentication → OAuth 2.0 Client Credentials (M2M) Setup and click Create New. Select:- Entity: the Stuut service-account employee from step 3
- Role:
Stuut Integration - Application: the Integration Record from step 5
- Certificate: upload the
certificate.pemyou downloaded in step 4
7. Enter the credentials in Stuut
Back in the Stuut window, paste the Client ID (step 5) and the Certificate ID (step 6), and continue. Stuut checks both values with NetSuite right away and shows any error on the same screen. These are the only two values you enter, and you enter them directly in Stuut. You don’t need to send anything to your Stuut contact.8. Skip or fill in the optional settings
Stuut then shows an Optional settings screen with the fields for the features described under Optional features, such as the invoice PDF RESTlet IDs and the last contact date field. None of them is required to connect.- If you haven’t set up any of these features yet, click Skip for now.
- If you have, fill in the fields you need and click Save and continue.
9. Validate the connection
Open the NetSuite connection in Stuut and click Check health. If everything is set up correctly, a success message appears and the first import starts.Optional features
Each feature below is configured through one or more settings on the NetSuite connection in Stuut. You can enter them on the Optional settings screen during setup (step 8) or at any time afterwards: go to Settings → Connectors, open the NetSuite connection, edit the fields on the Settings tab, and save.Invoice PDFs
To attach NetSuite invoice PDFs to Stuut emails, deploy a small RESTlet in your account. See NetSuite invoice PDFs (RESTlet).Cash-application write-back
Only set this up if Stuut will post payments to NetSuite. Add this permission to theStuut Integration role:
Then click Check health on the connection in Stuut. M2M connections pick up role changes without reconnecting. If you connected with an interactive OAuth 2.0 login, re-authorize the connection instead.
Tell your Stuut team if you want:
- A specific payment method on payments Stuut posts (for example, “Wire Transfer”). Otherwise NetSuite uses its default.
- Payments to post to a specific bank account instead of Undeposited Funds, NetSuite’s default.
Last contact date
Stuut can stamp a customer field with the date and time of its most recent outreach to that customer.- In NetSuite, create a Date/Time custom entity field that applies to customers (for example,
custentity_last_stuut_contact). - In Stuut, enter the field ID in Last contact date field, either on the Optional settings screen during setup or on the connection’s Settings tab.
Advanced settings
The Optional settings screen and the connection’s Settings tab have a few more fields for less common NetSuite setups, such as consolidated invoice records and invoice PDFs kept in the File Cabinet. Leave them blank unless your Stuut team tells you your account needs them.Certificate rotation and limits
- Stuut’s certificate is valid for two years. Check health starts warning 30 days before it expires.
- To rotate it, open the connection settings in Stuut and download the new certificate, upload it in NetSuite as a new M2M mapping (step 6), then enter the new Certificate ID in Stuut.
- NetSuite allows at most five active certificates for each combination of Integration Record, entity, and role.
Troubleshooting
"M2M authentication failed (400 invalid_client)" when entering credentials
"M2M authentication failed (400 invalid_client)" when entering credentials
The Certificate ID is wrong, most often because the client secret was pasted instead. The Client ID and client secret on NetSuite’s confirmation page are both 64-character strings; the Certificate ID is the 43-character value in the Certificate ID column of the M2M Setup row (step 6).
The connection shows Unhealthy right after connecting
The connection shows Unhealthy right after connecting
The role from step 6 is missing record permissions. Stuut shows NetSuite’s own reason, such as “Your current role does not have permission to perform this action.” Add the permissions from step 2 to the role, then click Check health. You don’t need to reconnect.
A sync fails with "Record '…' was not found"
A sync fails with "Record '…' was not found"
NetSuite reports a missing role permission as “Record ’…’ was not found”, so one sync fails while the others keep working. Add the permission for that record from step 2 to the role from step 6, then re-run the failed sync. You don’t need to reconnect. For example, the Bank accounts sync fails with “Record ‘Account’ was not found” until the role has Lists → Accounts (View).
Security
- Stuut connects over HTTPS (TLS 1.2 or later) and stores credentials encrypted at rest.
- With M2M, the private key never leaves Stuut, and no NetSuite user’s password or session is involved.