Introducing Subflows

This week, we updated the flow engine to include subflows. This feature allows you to start the active contact in a 'child' flow at any step, then return them to the original 'parent' flow once they've completed it. It also removes the need to copy certain elements of one flow and add them to another. For example, you can now reuse a flow dedicated to registering a new contact by calling it from any other flow. Flow redundancy is a thing of the past!

Calling a Subflow

To call a subflow, add a RuleSet to any step in a flow, select 'Run a flow', then choose the flow you'd like the active contact to enter.

Two new conditions are introduced, 'completed' and 'expired', giving you the ability to branch the active contact based on their activity in the child flow. 

New Variables

This update introduces two new variables, '@parent' and '@child', and changes the meaning of '@extra'. Previously, @extra could be used to reference: 
  1. flow fields collected in the previous flow, if a contact is moved from one flow to another via the 'Start another flow' action. 
  2. the contact fields associated with the active contact in the previous flow, if a new contact is started in a flow via the 'Start someone else in a flow' action. 
  3. JSON objects returned by a 'Call Webhook' RuleSet. 

Now, @parent takes the place of @extra for scenarios 1 and 2, while @extra is solely dedicated to JSON objects. To call a flow field from the previous flow, use the format '@parent.{flow_field}'. To call a contact field associated with the active contact in the previous flow, use '{contact_field}. 

@child can be placed in the parent flow to reference flow fields collected by the child flow up to the point the contact either finished the child flow or expired from it.

Try it Out

Import the following flows into your account via this page to play with a fully-baked subflow example. Note that imports are limited to those who've purchased credits. Haven't topped up? You can do so here

Questions? Comments? Let us know; we love hearing from you. 

Follow us on Twitter to interact with a Bot built with TextIt, or create a free account to build your own. Get in touch anytime with any questions, comments, or suggestions.