Lightning Flow iFrame
Embed Lightning Screen Flows on external websites using a Salesforce Site and the FlowIframeEmbed Visualforce page.
WordPress: wordpress.org/plugins/lightning-flow-iframe (v1.1.5+)
What you get
Section titled “What you get”- Flows run in Lightning Runtime (not Classic Flow UI).
- Auto height: the iframe grows and shrinks with each screen (
frameHeight). - Scroll to the top of the flow when the visitor clicks Next or Finish. Set
scrollOffseton the parent page when a fixed header would cover it. - Styling keys on the embed:
bg,padding,primary,primaryHover, andsecondaryset the page color, the space around the flow, and the button colors. - Flow inputs from URL parameters using an
inputVarsallowlist. - Finish redirect: send the parent window to a thank-you page via
endUrl. WhenendUrlis omitted, the iframe keeps resizing after the flow finishes.
Components
Section titled “Components”| Piece | Where |
|---|---|
| FlowIframeEmbed package | Install from AppExchange or 2GP unlocked package |
| FlowOut Aura app | Included in package (three_levers:FlowOut) |
| FlowIframeEmbed VF page | https://your-site.force.com/site-prefix/apex/three_levers__FlowIframeEmbed |
| three-levers-flow-embed.js | Optional script for non-WordPress sites |
| WordPress plugin | Shortcode [Lightning-Flow-iFrame] with settings defaults |
Note - namespaced Visualforce page URLs: The page ships in the three_levers package as three_levers__FlowIframeEmbed. Site iframe URLs use /apex/three_levers__FlowIframeEmbed, not /FlowIframeEmbed. See Salesforce setup for details.
High-level setup
Section titled “High-level setup”- Install FlowIframeEmbed in Salesforce.
- Create and activate the Screen Flow; note its API Developer Name.
- Add FlowIframeEmbed to a Salesforce Site and configure guest access.
- Allow your parent domain in clickjack/CSP settings.
- Embed with the WordPress plugin or JavaScript widget.
Flows, Sites, and guest user permissions are configured per org and are not bundled in the package.
Choose your path
Section titled “Choose your path”| Platform | Start here |
|---|---|
| WordPress | WordPress |
| Any other site | JavaScript widget |
| Salesforce side | Salesforce setup |
| Flow design | Flow creation |
| URL behavior | Querystring variables · Finish URL |
External embed options
Section titled “External embed options”- WordPress: plugin with Settings → Lightning Flow iFrame defaults and bare
[Lightning-Flow-iFrame]shortcode (embed mode). Legacy mode preserved for existing Visualforce integrations. - Recommended (non-WordPress): JavaScript widget (
window.tlFlowEmbed). - Manual: iframe
srcplus apostMessagelistener for{ frameHeight: number }and{ frameScroll: 'top' }.scrollOffsetis a parent-page setting. It is not an iframe URL parameter.
Related products
Section titled “Related products”- Map Records and Take Action — report map and geofencing (separate package)