Connectforce
A powerful VS Code extension for building Salesforce integrations visually. Create API connectors, field mappings, and generate Apex callout classes with ease.

📚 Full Documentation: See docs/PRODUCT_DOCUMENTATION.md for comprehensive guides, keyboard shortcuts, and technical details.
Features
🔌 Visual Connection Builder
- Create and manage external API connections
- Support for multiple authentication types (OAuth2, Basic, API Key, JWT)
- Pre-built templates for popular ERPs (NetSuite, SAP, Dynamics 365, QuickBooks, Xero)
- Connection testing with real-time feedback
🔍 REST Explorer (NEW!)
- Make API calls to your Salesforce org directly from VS Code
- Supports GET, POST, PUT, PATCH, DELETE methods
- Quick action buttons for common endpoints
- Syntax highlighted JSON responses
- Response time and size metrics
- Copy, format, and download responses
- Request history tracking
- Uses your default SF CLI org authentication
📡 Endpoint Management
- Define API endpoints with parameters
- Support for all HTTP methods (GET, POST, PUT, PATCH, DELETE)
- Request/response schema definition
- Import from OpenAPI/Swagger specifications
🔗 Field Mapper
- Visual drag-and-drop field mapping
- AI-powered field mapping suggestions
- Support for bidirectional sync
- Data transformation configuration
⚡ Code Generation
- Generate Apex service classes
- Generate test classes with mocks
- Create Named Credentials
- Create External Services
- Full metadata XML generation
📊 Sync Status Monitoring
- Real-time sync status dashboard
- Error tracking and logging
- Performance metrics
Installation
- Open VS Code
- Go to Extensions (Ctrl+Shift+X)
- Search for "Connectforce"
- Click Install
Or install from VSIX:
code --install-extension connectforce-1.0.0.vsix
Quick Start
1. Open Integration Builder
- Click the plug icon (⚡) in the Activity Bar
- Or use Command Palette:
Connectforce: Open Builder
2. Create a Connection
- Click "+" to create a new connection
- Choose from ERP templates or create custom
- Enter Base URL and configure authentication
- Test the connection
3. Define Endpoints
- Add API endpoints with paths and methods
- Define parameters and schemas
- Or import from OpenAPI spec
4. Map Fields
- Open Field Mapper
- Select Salesforce object and external entity
- Map fields visually or use auto-suggest
- Configure sync direction
5. Generate Code
- Click "Generate Code" tab
- Select what to generate:
- Apex Service Class
- Test Class
- Mock Service
- Named Credential
- External Service
- Files are created in your project
Supported ERP Templates
| ERP |
API Type |
Auth |
| NetSuite |
REST/SuiteTalk |
OAuth2 |
| SAP S/4HANA |
OData |
OAuth2 |
| Microsoft Dynamics 365 |
REST |
OAuth2 |
| Acumatica |
REST |
OAuth2 |
| QuickBooks Online |
REST |
OAuth2 |
| Xero |
REST |
OAuth2 |
Commands
| Command |
Description |
connectforce.openBuilder |
Open Integration Builder |
connectforce.openRestExplorer |
Open REST Explorer |
connectforce.newConnection |
Create new connection |
connectforce.importOpenAPI |
Import OpenAPI spec |
connectforce.generateApex |
Generate Apex classes |
connectforce.createNamedCredential |
Create Named Credential |
connectforce.testConnection |
Test connection |
connectforce.openFieldMapper |
Open Field Mapper |
connectforce.deployToOrg |
Deploy to Salesforce org |
Configuration
{
"connectforce.defaultAuthType": "OAuth2",
"connectforce.apexOutputPath": "force-app/main/default/classes",
"connectforce.generateTestClasses": true,
"connectforce.enableMockServices": true,
"connectforce.logLevel": "info"
}
Generated Code Example
/**
* NetSuite Integration Service
* Auto-generated by Connectforce
*/
public with sharing class NetSuiteService {
private static final String NAMED_CREDENTIAL = 'NetSuite';
public static List<Customer> getCustomers(Integer limit) {
HttpRequest req = buildRequest('GET', '/customers?limit=' + limit);
ApiResponse response = executeRequest(req);
if (!response.isSuccess) {
throw new NetSuiteException(response.errorMessage);
}
return (List<Customer>)JSON.deserialize(
response.body,
List<Customer>.class
);
}
}
Snippets
| Prefix |
Description |
sfint-get |
HTTP GET callout |
sfint-post |
HTTP POST callout |
sfint-mock |
Mock HTTP response class |
Requirements
- VS Code 1.85.0 or higher
- Salesforce CLI (sf) installed
- Salesforce DX project
Extension Settings
This extension contributes the following settings:
connectforce.defaultAuthType - Default authentication type
connectforce.apexOutputPath - Output path for Apex classes
connectforce.namedCredentialPath - Output path for Named Credentials
connectforce.generateTestClasses - Auto-generate test classes
connectforce.enableMockServices - Generate mock services
connectforce.logLevel - Extension log level
Known Issues
- OAuth2 token refresh not yet implemented for connection testing
- Field Mapper requires Salesforce CLI connection for object metadata
Release Notes
1.0.0
- Initial release
- Connection builder with ERP templates
- OpenAPI import
- Apex code generation
- Named Credential generation
- Field mapping interface
Contributing
Contributions welcome! Please read our contributing guidelines.
License
MIT License - see LICENSE file for details.
Enjoy building Salesforce integrations! ⚡