Custom Call Flows can play text-to-speech and recorded audio, collect input from the phone keypad, record audio from the caller, branch depending on key presses and contact properties, trigger SMS messages, and can even fetch data from external systems.
To handle incoming calls, you could create a Custom Call Flow so that when someone calls your virtual number, you can play a message, then prompt the caller to press a key. Depending on which key they press, you can forward the call, record a voicemail message, subscribe them to a group, or update your contact database.
For outgoing calls, you can broadcast a Custom Call Flow to play a message, then let contacts press a key to acknowledge your message, to unsubscribe, or to forward the call to an agent.
Creating a Custom Call FlowTo create a custom call flow, go to the Services page and add a new service, then click Voice > Custom Call Flow.
To start, select whether the call flow should be applied to incoming calls, outgoing calls, or both:
Each call flow consists of multiple actions and conditions. After each action, the call flow will move to the next action, following the arrows in the diagram. Conditions allow you to branch depending on variables such as a key press or fields in your contact database. When the end of the flow is reached (or a "hang up" action is reached), the call will hang up.
The available actions are shown below:
To create a very simple call flow, you can add a "Play text to speech" action:
Each action has a colored shape to its left (either a square, circle, or diamond). To move an action to a different location in the call flow, drag and drop the shape to the desired position in the call flow.
Prompting for InputActions with a "circle" icon, including "Record audio response", "Wait for key press", and "Wait for multiple digits", will wait for the user to provide input, and save the input in a variable, before continuing to the next action in the call flow. For the "Record audio response" action", the value will be a URL to an MP3 file of the audio recording. For the "Wait for key press" and "Wait for multiple digits" actions, the value of the variable will be the actual keys pressed.
After prompting the user to press a key, you can add one or more conditions to create branches in the call flow. For example, if you have a "Wait for key press" action with the response ID "menu_option", you can add conditions that use the variable [[vars.menu_option]]:
Creating SubroutinesIn Custom Call Flows, a subroutine is a portion of the call flow that you can jump to from anywhere else in the call flow using a "Run subroutine" action. Subroutines are very useful for creating IVR menus, for allowing contacts to repeat a part of the call flow, and for allowing a part of the call flow to be reached via multiple different paths.
Often, call flows will start with a "Run subroutine" action that jumps to a "main_menu" subroutine. Later in the call, another "Run subroutine" action may jump back to the "main_menu":
After executing all of the actions in a subroutine, Telerivet will return to the place in the call flow immediately after the "Run subroutine" action, and will continue executing the next action at that point in the flow, or hang up if there are no more actions.
Testing Your Call FlowFor call flows that handle incoming calls, after saving the Custom Call Flow service, you can test it by calling your virtual number.
For convenience, you can also test the call flow in your browser, without needing to make actual calls. Click "Test Service" at the top of the page, then click the green "call" icon. Telerivet will show the actions that would be performed in the call flow. During a call, you can press keys on the phone keypad.
If your call flow contains "Record audio response" actions, the simulated phone can record your response using your computer's microphone.