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 systemintegrations/linear/- Project management integrationintegrations/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
- Use OAuth 1.0 (Token-Based Authentication) or OAuth 2.0
- SuiteTalk REST Web Services for RESTful access
- REST API Browser for interactive exploration
- Base URL:
https://{accountId}.suitetalk.api.netsuite.com/services/rest/ - Developer docs: https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/chapter_1540391670.html
Key Endpoints
GET /record/v1/{recordType}- List records (customers, invoices, etc.)GET /record/v1/{recordType}/{id}- Get record detailsPOST /record/v1/{recordType}- Create recordPATCH /record/v1/{recordType}/{id}- Update recordDELETE /record/v1/{recordType}/{id}- Delete recordPOST /query/v1/suiteql- Execute SuiteQL queriesGET /record/v1/metadata-catalog- Get record metadata
Events to Track
- Financial - Invoice created, payment received, journal entry posted, budget updated
- Sales - Sales order created, estimate sent, opportunity updated
- Inventory - Item received, item fulfilled, inventory adjusted, transfer order
- Customers/Vendors - Customer created, vendor added, contact updated
- Accounting - GL entry posted, period closed, reconciliation completed
Implementation Tasks
- Set up basic integration structure following
integrations/github/src/index.tspattern - Implement OAuth/TBA authentication flow in
account-create.ts - Create API utilities in
utils.tsfor NetSuite REST API calls - Implement sync logic in
schedule.tsfor 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
- NetSuite REST API Overview
- NetSuite REST API Browser
- SuiteTalk REST Web Services Guide
- NetSuite API Reference
- NetSuite Postman Collection
Labels
enhancement, integration, new-feature