
Sf Flow
Author valid Salesforce Flow metadata XML—including Assignment and collection patterns—while building automations on the platform.
Overview
sf-flow is an agent skill for the Build phase that supplies Salesforce Flow metadata XML examples for elements like Assignment and collection updates.
Install
npx skills add https://github.com/clientell-ai/salesforce-skills --skill sf-flowWhat is this skill?
- Complete Flow elements reference in metadata XML format
- Assignment element examples: Assign, Add, elementReference from records
- Collection addition patterns for flow variables
- Connector targetReference wiring between elements
- Copy-paste XML aligned with Salesforce Flow metadata conventions
Adoption & trust: 1 installs on skills.sh; 7 GitHub stars; 3/3 security scanners passed (skills.sh audits); trending (+100% hot-view momentum).
What problem does it solve?
You need Flow automation in Salesforce but keep producing invalid or incomplete metadata XML for assignments and connectors.
Who is it for?
Indie consultants and builders shipping Salesforce automations who manage flows in XML or CI-deployed metadata.
Skip if: Non-Salesforce stacks, or admins who only use Flow Builder UI with no metadata/XML workflow.
When should I use this skill?
You are building or editing Salesforce Flows and need valid metadata XML for Assignment and related elements.
What do I get? / Deliverables
You get correct, connector-linked Flow XML snippets your agent can embed in Salesforce metadata projects or reviews.
- Flow XML fragments for assignments and collections
- Connector-linked element blocks ready for metadata merge
Recommended Skills
Journey fit
Flow XML reference work happens while you are building Salesforce-backed products and internal tools. Integrations fits because Salesforce Flow is the native automation layer connecting records, variables, and downstream elements.
How it compares
Use as a Flow XML snippet reference, not as a substitute for Salesforce’s full element catalog or org-specific governor-limit testing.
Common Questions / FAQ
Who is sf-flow for?
Developers and solo Salesforce implementers who author or review Flow metadata XML with AI coding agents.
When should I use sf-flow?
Use during Build while creating assignments, variable math, record field copies, and collection updates inside Salesforce Flows.
Is sf-flow safe to install?
It is documentation-only XML patterns—review the Security Audits panel on this page and always validate flows in a sandbox before production deploy.
SKILL.md
READMESKILL.md - Sf Flow
# Flow Elements Reference (Metadata XML Format) Complete reference for all Salesforce Flow elements with valid Flow metadata XML examples. --- ## 1. Assignment Element Set variable values, add to collections, perform arithmetic. ```xml <assignments> <name>Set_Account_Variables</name> <label>Set Account Variables</label> <locationX>314</locationX> <locationY>278</locationY> <assignmentItems> <!-- Set a simple variable --> <assignToReference>varAccountName</assignToReference> <operator>Assign</operator> <value> <stringValue>Default Account</stringValue> </value> </assignmentItems> <assignmentItems> <!-- Add to a number variable --> <assignToReference>varTotalAmount</assignToReference> <operator>Add</operator> <value> <numberValue>100.0</numberValue> </value> </assignmentItems> <assignmentItems> <!-- Assign from a record field --> <assignToReference>varOwnerEmail</assignToReference> <operator>Assign</operator> <value> <elementReference>Get_Account.Owner.Email</elementReference> </value> </assignmentItems> <connector> <targetReference>Next_Element</targetReference> </connector> </assignments> ``` ### Collection Addition ```xml <assignments> <name>Add_To_Collection</name> <label>Add To Collection</label> <locationX>314</locationX> <locationY>398</locationY> <assignmentItems> <!-- Add a single record to a collection variable --> <assignToReference>colAccounts</assignToReference> <operator>Add</operator> <value> <elementReference>varCurrentAccount</elementReference> </value> </assignmentItems> <connector> <targetReference>Next_Element</targetReference> </connector> </assignments> ``` --- ## 2. Decision Element Branch logic with conditions, outcomes, and a default outcome. ```xml <decisions> <name>Check_Account_Rating</name> <label>Check Account Rating</label> <locationX>578</locationX> <locationY>278</locationY> <defaultConnector> <targetReference>Handle_Default</targetReference> </defaultConnector> <defaultConnectorLabel>Default Outcome</defaultConnectorLabel> <rules> <name>Is_Hot</name> <conditionLogic>and</conditionLogic> <conditions> <leftValueReference>$Record.Rating</leftValueReference> <operator>EqualTo</operator> <rightValue> <stringValue>Hot</stringValue> </rightValue> </conditions> <conditions> <leftValueReference>$Record.AnnualRevenue</leftValueReference> <operator>GreaterThan</operator> <rightValue> <numberValue>1000000.0</numberValue> </rightValue> </conditions> <connector> <targetReference>Handle_Hot_Account</targetReference> </connector> <label>Is Hot</label> </rules> <rules> <name>Is_Warm</name> <conditionLogic>or</conditionLogic> <conditions> <leftValueReference>$Record.Rating</leftValueReference> <operator>EqualTo</operator> <rightValue> <stringValue>Warm</stringValue> </rightValue> </conditions> <connector> <targetReference>Handle_Warm_Account</targetReference> </connector> <label>Is Warm</label> </rules> </decisions> ``` ### Custom Condition Logic ```xml <rules> <name>Complex_Logic</name> <!-- Custom logic: (1 AND 2) OR 3 --> <conditionLogic>(1 AND 2) OR 3</conditionLogic> <conditions> <leftValueReference>$Record.Industry</leftValueReference> <operator>EqualTo</operator> <rightValue> <stringValue>Technology</stringValue> </rightValue> </conditions>