Docs »

Bots »

Behaviors »

Subroutines

Subroutine nodes allow you to create reusable sub-behaviors that can be used any number of times by any action node in the behavior. A subroutine will never run on its own.

For instance, consider again the above example of our “Schedule:” decision. Perhaps in every outcome other than “During office hours”, and among other actions that justify splitting the outcomes, we want to send the same “out of office” auto-response to contacts who write in when we’re not there. A single subroutine would contain the action node for sending the email message, and the four outcomes would each use it. Any changes to that auto-response action would only need to be made in a single place.

Subroutine nodes can also use other subroutine nodes.