Overview
Plivo High Level Objects (PHLO, pronounced “flow”) is a visual workflow design studio. It provides building blocks that let you create custom voice and SMS applications without writing program code. Instead, you drag and drop components onto a canvas and connect them to create custom workflows. That lets you build applications quickly, and you can speed development time further by using PHLO templates — prebuilt workflows for common use cases.
PHLO terminology
Canvas
The canvas is the space where you place and connect components to create a PHLO. If a PHLO grows to cover the visible canvas, you can scroll the canvas in any direction to declutter the display.
Component
Components are PHLO’s building blocks. You drag and drop components to the canvas to create nodes, then connect the nodes to create workflows. You can view a list of all components on the Components Library page.
Node
A node is an instance of a component that has been placed on the canvas. Each node must have a unique name within the PHLO.
States
States are properties that a component is set to or based on for each action. Each component has one input state and at least one output state.
Configuration and Information tabs
Every node has a set of default configuration values associated with it. When you click on a node you can view its configuration in the Configuration tab on a panel on the right of the canvas. To view the list of configuration options available for the node, click the Information tab at the top of that panel. The Information tab displays information about the node, its default variables, and node-specific options and states.
You can change a node’s configuration by entering values in the Configuration tab. After you make changes, you must validate the node by clicking on Validate at the bottom of the panel. The side panel will display validation errors, if any, or slide off the canvas if the node is validated. You must correct all validation errors before you save the PHLO.
Triggers
Triggers let you manage an ongoing call. There are four types of triggers:
- Call
- Hold
- Transfer
- Hangup
Creating PHLOs
You can create a PHLO either by using a blank canvas or by using a packaged templates.
Building a PHLO using a blank canvas
- In the Plivo console, click the PHLO icon. The PHLO page will appear and display your existing PHLOs. If you’re creating your first PHLO, the PHLO page will be empty.
- Click the Create New PHLO button to start building a new PHLO.
- In the Choose your use case window, click Build my own. The PHLO canvas will appear with the Start node. Note: The Start node is the starting point of any PHLO. It lets you trigger the start of a workflow with either an incoming SMS message or voice call or an API request.
- From the Components list at the left, drag and drop a component onto the canvas to create a new node. The Configurations tab will appear — see Configuring PHLO components.
- Click Validate to save the configurations for the node.
- Drag more components onto the canvas as appropriate. Connect nodes in a logical sequence. For more information, see Connecting PHLO components.
- Enter a unique name for the PHLO, then click Save.
You can then trigger the PHLO, as we talk about below.
Building a PHLO using a template
- In the Plivo console, click the PHLO icon. The PHLO page will appear and display your existing PHLOs. If you’re creating your first PHLO, the PHLO page will be empty.
- Click the CREATE NEW PHLO button to start building a new PHLO.
- In the Choose your use case window, select one of the available templates. The PHLO canvas will appear with all of the nodes that are part of the use case connected appropriately.
- If you need to add more steps to the workflow, then from the Components list at the left drag and drop a component onto the canvas to create a new node. Each time you add a node the Configurations tab will appear — see Configuring PHLO components.
- Connect nodes in a logical sequence. For more information, see Connecting PHLO components.
- Enter a unique name for the PHLO, then click Save.
You can then trigger the PHLO, as we talk about below.
Connecting PHLO components
After you’ve added components to the PHLO canvas, you must create connections between the nodes to complete the workflow. Defining a command to a response is as simple as connecting the output state of one node to the input state of another. The output state is the command and the input state is the response.
Each node has a predefined set of output states. To connect PHLO components, on the PHLO Canvas, click and drag the output state of a node to the input state of another node. For example, here’s an IVR menu that shows the connection between output and input states.
In this example, the IVR Menu_1 node has four output states:
- No Input
- Wrong Input
- 1
- 2
The IVR Menu_1 node’s No Input output state connects to the Play Audio_1 input state at the top of the node. Every node has a input state except the Start node.
Once you’ve connected all the nodes on your PHLO canvas, make sure you’ve configured the components, as we talk about in the next section.
Configuring PHLO components
You must configure every node to make sure the workflow works as intended. You can access a node’s Configurations tab by clicking on it on the canvas. The adjacent Information tab in the right panel explains the configuration and variables available for the node.
PHLO supports two types of variables: global variables and variables specific to components.
Global variables
You configure global variables by defining key-value pairs in the Start node of the PHLO. Connect the Start node to the component in which you want to use the global variables, then use two curly brackets to view all available variables. Scroll through the list and select the variable you want to use.
Variables specific to components
Each component has a list of predefined variables that you can use. For more information on the components and their default variables and configurations, see the PHLO components library page.
After you change a node’s configuration, click Validate to make sure there are no errors in the configuration. PHLO will display a message if it finds an error.
Triggering a PHLO
You can trigger a PHLO with an incoming call or SMS message or with an outgoing API call. If you plan to trigger a PHLO for an incoming call or message, you must add the PHLO to a Plivo number.
If you need to buy a phone number, visit Phone Numbers on the console and click Buy Number. On this page you can search for available phone numbers based on country, type (local, national, mobile, or toll-free), and capability (voice, SMS, or MMS), then click Buy Number for the number that you want to purchase.
Triggering a PHLO using a phone number
Once you’ve created and configured a PHLO, assign your PHLO to a number.
- Visit Phone Numbers on the console.
- On the Numbers page, under Your Numbers, click the phone number you want to use for the PHLO.
- In the Number Configuration section, select PHLO from the application type drop-down list.
- From the PHLO Name drop-down list, select the PHLO you want to use with the phone number.
- Click on Update Number.
Make a call or send an SMS message to the phone number to test your PHLO.
Triggering a PHLO using an API request
Once you’ve created and configured your PHLO, copy the PHLO URL either by clicking on the button in the upper right corner above the PHLO canvas or from the list on the PHLO page of the console.
PHLO Listing
Integrate the PHLO into your application workflow by making an API request to the PHLO URL. You can trigger an API request with or without a payload depending on how the PHLO is set up. You can configure static payload values (from, to, etc.) on the PHLO console. Alternately, you can define the payload keys as Liquid templates on the PHLO console and pass the values dynamically at runtime for execution.
Code sample — without payload
Code sample — with payload
You can get the Auth ID and Auth Token you need for this code from the overview page of the console.
AuthID
You can install a server SDK to help you code, and set up a development environment.
Use case guides
We’ve put together some use cases guides to help you get started with some common tasks:
- Voice notification
- Voice alerts
- Pinless conference
- Conference with PIN
- IVR
- Call forwarding
- Voice survey
- Voicemail
- SMS alerts
- SMS notifications
- SMS survey
- SMS autoresponder
All of these use cases are also available as PHLO templates — predefined workflows that help you build your applications faster.