RedPlanetHQ/core

New Integration: NetSuite

开放

#526 创建于 2026年2月24日

 (0 条评论) (0 个反应) (0 位负责人)TypeScript (184 个派生)auto 404
enhancementgood first issueintegrationnew-featurenew-integration

仓库指标

星标
 (1,930 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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

贡献者指南