Docs / Schema Reference

Schema Reference

Field-level reference for every custom object, custom metadata type, and Platform Event shipped with FlowMason. Use this when writing queries, building reports, or auditing data residency for ISV review.

Custom objects (read/write at runtime)

FlowMason_Pipeline__c

Studio-editable pipeline rows.

FieldTypePurpose
Pipeline_Id__cText (External Id)Logical pipeline identifier; matches MDT DeveloperName
Config_JSON__cLong TextFull pipeline JSON. Stages, components, input mapping, config
Version__cNumberMonotonic; bumped by Studio on save
Is_Active__cCheckboxInactive pipelines refuse to enqueue
Status__cPicklistDraft / Published / Archived
Author__cLookup(User)Last editor
Description__c / Category__c / Tags__cText / Picklist / Multi-selectStudio sidebar
Problem_Statement__c / Usage_Examples__c / AI_Provenance__cLong TextAuthoring metadata
Idempotency_Key__cTextOptional caller-supplied dedup key

PipelineExecution__c

One row per pipeline run. Retention: executionRetentionDays (default 90).

FieldPurpose
ExecutionId__cUUID generated by PipelineRunner
PipelineName__c / Status__cIdentity + outcome (Running / Completed / Failed / Cancelled / Paused / Yielded)
StartTime__c / EndTime__cWall-clock bounds
Input__c / Output__c / Context__cOriginal input + final output + serialised ExecutionState for resume
CurrentStage__c / CompletedStages__c / TotalStages__c / Progress__cMid-run progress
Current_Async_Job_Id__c / Debug_Mode__cQueueable / Batch job id; debugger gate
ErrorMessage__c / GovernorStats__cTerminal error + per-yield governor snapshot
Redaction_Count__c / Redaction_Summary__cFMRedactor activity
FLS_Redacted_Fields__c / FLS_Redaction_Count__cFMPromptGuard scrubs

Pipeline_Stage_Log__c

One row per stage execution. Retention: stageLogRetentionDays (default 90).

Fields: Execution__c · Stage_Id__c · Stage_Type__c · Status__c · Started_At__c · Ended_At__c · Duration_Ms__c · Input_Context__c · Resolved_Inputs__c · Output__c · Prompt__c · Provider_Response__c · Token_Usage__c · Cost__c · Retry_Count__c · Error_Message__c · Error_Stack__c

FM_Run_Audit__c

Telemetry rollup. Materialised from FlowMasonRun__e by FlowMasonRunSubscriber.

Fields: Action__c · Actor_Id__c · Pipeline_Id__c · Execution_Id__c · Latency_Ms__c · Tokens_In__c · Tokens_Out__c · Error_Code__c · Detail__c (JSON) · Schema_Version__c

FM_Org_Chat_Turn__c

Persisted Org Chat history. Retention: orgChatRetentionDays (default 90). OWD: Private.

Fields: Conversation_Id__c · Turn_Index__c · Role__c · Content__c · Query__c · Sobject_Type__c · Record_Count__c · Latency_Ms__c · Error_Code__c · Schema_Version__c

FM_Org_Chat_Dml_Audit__c

Confirmed DML actions. Immutable.

Fields: Actor_Id__c · Confirmation_Key__c · Operation__c · Sobject_Type__c · Record_Count__c · Filter_Used__c · Fields_Changed__c · Diff_Json__c · Schema_Version__c

FM_Org_Inventory_Snapshot__c

INV-2 nightly inventory. Sole writer: FMOrgInventoryHarvester. Sole reader: FMOrgChatToolDispatcher.inventory_search.

Fields: External_Id__c (<Type>:<Name> upsert key) · Component_Type__c · Component_Name__c · Component_Label__c · Sobject_Api__c · Status__c · Is_Custom__c · Snapshot_Run_Id__c · Snapshot_Generated_At__c

Other custom objects

  • FlowMason_Pipeline_Version__c — version history snapshots
  • Pipeline_Audit__c — admin actions (365d retention)
  • FM_Debug_Session__c — live debugger state (lock token + pipeline hash)
  • FM_Signal__cWaitForSignal wake-up records
  • FM_Circuit_Queue__c — buffered circuit-breaker rows
  • FlowMason_Admin_Audit__c — admin-tool action log
  • FM_LLM_Template__c — Studio-authored prompt templates
  • FM_LLM_FewShot__c — few-shot examples
  • FM_LLM_Eval__c — eval cases

Custom Metadata Types (read-only at runtime)

MDTPurpose
FM_Config__mdtTunables. Schema: Key__c, Value__c, Value_Type__c, Category__c, Description__c
FlowMasonPipeline__mdtSFDX-deployable pipelines. Schema: Config_JSON__c
Pipeline_Template__mdtDistribution starter pipelines (surfaced in Packages browser)
FM_LLM_Task__mdtDistribution prompt templates
FM_LLM_Example__mdtDistribution few-shots
FM_LLM_Model__mdtModel registry. SupportsTools__c gates the auto tool-calling path
LLMProviderConfig__mdtProvider connection (endpoint, credential, default model)
FM_Provider_Pricing__mdtPer-(provider, model) input/output cost per 1k tokens
FM_Provider_Type__mdtProvider registry (extension point for plugin providers)
FM_Org_Chat_Allowlist__mdtPer-SObject Org Chat policy: allow read/insert/update/delete + max LIMIT
FM_Trigger_Binding__mdt(SObject, DML event) → pipeline binding
FM_Schedule_Binding__mdtcron → pipeline binding
FM_Event_Binding__mdtPlatform Event channel → pipeline binding
FM_Component_Type__mdtComponent registry consumed by ComponentFactory + Studio palette
Flow_Node_Type__mdtStudio palette descriptor for drag-drop
FM_Plugin_Manifest__mdtPlugin SDK manifest (vendor, version, components, support URL)
FM_Callable__mdtLogical callable name → Apex class implementing Callable
FM_Run_Scenario__mdtPre-baked test inputs surfaced in Studio's "Run with sample"
FM_Redaction_Pattern__mdt / FM_Pii_Policy__mdtFMRedactor pattern catalog + per-region policy packs
FM_URL_Allowlist__mdtOutbound-URL allowlist for HTTP callouts
FM_Webhook_Secret__mdtHMAC-secret references for inbound webhook validation

Platform Events

FlowMasonRun__e

Telemetry channel. Subscriber: FlowMasonRunSubscriber trigger → materialises into FM_Run_Audit__c.

Fields: Action__c (verb tag) · Actor_Id__c · Pipeline_Id__c · Execution_Id__c · Detail__c (JSON; shape varies per Action__c)

FM_Circuit_Dead_Letter__e

Buffered-mode dead letter. Published by FMCircuitDrainerQueueable after CIRCUIT_DRAIN_MAX_ATTEMPTS.

PipelineEditor__e

Studio collaboration channel. Action__c: lock / unlock / save / publish.

PipelineStatus__e

Live-debug status stream. Subscribed by pipelineDebugger LWC via Empire API.

Schema invariants

  • Every long-text JSON field is treated as untyped on read. JSON.deserializeUntyped then validate.
  • Schema_Version__c = 1 everywhere it appears. Bump only on incompatible changes; prior reads must keep working.
  • All custom-object writes from Apex go through FMSecurityUtil unless a documented carve-out applies.
  • DML-audit + admin-audit rows are immutable by convention.

Related