Docs / Plugin SDK Reference

Plugin SDK Reference

Contract reference for FlowMason plugin authors. Every interface, MDT field, and registration path a plugin can touch.

Plugin types

TypeSurfaceDistribution
Component pluginNew stage type in Studio paletteFM_Component_Type__mdt + BaseComponent subclass
Provider pluginNew LLM / audio / document / vector backendFM_Provider_Type__mdt + provider interface impl
Trigger / event / schedule bindingSubscribe a pipeline to a platform signalFM_Trigger_Binding__mdt / FM_Event_Binding__mdt / FM_Schedule_Binding__mdt
Callable pluginExpose Apex via SubPipeline dispatchFM_Callable__mdt + System.Callable impl
Pipeline pluginShip pipelines themselvesFlowMasonPipeline__mdt + optional Pipeline_Template__mdt

FM_Plugin_Manifest__mdt. Distribution manifest

Required for any plugin published to AppExchange or the Packages browser. One row per plugin (not per component).

Fields: Vendor_Slug__c · Vendor_Display_Name__c · Plugin_Display_Name__c · Description__c · Version__c · Status__c · Min_Flowmason_Version__c · Package_Id__c (2GP) · Components_Included__c (CSV) · Tags__c · Icon_Url__c · Documentation_Url__c · Support_Url__c · Support_Email__c · Privacy_Url__c · License_Type__c · Listing_Url__c · Published_Date__c

Component plugin. BaseComponent family

Subclass exactly one of:

  • BaseNode — AI nodes
  • BaseLLMNode — LLM-call subset
  • BaseOperator — data / IO transforms
  • BaseFlowControl — branch / loop / fan-out

Skeleton:

Apex
public class MySmsComponent extends BaseOperator {
    protected override Map<String,Object> executeImpl(
        ExecutionContext ctx,
        Map<String,Object> resolvedConfig
    ) {
        String to   = (String) resolvedConfig.get('to');
        String body = (String) resolvedConfig.get('body');
        // ... call Twilio via Named Credential ...
        return new Map<String,Object>{ 'sid' => '<twilio-message-sid>' };
    }
}

Register via FM_Component_Type__mdt: DeveloperName (type string in pipeline JSON), Apex_Class_Name__c, Category__c, Display_Name__c, Description__c, Icon_Token__c, Config_Schema_Json__c.

Provider plugin. Interface menu

Apex
// LLM provider (required)
public interface LLMProvider {
    ProviderResponse call(ProviderRequest req);
    String   getName();
    Boolean  isReady();
}

// Optional ADR-013 extension for tool-calling
public interface LLMToolCapableProvider {
    Boolean supportsTools();
    ProviderResponse invokeWithTools(
        ProviderRequest req,
        List<FMToolSchema> tools,
        FMOrgChatToolDispatcher dispatcher,
        FMThreadState state
    );
}

// Audio (transcribe + TTS)
public interface AudioProvider {
    interface AudioTranscriber { String transcribe(Blob audio, Map<String,Object> opts); }
    interface TextToSpeech     { Blob   synthesize(String text, Map<String,Object> opts); }
}

// Documents (OCR + form extraction)
public interface DocumentProvider {
    interface DocumentReader { Map<String,Object> read(Blob doc, Map<String,Object> opts); }
    interface FormExtractor  { Map<String,Object> extract(Blob doc, List<String> fields); }
}

// Vector / RAG
public interface VectorDBProvider {
    interface RAGRetriever   { List<Map<String,Object>> retrieve(String query, Map<String,Object> opts); }
    interface KnowledgeQuery { List<Map<String,Object>> query(String index, String query, Map<String,Object> opts); }
}

// Cache
public interface CacheClient {
    Object  get(String key);
    void    put(String key, Object value, Integer ttlSeconds);
    void    remove(String key);
    Boolean contains(String key);
}

Register via FM_Provider_Type__mdt: DeveloperName · Apex_Class_Name__c · Default_Endpoint__c · Surface__c (llm / audio / document / vector / cache) · Supports_Tools__c.

Trigger / event / schedule bindings

Each binds a Salesforce signal to a target pipeline. See Trigger Framework for the dispatcher signatures + execution modes (sync / async / bulk).

Callable plugin. System.Callable

public class MyCallable implements System.Callable {
    public Object call(String action, Map<String,Object> args) {
        if (action == 'doThing') { return runThing(args); }
        throw new FMException('Unknown action: ' + action);
    }
}

Register via FM_Callable__mdt with DeveloperName · Apex_Class_Name__c · Allowed_Actions__c (CSV).

Distribution checklist

  1. 2GP package created; package id captured in FM_Plugin_Manifest__mdt.Package_Id__c.
  2. Manifest fields populated (vendor + plugin + version + min FM + components).
  3. AppExchange security review (if listing publicly).
  4. Documentation URL points at a public landing page.
  5. License type declared.
  6. Released package version installed in a vanilla scratch org and verified end-to-end.

Versioning + compatibility

  • FlowMason follows semver. Min_Flowmason_Version__c declares the lowest host version your plugin supports.
  • Within a major host version, BaseComponent / LLMProvider / registration MDT shapes are stable.
  • ExecutionState.schemaVersion = 1 is part of the contract — your plugin must not depend on unstable internal fields.
  • The global keyword is the strongest commitment. If FlowMason's interface has it, you can rely on it across upgrades.

Related