Skip to content

feat(netsuite): add Oracle NetSuite integration - #6476

Open
BillLeoutsakosvl346 wants to merge 2 commits into
stagingfrom
feat/oracle-netsuite-integration
Open

feat(netsuite): add Oracle NetSuite integration#6476
BillLeoutsakosvl346 wants to merge 2 commits into
stagingfrom
feat/oracle-netsuite-integration

Conversation

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor

Summary

  • add an Oracle NetSuite block with 27 SuiteTalk operations
  • support OAuth 2.0 client-credentials authentication with certificate signing
  • add the official NetSuite icon, templates, skills, catalog metadata, tests, and setup documentation
  • exclude RESTlets, arbitrary API requests, and triggers

Type of Change

  • Feature

Testing

  • 30 focused NetSuite tests
  • full lint and type-check
  • all 22 repository audits
  • block registry, tool metadata, integration catalog, icon, and registry-boundary checks
  • independent integration validation

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Aug 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Aug 9, 2026 4:31pm

Request Review

@cursor

cursor Bot commented Aug 9, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
New ERP integration with inline PEM private keys and broad record write/batch/async capabilities increases blast radius if validation or error sanitization fails, though scope is bounded (no triggers, no arbitrary requests) and covered by focused tests.

Overview
Adds a full Oracle NetSuite workflow block and catalog/docs surface wired to 27 SuiteTalk REST tools—records, SuiteQL, SuiteAnalytics datasets, metadata, async batches, and job polling—without RESTlets, arbitrary HTTP, or triggers.

The block uses inline OAuth 2.0 client-credentials fields (account ID, client ID, certificate ID, masked PEM private key), operation-specific sub-blocks with JSON for account-dynamic record bodies, paging/batch limits, and seven templates plus five agent skills. Docs cover M2M setup; NetSuiteIcon and registry/catalog/icon mappings register the integration.

Tool execution (shared directExecution path) signs PS256 JWT assertions, caches tokens with refresh skew and 401 retry, enforces paging and 100-record batch bounds, parses async Location/jobId, and sanitizes errors so credentials do not leak.

Reviewed by Cursor Bugbot for commit cdd5240. Bugbot is set up for automated code reviews on this repo. Configure here.

@greptile-apps

greptile-apps Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR adds an Oracle NetSuite integration with 27 SuiteTalk operations and OAuth 2.0 client-credentials authentication.

  • Adds record, query, dataset, metadata, batch, and asynchronous-job tools.
  • Registers the block, tool metadata, catalog entry, icons, templates, skills, tests, and setup documentation.
  • The latest changes bind cached access tokens to a SHA-256 fingerprint of the supplied private key and use the required absolute alias in the block test.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
apps/sim/tools/netsuite/utils.ts Implements SuiteTalk request handling and OAuth token caching; the current cache key correctly separates distinct private keys.
apps/sim/tools/netsuite/utils.test.ts Covers credential validation, token reuse, private-key cache isolation, eviction, retries, and response handling.
apps/sim/blocks/blocks/netsuite.ts Defines the 27-operation NetSuite block, credential fields, conditional inputs, parameter coercion, templates, and skills.
apps/sim/blocks/blocks/netsuite.test.ts Validates the block contract and now uses the repository-standard absolute import alias.
apps/sim/tools/netsuite/index.ts Exposes the complete NetSuite tool collection through the tool registry.
apps/docs/content/docs/en/integrations/netsuite.mdx Documents NetSuite setup, OAuth client credentials, supported operations, pagination, and asynchronous batch usage.

Sequence Diagram

sequenceDiagram
  participant Workflow
  participant Tool as NetSuite Tool
  participant Cache as Token Cache
  participant OAuth as NetSuite OAuth
  participant API as SuiteTalk API
  Workflow->>Tool: Execute operation with credentials
  Tool->>Tool: Fingerprint trimmed private key
  Tool->>Cache: Lookup account/client/certificate/key tuple
  alt Valid cached token
    Cache-->>Tool: Access token
  else Cache miss
    Tool->>OAuth: Signed client-credentials assertion
    OAuth-->>Tool: Access token
    Tool->>Cache: Store bounded token entry
  end
  Tool->>API: SuiteTalk request
  API-->>Tool: Operation response
  Tool-->>Workflow: Status, data, location, job ID
Loading

Reviews (2): Last reviewed commit: "fix(netsuite): isolate cached credential..." | Re-trigger Greptile

Comment thread apps/sim/tools/netsuite/utils.ts
Comment thread apps/sim/blocks/blocks/netsuite.test.ts Outdated
@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptile

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit cdd5240. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant