Salesforce + Ballerina Quickstart (One-Shot Setup)
sf_quickstartValidates Salesforce credentials, auto-detects sandbox or production, and scaffolds a Ballerina integration project in WSO2 BI workspace with pre-built types for standard and custom objects.
Instructions
End-to-end setup in a single call:
Validates your Salesforce credentials.
Auto-detects sandbox vs. production from sf_base_url hostname.
Scaffolds a Ballerina project in your WSO2 BI workspace.
Standard SObjects use pre-built types from ballerinax/salesforce.types (no describe API calls, no generated boilerplate).
Custom (__c) objects are described and typed automatically.
Optionally runs 'bal build' to verify compilation.
This is the recommended entry point — most users only need to call this tool.
If you don't yet have credentials, call sf_setup_guide first.
All inputs except the 4 credential fields have sensible defaults:
project_name: salesforce_integration
org_name: wso2bi
bi_path: ~/WSO2Integrator (mac/linux) or %USERPROFILE%\WSO2Integrator
target_objects: ["Account", "Contact", "Lead", "Opportunity"]
port: 9090
build: false (set true to compile after scaffolding)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sf_client_id | Yes | Salesforce Connected App Consumer Key (Client ID) | |
| sf_client_secret | Yes | Salesforce Connected App Consumer Secret (Client Secret) | |
| sf_refresh_token | Yes | Salesforce OAuth2 Refresh Token obtained after authorization | |
| sf_base_url | Yes | Salesforce org instance URL, e.g. https://myorg.my.salesforce.com (sandbox auto-detected from hostname) | |
| project_name | No | Ballerina package name (default: salesforce_integration) | salesforce_integration |
| org_name | No | Ballerina org name (default: wso2bi) | wso2bi |
| bi_path | No | WSO2 BI workspace path (default: ~/WSO2Integrator) | ~/WSO2Integrator |
| target_objects | No | SObject API names (default: Account, Contact, Lead, Opportunity) | |
| build | No | Run 'bal build' after scaffolding to verify the project compiles. Adds 30-90s but catches credential or version mismatches early. | |
| cdc_listeners | No | Optional CDC / Platform Event listeners to scaffold alongside the REST service. | |
| port | No | HTTP listener port (default: 9090) | |
| sandbox | No | Force sandbox mode (test.salesforce.com). Usually inferred from sf_base_url, set this only to override detection. |