Flowmason for Salesforce
AI Pipeline Orchestration Native to Your Salesforce Org
Flowmason for Salesforce
Coming Soon - Beta Available
Flowmason for Salesforce brings AI pipeline orchestration directly into your Salesforce environment as a managed package. Build, test, and deploy intelligent workflows that integrate seamlessly with your existing Salesforce data and processes.
Key Features
- Native Execution - Runs entirely within Salesforce using Apex
- AI Integration - Connect to Claude, GPT, and other LLM providers
- Governor-Aware - Automatic handling of Salesforce limits
- Local Development - Test pipelines locally, deploy JSON to Salesforce
- Real-Time Status - Platform Events for async execution monitoring
Quick Start
// Execute a pipeline synchronously
String pipelineJson = '{"name":"My Pipeline","stages":[...]}';
Map<String, Object> input = new Map<String, Object>{'message' => 'Hello'};
ExecutionResult result = PipelineRunner.execute(pipelineJson, input);
if (result.status == 'success') {
System.debug('Output: ' + result.output);
}
Local-First Development
The same pipeline JSON works identically on your machine and in Salesforce:
1. DEVELOP LOCALLY
$ fm run pipeline.json --input data.json
- Instant feedback
- Full debugging
- No deployment wait
2. DEPLOY JSON TO SALESFORCE
- Same JSON, no changes
- Store in Static Resource or Custom Metadata
- Version control friendly
3. RUN IN PRODUCTION
ExecutionResult result = PipelineRunner.execute(pipelineJson, input);
- Triggers, LWC, Flows, Batch Apex
- Same pipeline, same results
Package Contents
Global Classes (Public API)
| Class | Description |
|---|---|
PipelineRunner | Execute pipelines synchronously |
ExecutionResult | Pipeline execution result |
ExecutionTrace | Debugging and cost tracking |
Custom Metadata Types
| Metadata Type | Description |
|---|---|
LLMProviderConfig__mdt | LLM provider credentials |
Platform Events
| Event | Description |
|---|---|
PipelineStatus__e | Real-time execution updates |
Component Library
AI Components (Nodes)
generator- Generate text using LLMcritic- Evaluate and critique contentclassifier- Classify input into categories
Data Operators
json_transform- JMESPath transformationsfilter- Filter arrays based on conditionsschema_validate- Validate data against schemasvariable_set- Set context variables
Flow Controls
conditional- If/else branchingrouter- Value-based routingforeach- Iterate over collectionstrycatch- Error handling with fallbacks
Utilities
http_request- External API callslogger- Debug logging
Demo Results
9 pipelines tested with real AI (Claude 3.5 Sonnet):
| Metric | Value |
|---|---|
| Pipelines Succeeded | 8/9 (89%) |
| Total LLM Calls | 17 |
| Total Cost | ~$0.11 |
| Governor Limits | <20% used |
Sample Pipelines
- Customer Support Triage - 9.1s, 2 LLM calls, ~$0.005
- Data Validation ETL - 83ms, non-AI
- Content Generation - 40.7s, 5 LLM calls, ~$0.02
- Error Handling - 20ms, trycatch fallbacks
- Batch Processing - 87ms, foreach iteration
- Conditional Workflow - 3.0s, VIP routing
- Book Editor v1.0 - 43.8s, 4 LLM calls
- Book Editor v1.1 - 48.3s, 5 LLM calls, 3 versions
Installation
Prerequisites
- Salesforce Enterprise Edition or higher
- API Version 62.0+
- Remote Site Settings for LLM providers
Setup Steps
- Install the managed package
- Configure Remote Site Settings:
- Anthropic:
https://api.anthropic.com - OpenAI:
https://api.openai.com
- Anthropic:
- Create LLM Provider Custom Metadata record
- Assign permission sets
Verify Installation
String pipelineJson = '{"name":"Test","stages":[{"id":"test","component_type":"json_transform","config":{"data":{"msg":"Hello"},"jmespath_expression":"@"},"depends_on":[]}],"output_stage_id":"test"}';
ExecutionResult result = PipelineRunner.execute(pipelineJson, new Map<String, Object>());
System.assert(result.status == 'success');
Integration Patterns
Apex Trigger
trigger CaseTriage on Case (after insert) {
String pipelineJson = getPipelineFromStaticResource();
for (Case c : Trigger.New) {
Map<String, Object> input = new Map<String, Object>{
'subject' => c.Subject,
'description' => c.Description
};
// Use async for trigger context
String executionId = PipelineQueueable.enqueue(pipelineJson, input);
}
}
LWC Controller
@AuraEnabled
public static Map<String, Object> runPipeline(String subject, String description) {
ExecutionResult result = PipelineRunner.execute(pipelineJson, input);
if (result.status == 'success') {
return (Map<String, Object>) result.output.get('_final');
}
throw new AuraHandledException(result.errorMessage);
}
Flow Builder (Invocable)
@InvocableMethod(label='Run Pipeline')
public static List<String> runPipeline(List<PipelineInput> inputs) {
// Execute pipeline and return results
}
Requirements
- Salesforce Enterprise Edition or higher
- API Version 62.0+
- Remote Site Settings for LLM providers
- Named Credentials recommended for production
Get Started
Visit the Salesforce showcase page for live demo results and detailed examples.
Join the beta program for early access to the managed package.