RedPlanetHQ/core

New Integration: NetSuite

Aberta

#526 aberto em 24 de fev. de 2026

 (0 comentário) (0 reação) (0 responsável)TypeScript (184 forks)auto 404
enhancementgood first issueintegrationnew-featurenew-integration

Métricas do repositório

Stars
 (1.930 estrelas)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

Description

Add Oracle NetSuite integration to sync ERP data including financial records, inventory, customers, vendors, sales orders, and accounting data into CORE.

Reference Implementations

Existing Integrations (use as templates)

  • integrations/hubspot/ - Similar enterprise/CRM data system
  • integrations/linear/ - Project management integration
  • integrations/slack/ - For reference

Required Files Structure

integrations/netsuite/
├── src/
│   ├── index.ts          # Main entry, OAuth spec
│   ├── schedule.ts       # Sync logic
│   ├── utils.ts          # NetSuite API utilities
│   ├── account-create.ts # OAuth setup
│   └── create-activity.ts # Activity formatting
├── package.json
├── tsup.config.ts
└── README.md

NetSuite API Integration

OAuth Setup

Key Endpoints

  • GET /record/v1/{recordType} - List records (customers, invoices, etc.)
  • GET /record/v1/{recordType}/{id} - Get record details
  • POST /record/v1/{recordType} - Create record
  • PATCH /record/v1/{recordType}/{id} - Update record
  • DELETE /record/v1/{recordType}/{id} - Delete record
  • POST /query/v1/suiteql - Execute SuiteQL queries
  • GET /record/v1/metadata-catalog - Get record metadata

Events to Track

  1. Financial - Invoice created, payment received, journal entry posted, budget updated
  2. Sales - Sales order created, estimate sent, opportunity updated
  3. Inventory - Item received, item fulfilled, inventory adjusted, transfer order
  4. Customers/Vendors - Customer created, vendor added, contact updated
  5. Accounting - GL entry posted, period closed, reconciliation completed

Implementation Tasks

  • Set up basic integration structure following integrations/github/src/index.ts pattern
  • Implement OAuth/TBA authentication flow in account-create.ts
  • Create API utilities in utils.ts for NetSuite REST API calls
  • Implement sync logic in schedule.ts for financial and ERP data
  • Convert ERP events to CORE activity format
  • Add error handling and rate limiting
  • Create integration documentation
  • Add to integrations/README.md

Technical Notes

  • SuiteTalk REST Web Services extend SuiteTalk capabilities with a REST-based interface
  • CRUD operations available for all NetSuite record types
  • SuiteQL enables SQL-like querying of NetSuite data through REST
  • REST API Browser provides summary of all records, sublists, schema definitions, and operations
  • Account ID is tenant-specific and part of the base URL
  • Consider handling sublists and subrecords for complex record types
  • Supports resource metadata for dynamic schema discovery

Resources

Labels

enhancement, integration, new-feature

Guia do colaborador