FLOW MASON

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)

ClassDescription
PipelineRunnerExecute pipelines synchronously
ExecutionResultPipeline execution result
ExecutionTraceDebugging and cost tracking

Custom Metadata Types

Metadata TypeDescription
LLMProviderConfig__mdtLLM provider credentials

Platform Events

EventDescription
PipelineStatus__eReal-time execution updates

Component Library

AI Components (Nodes)

  • generator - Generate text using LLM
  • critic - Evaluate and critique content
  • classifier - Classify input into categories

Data Operators

  • json_transform - JMESPath transformations
  • filter - Filter arrays based on conditions
  • schema_validate - Validate data against schemas
  • variable_set - Set context variables

Flow Controls

  • conditional - If/else branching
  • router - Value-based routing
  • foreach - Iterate over collections
  • trycatch - Error handling with fallbacks

Utilities

  • http_request - External API calls
  • logger - Debug logging

Demo Results

9 pipelines tested with real AI (Claude 3.5 Sonnet):

MetricValue
Pipelines Succeeded8/9 (89%)
Total LLM Calls17
Total Cost~$0.11
Governor Limits<20% used

Sample Pipelines

  1. Customer Support Triage - 9.1s, 2 LLM calls, ~$0.005
  2. Data Validation ETL - 83ms, non-AI
  3. Content Generation - 40.7s, 5 LLM calls, ~$0.02
  4. Error Handling - 20ms, trycatch fallbacks
  5. Batch Processing - 87ms, foreach iteration
  6. Conditional Workflow - 3.0s, VIP routing
  7. Book Editor v1.0 - 43.8s, 4 LLM calls
  8. 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

  1. Install the managed package
  2. Configure Remote Site Settings:
    • Anthropic: https://api.anthropic.com
    • OpenAI: https://api.openai.com
  3. Create LLM Provider Custom Metadata record
  4. 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.