Skip to content

@memberjunction/integration-connectors

Concrete integration connectors for the MemberJunction Integration Engine. This package provides connectors for CRM, accounting, membership, newsletter, and file-based systems — all implementing BaseIntegrationConnector from @memberjunction/integration-engine.

These connectors call live external APIs and extend BaseRESTIntegrationConnector.

Production connector for Salesforce CRM using the REST API v61.0 with full bidirectional sync.

Registration: @RegisterClass(BaseIntegrationConnector, 'SalesforceConnector')

Authentication — Two Supported Flows:

The connector auto-detects the auth flow based on the credentials provided.

1. Client Credentials Flow (recommended for new setups):

{
"authFlow": "client_credentials",
"loginUrl": "https://myorg.my.salesforce.com",
"clientId": "3MVG9...your-consumer-key",
"clientSecret": "D4A28...your-client-secret",
"apiVersion": "61.0"
}

2. JWT Bearer Token Flow (RS256, certificate-based):

{
"authFlow": "jwt_bearer",
"loginUrl": "https://login.salesforce.com",
"tokenUrl": "https://myorg.my.salesforce.com",
"clientId": "3MVG9...your-consumer-key",
"username": "integration-user@myorg.com",
"privateKey": "-----BEGIN RSA PRIVATE KEY-----\n...\n-----END RSA PRIVATE KEY-----",
"apiVersion": "61.0"
}
FieldRequiredDescription
loginUrlYesOrg URL. For Client Credentials: My Domain URL. For JWT: login.salesforce.com (prod) or test.salesforce.com (sandbox) as the JWT audience.
clientIdYesConnected App Consumer Key
clientSecretCC onlyClient Secret from Connected App
usernameJWT onlyIntegration user’s Salesforce email
privateKeyJWT onlyPEM-encoded RSA private key (matching X.509 cert uploaded to Connected App)
tokenUrlNoToken endpoint URL if different from loginUrl (e.g., My Domain URL for JWT flow)
apiVersionNoSalesforce REST API version (default: 61.0)
authFlowNoExplicit flow selection. Auto-detected: clientSecret present → client_credentials; privateKey + username present → jwt_bearer

Capabilities:

  • Full CRUD (Create, Read, Update, Delete)
  • SOQL-based search
  • Live schema discovery via Describe API (standard + custom objects)
  • Incremental sync with SystemModstamp watermarks and queryAll for deleted records
  • Governor limit tracking (throttles at 80%, pauses at 95%)
  • Automatic token caching and refresh

Standard Objects (9): Account, Contact, Lead, Opportunity, Task, Event, Case, Campaign, User (read-only)

Default field mappings:

Source ObjectTarget EntityKey Mappings
ContactContactsEmail (key), FirstName, LastName, Phone, MobilePhone, Title, Department, mailing address fields (12 total)
AccountCompaniesName (key), Industry, Phone, Website, billing address fields, Type, AnnualRevenue, NumberOfEmployees (10 total)
LeadContactsEmail (key), FirstName, LastName, Company, Phone, Title (6 total)

See also: Connector usage guide · Connected App setup guide

Production connector for HubSpot CRM using the V3 API with full bidirectional sync, including association objects.

Registration: @RegisterClass(BaseIntegrationConnector, 'HubSpotConnector')

Authentication: OAuth2 Bearer token via HubSpot Private App credentials.

Capabilities: Full CRUD, search, list, association fetching (v4 per-object associations endpoint)

Objects: Contacts, Companies, Deals, Owners, Tickets, Line Items, plus association objects (Contact↔Company, Deal↔Company, etc.)

Default field mappings:

Source ObjectTarget EntityKey Mappings
ContactsContactsemail (key), firstname, lastname, phone, company, lifecyclestage
CompaniesCompaniesname (key), domain, industry, city, state

Production connector for Rasa.io newsletter platform. Read-only — pulls newsletter and subscriber data.

Registration: @RegisterClass(BaseIntegrationConnector, 'RasaConnector')

Authentication: Basic auth (username/password) to obtain a JWT, scoped to a community ID.

Objects: Newsletters, Newsletter Sections, Newsletter Section Items, Subscribers

Production connector for Wicket membership management platform with full bidirectional sync.

Registration: @RegisterClass(BaseIntegrationConnector, 'WicketConnector')

Authentication: HMAC-SHA256 signed requests.

Capabilities: Full CRUD, search

These connectors integrate with accounting and ERP systems.

Production connector for Sage Intacct accounting/ERP using the XML Web Services API with full bidirectional sync.

Registration: @RegisterClass(BaseIntegrationConnector, 'SageIntacctConnector')

Authentication: Session-based — Sender ID/Password (app credentials) + User ID/Password authenticate via getAPISession, returning a session ID for subsequent requests.

Credentials JSON:

{
"CompanyId": "your-company-id",
"SenderId": "your-sender-id",
"SenderPassword": "your-sender-password",
"UserId": "your-user-id",
"UserPassword": "your-user-password",
"EntityId": "optional-entity-id"
}
FieldRequiredDescription
CompanyIdYesSage Intacct Company ID
SenderIdYesWeb Services Sender ID (from Marketplace subscription)
SenderPasswordYesWeb Services Sender Password
UserIdYesUser ID for API authentication
UserPasswordYesUser password
EntityIdNoEntity ID for multi-entity shared companies

Capabilities:

  • Full CRUD (Create, Read, Update, Delete)
  • Query-based search via readByQuery
  • Paginated listing via readMore
  • Live schema discovery via inspect API
  • Incremental sync with WHENMODIFIED watermarks
  • Session caching and automatic refresh
  • Retry with exponential backoff

Objects (9): Customer, Vendor, GL Account, AP Bill, AR Invoice, Project, Employee, Department, Class

Default field mappings:

Source ObjectTarget EntityKey Mappings
CUSTOMERContactsCUSTOMERID (key), NAME, EMAIL, PHONE, STATUS
VENDORCompaniesVENDORID (key), NAME, EMAIL, PHONE, STATUS

Production connector for QuickBooks Online using the REST API v3 with OAuth 2.0 authentication.

Registration: @RegisterClass(BaseIntegrationConnector, 'QuickBooksConnector')

Authentication: OAuth 2.0 with automatic token refresh. Requires a QuickBooks app with client ID/secret and an initial refresh token obtained through the OAuth consent flow.

Credentials JSON:

{
"ClientId": "your-client-id",
"ClientSecret": "your-client-secret",
"RefreshToken": "your-refresh-token",
"RealmId": "your-company-realm-id",
"Environment": "production"
}
FieldRequiredDescription
ClientIdYesOAuth 2.0 Client ID from QuickBooks developer portal
ClientSecretYesOAuth 2.0 Client Secret
RefreshTokenYesOAuth 2.0 refresh token (auto-refreshed on each use)
RealmIdYesQuickBooks Company ID (Realm ID)
EnvironmentNoproduction (default) or sandbox

Capabilities:

  • Full CRUD (Create, Read, Update, Delete)
  • SQL-like query via QuickBooks Query Language
  • Paginated listing
  • Live schema discovery
  • Incremental sync with MetaData.LastUpdatedTime watermarks
  • Automatic OAuth token refresh
  • Minor version pinning for API stability

Objects (10): Customer, Vendor, Account, Invoice, Bill, Item, Payment, Employee, Department, Class

Default field mappings:

Source ObjectTarget EntityKey Mappings
CustomerContactsId (key), DisplayName, PrimaryEmailAddr, PrimaryPhone, Active
VendorCompaniesId (key), DisplayName, PrimaryEmailAddr, PrimaryPhone, Active

These connectors read from SQL Server databases and extend RelationalDBConnector.

Abstract base class for connectors backed by SQL Server via the mssql package.

Configuration JSON:

{
"server": "your-sql-server",
"database": "YourDatabase",
"user": "username",
"password": "password"
}

Shared capabilities:

  • TestConnection — runs SELECT @@VERSION
  • DiscoverObjects — queries INFORMATION_SCHEMA.TABLES
  • DiscoverFields — queries INFORMATION_SCHEMA.COLUMNS
  • FetchChangesFromTable — incremental fetch with watermark filtering and batch limiting
  • Connection pool caching per server+database pair

Reads from YourMembership database tables: ym_Members, ym_Events, ym_EventRegistrations, ym_Chapters, ym_MembershipLevels.

Registration: @RegisterClass(BaseIntegrationConnector, 'YourMembershipConnector')

Default field mappings:

Source ObjectTarget EntityKey Mappings
ym_MembersContactsemail (key), first_name, last_name, phone, status

Reads data from local CSV files. Always performs a full load (no incremental sync).

Registration: @RegisterClass(BaseIntegrationConnector, 'FileFeedConnector')

Configuration JSON:

{
"storagePath": "/absolute/path/to/file.csv",
"fileType": "csv"
}

Capabilities:

  • TestConnection — checks that the file exists on disk
  • DiscoverObjects — returns the file name as the single available object
  • DiscoverFields — parses the CSV header row
  • FetchChanges — parses all rows into ExternalRecord[] (watermark ignored)

Integration connectors can auto-generate MJ Action metadata for use by AI agents and workflow engines. Each connector declares its objects and fields via GetIntegrationObjects(), and the CLI generator produces mj-sync compatible JSON files.

Terminal window
# Generate actions for all connectors
npx tsx src/generate-integration-actions.ts
# Generate for a specific connector
npx tsx src/generate-integration-actions.ts salesforce
npx tsx src/generate-integration-actions.ts hubspot
npx tsx src/generate-integration-actions.ts sage-intacct
npx tsx src/generate-integration-actions.ts quickbooks

See INTEGRATION_ACTIONS.md for full documentation.

Terminal window
cd packages/Integration/connectors
npm run build
Terminal window
cd packages/Integration/connectors
npm run test # single run
npm run test:watch # watch mode
src/
index.ts # Package exports
RelationalDBConnector.ts # Base class for SQL-based connectors
HubSpotConnector.ts # HubSpot REST API connector (full CRUD)
SalesforceConnector.ts # Salesforce REST API connector (full CRUD)
SageIntacctConnector.ts # Sage Intacct XML API connector (full CRUD)
QuickBooksConnector.ts # QuickBooks Online REST API connector (full CRUD)
RasaConnector.ts # Rasa.io REST API connector (read-only)
WicketConnector.ts # Wicket REST API connector (full CRUD)
YourMembershipConnector.ts # YourMembership SQL connector
FileFeedConnector.ts # CSV file connector
generate-integration-actions.ts # CLI: auto-generate action metadata from connectors
__tests__/ # Unit and integration tests
test-fixtures/
sample-contacts.csv # 100-row sample for FileFeed testing