Build reusable Salesforce Business Capabilities once.
Expose them through REST APIs, MCP, OpenAPI, Agentforce, AI Clients, and future channels.
Salesforce Business Capability Framework (SBCF) is inspired by Salesforce Headless 360 principles while remaining an independent Salesforce-native framework.
- What Is SBCF?
- Why SBCF?
- Architecture
- Core Principles
- Key Features
- Capability Lifecycle
- Supported Capability Types
- Supported Business Domains
- Repository Structure
- Quick Start
- Getting Started
- Creating a Business Capability
- Exposing Capabilities
- Capability Packs
- Capability Marketplace
- Plugins
- Supported Clients
- Documentation
- Security
- Roadmap
- Contributing
- License
- Changelog
- Philosophy
SBCF is a reusable Salesforce framework for modeling business actions as versioned, metadata-described Business Capabilities.
A Business Capability represents a meaningful business operation such as customer lookup, account creation, case creation, task creation, opportunity creation, or customer onboarding. Each capability keeps Salesforce-owned business behavior in Apex and exposes that behavior through stable integration surfaces.
The framework separates three concerns:
- Business behavior lives in reusable
SBCF_*CapabilityApex classes. - Metadata describes what each capability does, who can use it, and how it can be exposed.
- Client channels such as REST APIs, MCP Tools, Agentforce, and future integrations call the same capability behavior.
Public REST wrappers keep their existing Headless360*Api names as stable contracts.
Traditional Salesforce integrations often start from objects and endpoints. A client reads or writes Account, Contact, Case, or Opportunity records directly, then each integration recreates validation, orchestration, prompts, and process rules in its own layer.
SBCF starts from Business Capabilities instead.
Instead of asking every client to understand Salesforce object behavior, SBCF gives clients a smaller set of business actions with consistent metadata, request handling, response handling, security expectations, and documentation.
This helps teams:
- Keep Salesforce business rules inside Salesforce-owned capabilities.
- Expose the same behavior through REST APIs, MCP Tools, Agentforce, and future channels.
- Maintain stable public contracts while internal implementation evolves.
- Give AI Clients a structured way to interact with the Salesforce Platform.
- Build toward discovery, automatic tool generation, OpenAPI documentation, plugins, packaging, and marketplace distribution.
| Traditional Salesforce Integration | SBCF |
|---|---|
| Object-centric | Capability-centric |
| Business logic duplicated across clients | Business logic implemented once |
| Channel-specific implementations | Multi-channel architecture |
| Static APIs | Metadata-driven capabilities |
| Manual API documentation | Automatic OpenAPI generation |
AI Client / External Client / Agentforce
│
▼
REST API / MCP Tool / Agentforce Adapter / Future Channel
│
▼
Salesforce Business Capability Framework (SBCF)
│
▼
Reusable Salesforce Business Capability
│
▼
Salesforce Platform
- 24 Business Capabilities
- 3 Capability Packs
- 21 MCP Tools
- 222 Apex Tests
- OpenAPI Generation
- Agentforce Integration
- Plugin Architecture
- Metadata-driven Discovery
- Business logic belongs in Reusable Salesforce Business Capabilities.
- REST APIs, MCP Tools, Agentforce actions, and future channels expose capabilities; they should not own business rules.
- Public REST API contracts should remain stable after publication.
- Capability metadata is the source of truth for discovery, tool generation, and OpenAPI documentation.
- AI Clients should reason and collect missing information before invoking tools.
- Salesforce authentication, permissions, sharing, CRUD/FLS, and audit controls remain central.
- The framework should be extensible through plugins and capability packs without rewriting the core runtime.
SBCF_Capabilityinterface for reusable Apex Business Capabilities.SBCF_CapabilityMetadatafor describing capability behavior, clients, permissions, schemas, and endpoints.SBCF_CapabilityRegistryfor registration, discovery, filtering, and metadata lookup.- Standard request and response objects for capability execution.
- Agentforce adapter for delegating AI actions to SBCF without duplicating business logic.
- Plugin architecture for capability packs, adapters, generators, metadata extensions, and client integrations.
- Stable public REST API wrappers using existing
Headless360*Apicontracts. - MCP Server with static tools and generated MCP Tool definitions from capability metadata.
- Salesforce REST client separated from MCP Tool implementations.
- OpenAPI generation from registered SBCF capability metadata.
- Discovery APIs for capabilities, capability packs, plugins, and marketplace metadata.
- Product-oriented documentation under docs/.
- Capability specifications under docs/capabilities/.
- Installation, deployment, validation, and troubleshooting guides.
- Capability Packs for grouping reusable Salesforce Business Capabilities.
- Capability Marketplace for cataloging available packs.
- Sales Intelligence Pack for report-style sales insights such as pipeline health, revenue forecast, top customers, and win-rate analysis.
- Roadmap toward package distribution and future managed package readiness.
Implement Apex Business Capability
│
▼
Describe with SBCF Capability Metadata
│
▼
Register in the SBCF Capability Registry
│
▼
Expose through REST, MCP, Agentforce, or generated OpenAPI
│
▼
Consume from AI Clients, applications, automations, or future channels
- Transaction: create, update, or orchestrate Salesforce records and related work.
- Intelligence: retrieve, enrich, summarize, or interpret business information.
- Integration: connect Salesforce behavior to external systems or clients.
- Automation: trigger repeatable business processes through a capability contract.
- Sales
- Service
- Marketing
- Commerce
- Analytics
- Platform
- Administration
- AI
- Integration
docs/
force-app/
sbcf-mcp/
scripts/
config/
manifest/
README.md
package.json
openapi.yaml
Key implementation areas:
force-app/
main/default/classes/
Headless360*Api.cls Public REST API wrappers
SBCF_*Capability.cls Reusable Salesforce Business Capabilities
SBCF_Capability*.cls Capability runtime, metadata, and registry
SBCF_Plugin*.cls Plugin interface, metadata, and registry
sbcf-mcp/
src/
client/ Salesforce REST API client
config/ Salesforce and MCP Server configuration
registry/ MCP Tool registry
tools/ MCP Tool implementations
docs/
architecture/ Architecture guides
capabilities/ Capability specifications
development/ Developer guides
examples.md Practical examples
installation.md Installation guide
quick-start.md First-run guide
roadmap.md Product roadmap
security.md Security guide
git clone https://github.com/ishanovarazmyrat-code/sbcf.git
cd sbcf
npm install
cd sbcf-mcp
npm install
cp .env.example .env
npm run mcp:startSee docs/installation.md for the full installation guide and docs/quick-start.md for a guided first run.
Current package strategy: use Salesforce metadata deployment for installs. Unlocked Package is the recommended next packaging step after package boundaries, plugin registration persistence, and upgrade policy are finalized.
Install dependencies:
npm install
cd sbcf-mcp
npm install
cp .env.example .envConfigure sbcf-mcp/.env:
SALESFORCE_BASE_URL=https://your-domain.my.salesforce.com
SALESFORCE_ACCESS_TOKEN=your-oauth-access-token
SALESFORCE_API_VERSION=v61.0
MCP_SERVER_NAME=sbcf-mcp
MCP_SERVER_VERSION=1.0.0
MCP_SERVER_PORT=3000
Start the MCP Server:
npm run mcp:startDeploy Salesforce metadata:
npm run sf:deploy:framework -- --target-org <org-alias>Validate source:
npm run validate:sourceDeployment commands and post-install checks are documented in docs/deployment.md. Common setup issues are documented in docs/troubleshooting.md.
- Create an Apex class using the framework prefix, for example
SBCF_NewBusinessCapability. - Implement the
SBCF_Capabilityinterface. - Return complete
SBCF_CapabilityMetadatafromgetMetadata(). - Keep Salesforce business validation and orchestration inside the Business Capability.
- Add tests for success, validation, and failure behavior.
- Add a capability specification under docs/capabilities/.
Minimal interface:
public interface SBCF_Capability {
SBCF_CapabilityMetadata getMetadata();
SBCF_Response execute(SBCF_Request request);
}The Apex implementation uses the SBCF_ prefix for framework and Business Capability classes.
Add a stable Headless360*Api REST wrapper only when the Business Capability needs a public REST surface. Keep wrapper names and request/response contracts stable after publication.
MCP Tools can be manually implemented under sbcf-mcp/src/tools/<domain>/ and registered in sbcf-mcp/src/registry/ToolRegistry.js. Where metadata is complete, tools can also be generated from the SBCF Capability Registry.
Agentforce is an AI Client of SBCF. Agentforce-facing actions should delegate to SBCF_AgentforceAdapter, which resolves registered capabilities by metadata and executes them through the SBCF runtime.
OpenAPI documentation can be generated from registered capability metadata so external developers and API clients can inspect available operations without duplicating documentation by hand.
Future channels can include generated SDKs, CLI commands, workflow integrations, packaged extensions, or marketplace integrations. They should call the same Business Capability behavior instead of duplicating Salesforce rules.
Capability Packs organize registered Business Capabilities into reusable metadata-driven groups such as Sales, Service, or industry packs. Packs reference capabilities through the SBCF Capability Registry; they do not contain business logic and do not execute capabilities.
The Sales Capability Pack includes Sales Intelligence capabilities for monthly, quarterly, and yearly reporting, pipeline health, revenue forecasting, KPI summaries, top customers, top opportunities, win-rate analysis, and lost-opportunity analysis. The Customer Intelligence Pack includes customer health, churn risk, customer 360, growth potential, executive briefing, recommendation, and portfolio insight capabilities.
The Capability Marketplace catalogs available Capability Packs. It supports metadata discovery and filtering by category, tag, publisher, client, and status. It is a discovery and management layer, not an execution layer.
Plugins implement SBCF_Plugin and register through SBCF_PluginRegistry. A plugin may provide new Business Capabilities, adapters, generators, metadata extensions, client integrations, or capability packs without changing the core SBCF runtime.
- REST API clients
- MCP-compatible AI Clients
- Agentforce
- External applications
- Automation and workflow clients
- Future generated clients and SDKs
Main documentation is available in docs/.
Useful starting points:
SBCF is built on the Salesforce Platform security model. Production implementations should review:
- Salesforce authentication and Connected App policy.
- Integration user permissions.
- Sharing rules.
- CRUD/FLS enforcement.
- Transaction rollback behavior.
- Secret management.
- Audit logging.
- Least privilege.
See docs/security.md.
The product roadmap is maintained in docs/roadmap.md.
Major phases:
- Core Capability Framework
- MCP Tool Registry
- Capability Discovery
- Automatic MCP Tool Generation
- OpenAPI Generation
- Agentforce Integration
- Plugin Architecture
- Package and Installation Flow
- Capability Packs
- Capability Marketplace
- Future package distribution
Contributions should preserve public REST contracts, Apex execution behavior, and documented capability contracts unless a change is explicitly proposed as breaking. See CONTRIBUTING.md for the full contribution guide.
Recommended contribution flow:
- Open an issue or proposal for significant behavior changes.
- Add or update tests for Apex and MCP changes.
- Update capability metadata and documentation.
- Run available validation before submitting changes.
MIT. See LICENSE.
Version history is maintained in CHANGELOG.md.
SBCF does not replace Salesforce. It provides a framework for exposing Salesforce-owned business behavior through consistent, metadata-described capabilities that can be used by humans, applications, AI clients, and future channels.
Build Business Capabilities once.
Expose them everywhere.
REST APIs. MCP. Agentforce. AI Clients. Future Channels.
One Business Capability. Unlimited Consumers.