Now inviting automation leaders: publish your playbook as a skill, under your own name. Publish yours →
Automation Skills
All skills/Sf flow/Integration-patterns
Reference · Sf flow

Integration-patterns

Part of Sf flow. Install the skill and your agent reads this page when it needs the depth.

<!-- Parent: sf-flow/SKILL.md -->

LWC & Apex Integration Patterns

LWC Integration (Screen Flows)

Embed custom Lightning Web Components in Flow Screens for rich, interactive UIs.

Templates

Template Purpose
assets/screen-flow-with-lwc.xml Flow embedding LWC component
assets/apex-action-template.xml Flow calling Apex @InvocableMethod

Flow XML Pattern

<screens>
    <fields>
        <extensionName>c:recordSelector</extensionName>
        <fieldType>ComponentInstance</fieldType>
        <inputParameters>
            <name>recordId</name>
            <value><elementReference>var_RecordId</elementReference></value>
        </inputParameters>
        <outputParameters>
            <assignToReference>var_SelectedId</assignToReference>
            <name>selectedRecordId</name>
        </outputParameters>
    </fields>
</screens>

Documentation

Resource Location
LWC Integration Guide references/lwc-integration-guide.md
LWC Component Setup sf-lwc/references/flow-integration-guide.md
Triangle Architecture references/triangle-pattern.md

Apex Integration

Call Apex @InvocableMethod classes from Flow for complex business logic.

Flow XML Pattern

<actionCalls>
    <name>Process_Record</name>
    <actionName>RecordProcessor</actionName>
    <actionType>apex</actionType>
    <inputParameters>
        <name>recordId</name>
        <value><elementReference>var_RecordId</elementReference></value>
    </inputParameters>
    <outputParameters>
        <assignToReference>var_IsSuccess</assignToReference>
        <name>isSuccess</name>
    </outputParameters>
    <faultConnector>
        <targetReference>Handle_Error</targetReference>
    </faultConnector>
</actionCalls>

Documentation

Resource Location
Apex Action Template assets/apex-action-template.xml
Apex @InvocableMethod Guide sf-apex/references/flow-integration.md
Triangle Architecture references/triangle-pattern.md
<!-- Modified by Automation Skills on 2026-11-24: relative links to files that were not copied now point to the original repository. -->

Publish your skill

Copy this prompt into Claude Code, Codex or any agent. It walks you through your first skill in about 20 minutes, with you as the author.

Click to copy.