How to build a Flexi Flow
How to make your page change when a visitor clicks a button in the video. One short script does it.
A Flexi Flow is an ordinary Inline Flow whose button clicks change the page around it. A ticket's details open. A panel swaps. A form slides into view. There's nothing special about the Flow itself. A short script on your page listens for button clicks and changes the page.
Flexi Flow: the page reacting to choices in the video.
The parts
A Flexi Flow has two sides. ReelFlow gives you the video and a way to listen to it. Your website does the rest.
How ReelFlow connects to your website
On the left is ReelFlow: your Flow and its buttons. On the right is your website: your own HTML and CSS. In the middle is the Player API. It's a short script on your page that hears each button click in the video and tells your page what to do. ReelFlow doesn't change your page by itself. The script is the link between the two.
The parts on a real page
The same idea on an event page. The Target Element is the empty box where the player sits. The Inline Flow plays inside it. Each Action Button in the video has its own ID. Your page content is the panel beside the player. The connecting script runs on your page, out of sight. When a visitor clicks "Speakers", the script swaps the panel to show the speakers.
| Part | Who builds it |
| An Inline Flow with Action Buttons | Marketer, in the Flow Builder |
| A Target Element: an empty element where the player goes | Developer, on your page |
| Your page content: the panels, cards or forms that change | Developer, on your page |
| The connecting script | Developer, using the Player API |
Step 1: Build and place the Inline Flow
- Build an Inline Flow, with a button for each choice the page should react to.
- On your page, add an empty element with an ID, such as
<div id="reelflow-player"></div>. - In the Flow's Activation tab, set Target Element to
#reelflow-playerand set the Page. - Publish, and check the player appears in the right place.
Step 2: Plan what each button does
Write a short table before any code. For example:
| Button in the Flow | What the page does |
| Day pass | Opens the Day pass card |
| Full pass | Opens the Full pass card |
| Not sure yet | Closes the cards |
Also decide what the page looks like before anyone clicks. Everything important should be on the page without the video.
Step 3: Find each button's ID
The script tells buttons apart by ID. IDs stay the same if someone rewords a button. Ask your customer success manager for them, or find them yourself:
- Open your live page in Chrome. Right-click, choose Inspect, then open the Console tab.
- Paste this, with your Flow's ID, and press Enter:
ReelFlow.getFlow('F-xxxxxxxxxxxxx').player.on('actionButton:click', function (button) {
console.log(button.id, button.label);
});
3. Click each button in the video. The console shows its ID.
Finding button IDs in Chrome's console.
If the Flow is rebuilt or duplicated, its buttons get new IDs. Check them again.
Step 4: Add the connecting script
This is the script that links the video to your page. You copy it once, then fill in three things:
- Your Flow ID. Find it in the Flow Builder. It looks like
F-xxxxxxxxxxxxx. - Your button IDs. One line for each button from your table in Step 2.
- What happens for each button. This is your own code. It usually shows or hides part of your page, by adding or removing a class.
Paste this before </body>. Fill in your Flow ID, and one line per button from your table.
<script>
(function () {
var FLOW_ID = 'F-xxxxxxxxxxxxx';
var REACTIONS = {
'button-id-1': function () { /* change the page */ },
'button-id-2': function () { /* change the page */ }
};
function ready(fn) {
if (window.ReelFlow) fn();
else window.addEventListener('reelflow:ready', fn, { once: true });
}
ready(function () {
var flow = window.ReelFlow.getFlow(FLOW_ID);
if (!flow) return console.warn('[ReelFlow] This Flow is not on the page:', FLOW_ID);
flow.player.on('actionButton:click', function (button) {
var reaction = button && REACTIONS[button.id];
if (reaction) reaction(button);
});
});
})();
</script>
For example, to open the Day pass card when the "Day pass" button is clicked, the line for that button might be:
'ab-7f3k2q9d1m4x': function () {
document.querySelector('#day-pass').classList.add('is-open');
}
Your CSS then decides what is-open looks like. The look of every panel, card or form is up to you.
Where to paste it: in your website editor's custom code area for the page, in the part that goes just before </body>. It must come after your page content and after the Install Code.
In plain English, the script waits for ReelFlow to load, finds your Flow, and listens for clicks. When a button in your list is clicked, it runs that button's reaction.
If a button does nothing
- Check the button IDs in your script match the console output. Rebuilt or duplicated Flows get new IDs.
- Check the script is before
</body>, after your page content. - If the button also opens another page, the visitor leaves before the change shows.
Still stuck? Open your browser's console. Messages starting with [ReelFlow] usually name the problem.
Make it work on phones
Most event visitors arrive on a phone. Plan for it.
Desktop and phone: the same Flexi Flow, not planned and planned.
- Stack the layout. Below about 900 px wide, put the player at the top and the changing content below it.
- Make the player taller. Use 4:5 or 5:6 instead of 16:9, so the presenter and buttons fit. Set the same shape in the Activation tab.
- Leave some page showing. Don't let the player fill the whole screen.
- Show what changed. After a choice, scroll the player back to the top, or show a small "Scroll to see more" button.
- Test on real phones. An iPhone and an Android phone, not just a narrow browser window.
A "Scroll to see more" button telling phone visitors the content below has changed.
Four things about the player
- It sets its own size. It writes height and width limits onto the Target Element. To control the size, put the element inside a box and size the box.
- It lays out its buttons at set moments. If your page resizes the player mid-video, trigger a window resize event so the buttons re-lay out.
- It needs room for its buttons. Below about 780 px wide, it stacks them, so give a narrow player more height.
- It can't restart from your page. An Inline player has no restart command yet.
Things to remember
- The script listens. It can't play, pause or restart an Inline player. Your page follows the Flow.
- A click still does what the Flow says. If a button opens another page, the visitor leaves before seeing your change.
- Resetting the page doesn't reset the video.
What you can build
Once the script works, the page can react in lots of ways. Each idea below has its own videos and a brief for your AI assistant in Flexi Flow: Ideas and Inspiration.
- Side panel: a panel beside the player swaps with each choice.
- Card picker: one card opens to show its details.
- Resizing the player: the player moves aside and your form opens.
- Full Page Personalisation: the whole page changes for each visitor.
- Reveal or switch a video: show a video on demand, or switch between people.
Brief for your AI assistant
Using the ReelFlow Player API reference (https://help.reelflow.com/reelflow-player-api-reference) and ReelFlow's How to build a Flexi Flow guide, connect Inline Flow [F-ID] to [page] on [website editor]. Here's my table of button IDs and what each should change: [table]. Build every state in HTML and CSS, and only add or remove classes in JavaScript. Make it work on phones, with the player above the content that changes.