1. Prerequisites
Before you start, make sure you have:- NetSuite Account ID
- A NetSuite admin user (or equivalent permissions)
- A dedicated NetSuite integration user and role for Margin
2. Enable NetSuite Features
In NetSuite, go to Setup > Company > Enable Features and enable:- SOAP WEB SERVICES
- REST WEB SERVICES
- TOKEN-BASED AUTHENTICATION
3. Create the Integration Record
- Go to Setup > Integration > Manage Integrations > New.
- Enable TOKEN-BASED AUTHENTICATION.
- Disable:
- TBA: AUTHORIZATION FLOW
- AUTHORIZATION CODE GRANT
- Save the integration.
- Copy the generated:
- Consumer Key
- Consumer Secret
4. Create Role, User, and Access Token
- Create a dedicated role in Setup > Users/Roles > Manage Roles.
- Assign permissions based on the data you want Margin to sync.
- Create a dedicated integration user and assign the role.
- Create an access token for that user + role:
- Admin path: Setup > Users/Roles > Access Tokens > New
- Non-admin path: Settings portlet > Manage Access Tokens > New My Access Token
- Copy:
- Token ID
- Token Secret
You can choose a broad role (faster onboarding) or a scoped role (least privilege). Margin works with either, as long as the role can authenticate with TBA, access web services, and read the records you want to sync.
5. Connect NetSuite in Margin
In Marginโs NetSuite connection form, enter:| Field | Value |
|---|---|
| Account ID | NetSuite account ID |
| Consumer Key | Integration consumer key |
| Consumer Secret | Integration consumer secret |
| Token ID | Access token ID |
| Token Secret | Access token secret |
6. Common Issues
- 401 / authentication error: verify Account ID, Consumer Key/Secret, and Token ID/Secret.
- Permission errors: update the integration role to include missing record or web service permissions.
- Sandbox mismatch: recreate tokens in each NetSuite environment (tokens are environment-specific).
7. NetSuite References
Next Steps
Once NetSuite is connected, continue to data modelling.๐ Data Modelling
Align ERP and accounting data with your event data for reconciled unit economics

