Scaffold Ballerina + Salesforce Project in WSO2 Integrator
sf_scaffold_projectGenerate a Ballerina integration project for Salesforce in your WSO2 Integrator workspace, including REST services for specified SObjects and optional CDC event listeners.
Instructions
Creates a Ballerina integration project in your WSO2 Integrator (BI) workspace.
For most users, prefer 'sf_quickstart' — it wraps this plus credential validation and an optional build step.
Standard SObjects use pre-built types from ballerinax/salesforce.types (no describe call needed). Custom (__c) objects are described from your org and typed in types.bal.
Pre-conditions:
'bal' CLI installed (sf_check_prerequisites)
target_objects exist in your org (custom objects fail loudly if missing)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_name | No | Ballerina package name (default: salesforce_integration) | salesforce_integration |
| org_name | No | Ballerina org name written to Ballerina.toml (default: wso2bi) | wso2bi |
| bi_path | No | Path to your WSO2 Integrator (BI) workspace. Defaults to ~/WSO2Integrator. | ~/WSO2Integrator |
| 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) | |
| target_objects | No | SObject API names to scaffold (default: Account, Contact, Lead, Opportunity). Standard SObjects use pre-built types from ballerinax/salesforce.types — no describe call required. | |
| cdc_listeners | No | Optional CDC / Platform Event listeners to scaffold alongside the REST service. Each entry generates a salesforce:Listener bound to a channel, with onCreate/onUpdate/onDelete/onRestore stubs for CDC or onMessage for platform events. | |
| port | No | HTTP listener port baked into the generated service (default: 9090) | |
| sandbox | No | Force sandbox mode (test.salesforce.com). Usually inferred from sf_base_url, set this only to override detection. |