Before starting to implement a Dynamic Flow, make sure you're familiar with embedding a regular, static Flow as described in https://intercom.help/flowbox/embedding-flowbox-on-your-site/embedding-a-flow-on-your-website

Tag Flows are a great way to dynamically extend your regular Flows by pulling in posts sharing one or many tags. 🌞

To create a Dynamic Flow based on tags you need to have posts with tags added in Moderate. 🏷

You then add the embed script to your HTML source the same as for static Flows but you also tell the embed script which posts to show by passing in an array of tags when calling init :

<script>
  window.flowbox('init', {
    container: '#js-flowbox-flow',
    key: 'Your-Flow-Key',
    tags: ['summer', 'sun'] // Display posts that have either "summer" or "sun" as tags
  })
</script>

Additional parameters

You can also change the behavior of the dynamic Flow to include posts that have one of the tags added or all the tags by passing in the tagsOperator property to init . This supports the following options:

  • all  meaning "the Dynamic Flow will pull in posts that's tagged with all the tags in the list". This is used by default.
  • any  meaning "the Dynamic Flow will pull in posts that's tagged with one or more of the tags in the list".
<script>
  window.flowbox('init', {
    container: '#js-flowbox-flow',
    key: 'Your-Flow-Key',
    tags: ['summer', 'sun'],
    tagsOperator: 'all' // Display posts that have *both* "summer" and "sun" added as tags
  })
</script>

Interactive example – switching between Tags 

An interactive demo for switching tags in a Tag Flow—including example code—can be found here. This demo shows you how to set up a simple navigation for switching between a few different tags for one Flow. ✨

The long story short is that you make use of the window.flowbox('update')  method to update the criteria for which posts to display. 

Additional resources

Did this answer your question?