Skip to main content
Connect your NetSuite account to Margin using Token-Based Authentication (TBA).

1. Prerequisites

Before you start, make sure you have:
  1. NetSuite Account ID
  2. A NetSuite admin user (or equivalent permissions)
  3. 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

  1. Go to Setup > Integration > Manage Integrations > New.
  2. Enable TOKEN-BASED AUTHENTICATION.
  3. Disable:
    • TBA: AUTHORIZATION FLOW
    • AUTHORIZATION CODE GRANT
  4. Save the integration.
  5. Copy the generated:
    • Consumer Key
    • Consumer Secret

4. Create Role, User, and Access Token

  1. Create a dedicated role in Setup > Users/Roles > Manage Roles.
  2. Assign permissions based on the data you want Margin to sync.
  3. Create a dedicated integration user and assign the role.
  4. 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
  5. 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:
FieldValue
Account IDNetSuite account ID
Consumer KeyIntegration consumer key
Consumer SecretIntegration consumer secret
Token IDAccess token ID
Token SecretAccess token secret
Margin validates the credentials before enabling syncs.

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