Event - Trigger by other Flows (Subroutine)
-
OSS/BSS Answers
Access Control Admin Audit B3Network Master Account Channel App Contract App Customer App Discount App Edge Server File Management Finance App Invoice App Number Management Payment Portal Settings Price List Product App Release V2 SMS Gateway Supplier App Support Center Support Hub Business Hub Sales Hub
- App Model - Organization Management
- App Model - Communication Apps Answers
- License Model - Organization Management
-
License Model - CPaaS Solution Answers
Phone System - Admin Guide Phone System - End-user Guide Mobile App Desktop App Web Phone Auto Attendant - Admin Guide Developer Hub - Admin Guide Microsoft Teams Operator Connect - Admin Guide Microsoft Teams Direct Routing - Admin Guide Contact Center - Supervisor Guide Contact Center - Agent Guide Omni-Channel SIP Trunk CPaaS - SIP Trunk Power SIP Trunk CPaaS Fax Contact Dashboard Campaign File Explorer
- Telcoflow
- Integrations Answers
- Updated Regulations
- Ideas Portal
Table of Contents
Overview
This event is also known as a Subroutine which is a smaller flow for a particular task that is available for repeated use in the large flow. It allows users to create general actions that are reusable in different flows under their accounts.
Similar to Actions, subroutine also has Inputs and Outputs which must be declared in advance.
A Subroutine flow has the following properties:
- Predetermined input data structure.
- Optional predetermined output data structure.
- All branches of the subroutine flow must end with Return to Origin Flow action, returning output data with a structure that matches the predefined one.
- Compatible with all types of Projects.
Configuration
In order to create a Subroutine, please follow the steps below:
- Create a new flow with trigger: Trigger by other Flows
- Fill in the requirements:
- Input: Input needs to be passed into this subroutine when triggered.
- Output: Output of this subroutine that can be used as an input of later actions.
-
Data type:
- String: can take both numbers and characters.
- Number: can take numbers only.
- Boolean: can only take the values true or false.
-
Handle ongoing call (optional)
- If you tick this option, it means that this subroutine is only available for the flows which have ongoing transactions (e.g. Incoming Call to Phone Numbers,...)
- Configure Actions
- Add the Action - Return to Origin Flow
- Activate your Subroutine Flow
- Use it for other Flows as an action
![](https://d2x3xhvgiqkx42.cloudfront.net/c94ab348-5fb1-4c1d-89b1-fa79e3e916d0/81ec6e6f-2b1b-45dc-9193-b23c4a10d966/2022/07/22/52f4bb46-f971-49ba-8fee-19e55754c609/7217496a-70f4-460e-b022-73722d442d7c.gif)
Example
Requirements:
- If the output of the previous subroutine is English, trigger branch: Caller chose English
- If the output of the previous subroutine is Indonesian, trigger branch: Caller chose Indonesian
Configuration:
In order to satisfy the requirements, please follow the steps below:
1. Subroutine Flow
Step 1: Event
- Create a new flow with trigger: Trigger by other Flows
- Fill in the requirements:
-
Input: Input needs to be passed into this subroutine when triggered.
- Leave blank
-
Output: Output of this subroutine that can be used as an input for later actions.
- Language - String
-
Handle ongoing call
- Tick
-
Input: Input needs to be passed into this subroutine when triggered.
- Create
![](https://d2x3xhvgiqkx42.cloudfront.net/c94ab348-5fb1-4c1d-89b1-fa79e3e916d0/81ec6e6f-2b1b-45dc-9193-b23c4a10d966/2022/07/22/a2bf31e0-2042-44c8-b63f-a77e3d10bbb0/bda7dbfd-31cf-40c5-bdbf-d932df76e40c.gif)
Step 2: Action - Gather Input
Configure Actions - Gather Input:
- Message: "Thank you for calling B3Networks Academy. Please press 1 for English, press 2 for Indonesian."
- Expose Output
![](https://d2x3xhvgiqkx42.cloudfront.net/c94ab348-5fb1-4c1d-89b1-fa79e3e916d0/81ec6e6f-2b1b-45dc-9193-b23c4a10d966/2022/07/22/eed3fbbf-0983-4349-b956-7a08561aef42/5c16124f-cad3-4cab-bd93-85899a30db0f.gif)
Step 3: Action - Split Flow
- Configure Actions - Split Flow:
-
Path 1: English
- User's input digits = 1
-
Path 2: Indonesian
- User's input digits = 2
-
Path 1: English
- Add the Action - Return to Origin Flow for each Path
-
Path 1:
- Language - English
-
Path 2:
- Language - Indonesian
-
Path 1:
![](https://d2x3xhvgiqkx42.cloudfront.net/c94ab348-5fb1-4c1d-89b1-fa79e3e916d0/81ec6e6f-2b1b-45dc-9193-b23c4a10d966/2022/07/22/1897016c-b93d-48b8-b67c-7e278ef9746b/8de8c6ef-cd11-429e-a683-035c9bf8c564.gif)
Step 4: Deploy
- Deploy your Subroutine Flow
- Use it for other Flows as an action
![](https://d2x3xhvgiqkx42.cloudfront.net/c94ab348-5fb1-4c1d-89b1-fa79e3e916d0/81ec6e6f-2b1b-45dc-9193-b23c4a10d966/2022/07/22/79cb3aa0-3cb4-4ac9-b6b6-19b439777067/84084aac-8248-4914-95ae-5b7b84001857.gif)
2. Main Flow
Step 1: Event
- Create a new flow with trigger: Incoming Calls to Phone Numbers
- Add the Action - Transfer to other Flow
- Choose the Subroutine that you created in the previous step
- Expose output
![](https://d2x3xhvgiqkx42.cloudfront.net/c94ab348-5fb1-4c1d-89b1-fa79e3e916d0/81ec6e6f-2b1b-45dc-9193-b23c4a10d966/2022/07/22/7f2705ab-1c31-4a70-aa85-ebb174c9676f/fc02352c-64ea-4607-bdf1-780418b522a8.gif)
Step 2: Action - Split Flow
Choose Action - Split Flow
-
Conditions:
-
Path 1:
- Name: Caller chose English
- Outputs of the Subroutine = English
-
Path 2:
- Name: Caller chose Indonesian
- Outputs of the Subroutine = Indonesian
-
Path 1:
![](https://d2x3xhvgiqkx42.cloudfront.net/c94ab348-5fb1-4c1d-89b1-fa79e3e916d0/81ec6e6f-2b1b-45dc-9193-b23c4a10d966/2022/07/22/9297eb2e-6bf9-4130-95b6-37262b8961d9/3b1702ac-3869-434d-81bc-6a80509fc709.gif)
Step 3: Path 1 - Caller chose English
Actions:
- Play a Message: "You are calling B3Networks Academy for more information, please visit our website."
- Hang Up
![](https://d2x3xhvgiqkx42.cloudfront.net/c94ab348-5fb1-4c1d-89b1-fa79e3e916d0/81ec6e6f-2b1b-45dc-9193-b23c4a10d966/2022/07/22/94b85591-54a6-4281-969a-2bd24be68e27/1de1f2d7-0b6c-40ee-b588-55c0569cfac7.gif)
Step 4: Path 2 - Caller chose Indonesian
Actions:
- Play a Message: "Anda menghubungi B3Networks Academy untuk informasi lebih lanjut, silakan kunjungi website kami."
- Hang Up
![](https://d2x3xhvgiqkx42.cloudfront.net/c94ab348-5fb1-4c1d-89b1-fa79e3e916d0/81ec6e6f-2b1b-45dc-9193-b23c4a10d966/2022/07/22/08988747-e0a3-4390-b699-20538db45fe1/529de3d7-b21a-43f4-b430-9193382bceee.gif)
Step 5: Deploy
Deploy the flow.
![](https://d2x3xhvgiqkx42.cloudfront.net/c94ab348-5fb1-4c1d-89b1-fa79e3e916d0/81ec6e6f-2b1b-45dc-9193-b23c4a10d966/2022/07/22/9d398236-11f1-400e-8bd1-4ae233ecc4ba/6cea011a-acbc-4ea9-8b68-997b373a70f0.gif)