<

Overview

PHLO stands for Plivo High-Level Objects. It is a collection of building blocks that allows you to create custom communication workflows (including Voice and SMS) based on your requirements. With PHLO, you can build applications with much lesser code. It provides you with a graphical user interface where you can place components and create custom workflows to better suit your needs.

We have put together the following collection of use cases guides to help you get started:

The above use cases are also available on Plivo Console as PHLO Templates. PHLO Templates are predefined workflows that you can use to build and ship your capabilities faster. Depending on the template, all necessary nodes and connections will be available for you to configure and deploy.

Features

PHLO has the following features:

  • Complete parity with Plivo APIs
  • Interface to drag and drop components and create workflows
  • Build applications and ship capabilities faster with much lesser code, using PHLO Templates
  • Create custom integrations with third-party applications
  • Create Voice and SMS based capabilities

PHLO Basics

PHLO

Pronounced as “flow”, PHLO stands for Plivo High-Level Objects. It is a combination of components that make a workflow.

The following components are available in PHLO:

  • Send SMS
  • IVR Menu
  • Get Input
  • Initiate Call
  • Call forward
  • Hangup
  • Conference
  • Play Audio
  • Record Audio
  • Multi-Party Call
  • HTTP Request
  • Counter
  • Branch

Canvas

Canvas is the space where you place and connect different components to create a PHLO. It is an infinitely scrollable space which allows the user to create and view the PHLOs.

Top Navigation Bar

The Top Navigation Bar lists the available Plivo Products for your account. It helps you switch between Plivo Products.

Components

Components are the building blocks used to create a PHLO. Based on the workflow, you can piece together different components to create a PHLO.

States

States are properties that the component is set to or based on for each action. Each component has one input state and at least one output state.

Node

Node is an instance of a component when placed on the canvas. Drag and drop components to the canvas to create their nodes. Each node must have a unique name within the PHLO.

Configurations tab

Every node has a set of default configurations associated with it. Click the node to view the configurations for the node. To view the list of configuration options available for the node, click the Information tab.

Make sure you validate the node after the configuration. The side panel will display validation errors, if any. Make sure you correct all validation errors before saving the PHLO.

Information tab

The information tab gives you more information about the node. You can also view all the default variables available for each node, along with node specific options and states.

Triggers

Triggers provide you the ability to manage an ongoing call. There are four types of triggers:

  • Call
  • Hold
  • Transfer
  • Hangup

For more information, see the Components Library.

Creating PHLOs

Creating a PHLO is a very simple process. You can create a PHLO by either using a blank canvas, or by using one of our packaged templates.

Building the PHLO structure using a Blank Canvas

To build a PHLO structure using a blank canvas

  1. On the top navigation bar, click PHLO. The PHLO page will appear and display any of your existing PHLOs. If this is your first PHLO, then the PHLO page will be empty.
  2. Click CREATE NEW PHLO to build a new PHLO. The Choose your use-case screen appears.
  3. On 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. You can choose between the three available trigger states of the Start node; Incoming SMS, Incoming Call, API Req uest.
  4. From the Components list, drag and drop the components you wish to add to your PHLO based on your use case. A node will be created for the component, on the canvas, and the Configurations tab will appear.
  5. Connect the nodes in a logical sequence. For more information, see Configuring PHLO Components.
  6. Click the node to configure it. For more information, see Configuring PHLO Components.
  7. Click Validate to save the configurations for the node.
  8. Enter a unique name for the PHLO, and then click Save. Your PHLO will be saved. Add the PHLO to a Phone Number, if it is based on an incoming call or SMS, or link it to your application using the PHLO URL to trigger the PHLO.

Building the PHLO structure using a template

To build a PHLO structure using a template

  1. On the top navigation bar, click PHLO. The PHLO page will appear and display any of your existing PHLOs. If this is your first PHLO, then the PHLO page will be empty.
  2. Click CREATE NEW PHLO to build a new PHLO. The Choose your use-case screen will appear.
  3. On the Choose your use-case screen, select one of the available templates. The PHLO Canvas appears with the Start node, and all other required nodes. Components that are a part of the template will be connected appropriately by default.
  4. If you need to add more components to the PHLO, from the Components list, drag and drop the components based on your use case.
  5. Create the necessary connections between the nodes. For more information, see Configuring PHLO Components.
  6. Configure the individual nodes based on your use case. For more information, see Configuring PHLO Components.
  7. Enter a unique name for the PHLO, and then click Save. Your PHLO will be saved and available for you to assign to a Phone Number.

Connecting PHLO Components

Once you have all the required components added to the PHLO Canvas, you must create a connection 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 node. The output state is the command and the input state is the response. This will also define the workflow transition for each command, in the PHLO. 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. Below is an example of an IVR menu that shows the connection between the input and output states.

In the above example, the IVR Menu_1 node has the following output states:

  • No Input
  • Wrong Input
  • 1
  • 2

Similarly, the Play Audio_1 node has Prompt completed as the output state and Hangup_1 has Hangup Complete as the output state. The No Input state of the IVR Menu_1 node is connected to the Play Audio_1 using the input state at the top of the node. Every node has a input state, except the Start node. Once you have connected all the nodes on your PHLO canvas, make sure to configure the components. For more information, see Configuring PHLO Components.

Configuring PHLO Components

Every component must be configured to make sure the workflow works as intended. You can access the Configurations tab for the components by clicking on their nodes on the canvas. You can also access the Information tab to know more about the default configurations and variables available for each node. In a PHLO, there are two types of variables that you can use.

  1. Global Variables
  2. Variables specific to Components

Global Variables Global variables can be configured in the Start node of the PHLO. To use Global Variables, make sure you define the key and value pairs in the Start node. Connect the Start node to the component in which you wish to use the global variables. Once the nodes are connected, use two curly brackets to view all available variables. Scroll through the list of variables, and then select the variable that is applicable for your use.

Note: Make sure you define specific values for your variables.

Variables specific to Components Each component has a list of predefined variables. You may choose to use any of the predefined variables. For more information on the components and their default variables and configurations, see PHLO Components Library.

Once you have configured the node, click Validate to make sure there are no errors in the configuration. In case of any validation errors, a message will be displayed with an error message.

If the PHLO becomes very big and covers the visible canvas completely, you can scroll the canvas in all directions to help declutter the PHLO. Use the trackpad on your laptops to navigate around the canvas.

Triggering a PHLO

A PHLO can be triggered using an outgoing API Call or with an incoming Call or SMS. To trigger a PHLO for an Incoming Call or SMS, you must add the PHLO to a Plivo Number.

Triggering a PHLO using a Phone Number

Once you have created and configured your PHLO, assign your PHLO to a number. To assign a PHLO to a number

  1. On the Product Navigation bar, click PHONE NUMBER.
  2. On the Numbers page, under YOUR NUMBERS, click the phone number you wish to use for the PHLO.
  3. In the EDIT NUMBERS window, select PHLO from the APP TYPE list.
  4. From the PHLO list, select the PHLO you wish to use with the phone number, and then click UPDATE.

You can now call or send an SMS, depending on the type of PHLO, to your phone number to test your PHLO.

If you have not purchased a phone number yet, you must buy a number to use with your PHLO.

To buy a phone number

  1. On the Numbers page, click Buy New Number.
  2. On the Search & Buy Phone Numbers page, search for available Phone Numbers based on your location, and then click Buy Number against the phone number that you wish to purchase.

Once you have completed the purchase, follow the instructions in the section above to assign the PHLO to your Phone Number.

Triggering a PHLO using an API Request

Once you have created and configured your PHLO, copy the PHLO Run URL. You can integrate a PHLO into your application workflow by making an API request to the PHLO URL with the required payload.

You can find the PHLO Run URLs on the PHLO Listing page.

You can download the latest Python SDK from here.

Code Samples

            
import plivo

auth_id = 'Your AUTH ID'
auth_token = 'Your AUTH Token'
phlo_uuid = 'Your PHLO UUID' # https://console.plivo.com/phlo/list/ 
phlo_client = plivo.phlo.RestClient(auth_id=auth_id, auth_token=auth_token)
phlo = phlo_client.phlo.get(phlo_uuid)
phlo.run()
            
          
            
curl -i --user AUTH_ID:AUTH_TOKEN \  
  https://phlorunner.plivo.com/v1/account/MAMTK2MGFHNTVINWQYZT/phlo/Your_PHLO_UUID \
  -H 'cache-control: no-cache'
            
          

Components Library

Below is the list of all PHLO components and their respective default variables:

Start

PHLO starts executing from this node. Every PHLO has only one start node. Voice PHLOs have Incoming Voice and HTTP Request states, while SMS PHLO’s have Incoming SMS and HTTP Request states.

Configuration Parameters

  • Key
  • Value

Options:

  • HTTP Request Payload Payload should be a key-value pair. In the bulk edit mode, only a valid JSON accepted.

States:

Start component is set to Incoming Call state on receiving a call to a phone number/endpoint attached to a PHLO. The Incoming SMS state is set on receiving an SMS to a phone number attached to a PHLO, and a HTTP Request to the PHLO URL will set the HTTP Request state.

Variables:

request_type

Request type is set to call for an incoming call, sms for an incoming SMS, http for an HTTP request.

The below variables are set when an incoming call triggers a PHLO.

  • call.uuid UUID of the incoming call
  • call.to Phone number or SIP endpoint to which the call is made. Generally, it is the SIP endpoint / phone number which triggered the PHLO.
  • call.from Phone number or SIP endpoint from which the call is made
  • call.start_time Time when the call started
  • call.answer_time UTC time when the call is answered
  • call.end_time UTC time when the call ended
  • call.direction The direction of the call is set to inbound
  • call.to_iso2 ISO2 code of the country to which the to phone number belongs
  • call.from_iso2 ISO2 code of the country to which the from phone number belongs
  • call.to_country Country to which the to phone number belongs
  • call.from_country Country to which the from phone number belongs
  • call.leg The leg for the inbound call is set to ALeg
  • call.hangup_cause Code of Hangup cause corresponding to the reason for the hangup.
  • call.duration Duration (in seconds) of the call since the dial
  • call.bill_duration Duration (in seconds) of the call that is billed
  • call.bill_rate Unit rate applicable for the call
  • call.bill_amount Amount billed for the call.

The below variables are set when an incoming SMS triggers a PHLO.

  • sms.message_uuid UUID of the incoming SMS
  • sms.time UTC time when the message is received
  • sms.direction Direction of the SMS is set to inbound
  • sms.status Status is set to received
  • sms.to Phone number to which the SMS is sent
  • sms.from Phone number from which the SMS is sent
  • sms.to_iso2 ISO2 code of the country to which the to phone number belongs
  • sms.from_iso2 ISO2 code of the country to which the from phone number belongs
  • sms.to_country Country to which the to phone number belongs
  • sms.from_country Country to which the from phone number belongs
  • sms.msg The content of the SMS that is received
  • sms.units The number of SMS required to send the message
  • sms.total_rate Unit rate applicable for the SMS
  • sms.total_amount Amount billed for the SMS.

The below variables are set when a HTTP Request triggers a PHLO.

  • http.uuid Unique identifier for the API request
  • http.params Payload sent in the API Request. The keys present in the payload can be configured in the child nodes.

Send SMS

The Send SMS component sends an SMS to users. Configuration Parameters

  • From
  • To
  • Message
  • Settings

Options:

  • From (required) Sender Id to display to the recipient of the SMS
  • To (required) List of phone numbers to send the SMS
  • Message The text message that will be sent. By default, the text are logged by Plivo. Deselect the log message content option, to change the logging behaviour.

States:

Send SMS component is set to Sent state, when an SMS is sent. If the status is failed, undelivered, rejected, the component is to Failed state.

Variables:

  • message_uuid Unique identifier for the SMS
  • from Phone number from which the SMS is sent
  • to Phone number to which the SMS is sent
  • to.iso2 ISO2 code of the country to which the to phone number belongs
  • from.iso2 ISO2 code of the country to which the from phone number belongs
  • to_country Country to which the to phone number belongs
  • from_country Country to which the from phone number belongs
  • msg The content of the SMS to be sent
  • units The number of SMS required to send the message
  • total_rate Unit rate applicable for the SMS
  • total_amount Amount billed for the SMS.
  • direction Direction of the SMS is set to outbound
  • status Delivery status of the SMS. Possible Values are queued, sent, failed, delivered, undelivered or `rejected.
  • error_code Delivery response code returned by the carrier attempting the SMS delivery. Possible error codes are available here.

IVR Menu

The IVR Menu component receives input on an ongoing-call and branches the execution by evaluating the input. Optionally, it can play a message before receiving the input.

Configuration Parameters

  • Allowed Choices
  • IVR Menu

Options:

  • Prompts List of messages to be played on the call. Speak Text and Play Audio are the types of messages. In a Speak Text message, the message to speak, language and voice can be configured. In a Play Audio message, a url to an audio or an audio file can be configured.
  • Input Allowed Choices is the list of choices that the IVR menu can accept. The choices are limited to 0-9 digits, #, *. Input Timeout is the time (in seconds) within which a user should start giving an input. Default value is 5 seconds. By default, the message played will be interrupted when an input is entered. Deselect the Interrupt Audio on Input option to play the complete message before the accepting the input. States A new state (with the choice as the name) is added to the node for each choice selected in Allowed Choices. No Input and Wrong Input states present by default. No Input is set when an input is not provided within the input timeout. Wrong Input is set when the provided input is not in allowed choices.

Variables:

  • digits Input entered by user.
  • input_type Input type is set to digits.

Get Input

The Get Input component can receive input from a user on an ongoing-call. Optionally, it can play a message before receiving the input.

Configuration Parameters

  • Speak Text
  • Settings

Options

  • Prompt Message to play on the call. Speak Text and Play Audio are the types of messages. In a Speak Text message, the message to speak, language and voice can be configured. In a Play Audio message, a url to an audio or an audio file can be configured.

  • Input Max Input Size is the maximum number of digits that a user can input. Any additional input entered would be ignored. Default value is 99. Input Timeout is the time (in seconds) within which a user should start giving an input. If multiple digits are accepted, the timeout between entering consecutive digits is set to Input Timeout. Default value is 5 seconds.

States: The component is set to Successful Input state when an input is entered. If input is not provided within the input timeout, No Input state is set.

Variables:

  • input Input entered by user.
  • input_type Input type is set to digits.

Initiate Call

The Initiate call component makes a single call or bulk outbound calls to Phone numbers or SIP endpoints.

Configuration Parameters

  • From
  • To
  • Settings
  • Events

Options:

  • From (required) Caller Id to display to the recipient of the call.
  • To (required) List of phone numbers and SIP endpoints that need to be dialled.
  • Call Settings Ring timeout is the time period (in seconds) for which an unanswered call should ring before hanging up. Extra headers can be configured to be sent with all the requests made by Plivo

States: Component is set to Answered state. The other states are No Answer, Busy/Rejected and Failed. When a machine detected, the component is set to Voicemail state.

Variables:

  • uuid Unique identifier for the outbound call
  • to Phone numbers or SIP endpoints to call
  • from Caller Id to set on the call
  • start_time Time when the call started
  • answer_time UTC time when the call is answered
  • end_time UTC time when the call ended
  • direction Direction of the call is set to outbound
  • from_iso2 ISO2 code of the country to which the phone number belongs
  • from_country Country to which the phone number belongs
  • leg The leg of the forwarded call is set to ALeg
  • hangup_cause Code of Hangup cause corresponding to the reason for the hangup.
  • duration Duration (in seconds) of the call since the dial
  • bill_duration Duration (in seconds) of the call that is billed
  • bill_rate Rate per unit applicable for the call
  • bill_amount Amount billed for the call
  • ring_status Set to True if the call rings. Allowed Values : True, False
  • voicemail_detected Set to ‘true’ if machine is detected in the call
  • call_status Status of the call. Possible values are ‘in-progress’

Call Forward

The Call Forward component bridges a phone number or SIP endpoint into an active call.

Configuration Parameters

  • From
  • To
  • General Options

Options:

  • From (required) Caller Id to display to the recipient of the forwarded call.
  • To (required) List of recipients to bridge into the active call. The list can contain phone numbers and SIP endpoints each separated by a comma. Based on the forwarding option selected, the recipients are sequentially or simultaneously dialled. The extension configured will be dialled when the call is answered.
  • Ring Timeout Time limit (in seconds) for the recipient to answer the call. The Failed state is triggered when the time limit is reached. Default value is set to 30 seconds.
  • Forwarding Options Forwarding option is applicable when multiple call recipients are provided. The sequence option dials one recipient at a time and tries the next recipient once the Ring Timeout limit is reached. The parallel option dials all recipients simultaneously and the first call that connects will cancel all the other tries. The same ring timeout is applied to all the calls irrespective of the forwarding option selected.
  • Call Screening A message can be played before the recipient answers the call. The recipient should press the confirm key to accept the call.

States:

Call Forward component is set to Completed state when either party hangs up the call. Other states are No Answer, Busy/Rejected, Failed.

Variables:

  • uuid UUID of the forwarded call
  • to Phone number or SIP endpoint to which the call is forwarded
  • from Caller Id set on the forwarded call
  • start_time Time when the call started
  • answer_time UTC time when the call is answered
  • end_time UTC time when the call ended
  • direction The direction of the call is set to outbound
  • from_iso2 ISO2 code of the country to which the phone number belongs
  • from_country Country to which the phone number belongs
  • leg The leg of the forwarded call is set to BLeg
  • hangup_cause Code of Hangup cause corresponding to the reason for the hangup.
  • duration Duration (in seconds) of the call since the dial
  • bill_duration Duration (in seconds) of the call that is billed
  • bill_rate Rate per unit applicable for the call
  • bill_amount Amount billed for the call.
  • ring_status Set to True if the call rings. Allowed Values : True, False
  • parent_call_uuid UUID of the parent call that is forwarded
  • dial_status Status of the call. Allowed values: completed, busy, failed, timeout or no-answer.

Hangup

The Hangup component hangs up the current active call. Configuration Parameters

  • Hangup Reason

Options:

  • Reason Reason for the call to be hung-up could be Rejected or Busy. States: After the call is hung-up, the component is set to Hangup Complete

Conference

The Conference Bridge component allows multiple parties to dial into a single call.

Configuration Parameters

  • Conference ID
  • Announcement Message
  • Hold Music
  • Settings
  • Events

Options:

  • conference_name (required) Name of the Conference bridge.
  • Announcement Message to be played when a dialler is added into the conference. Speak Text and Play Audio are the types of messages. In a Speak Text message, the message to speak, language and voice can be configured. In a Play Audio message, a URL to an audio or an audio file can be configured.
  • Waiting Callers Music can be played to users waiting for a conference to start. A URL to the audio or an audio file can be configured to be played until the moderator joins the conference
  • Miscellaneous When a new caller is added/removed from the conference, a beep or double beep can be played to all the callers on the conference. Diallers can be muted when joining a conference.

States: Conference Bridge component is set to Completed state when there are no callers on the conference bridge. The Failed state is set when an error occurs.

Variables:

  • from Phone number or SIP endpoint from which the call is made
  • direction Direction of the call can be set to outbound or inbound.
  • caller_name Name of the caller. Defaults to the from phone number or SIP endpoint.
  • to Phone number or SIP endpoint to which the call is made.
  • event Latest triggered event in the component. Can take the values ConferenceEnter, ConferenceExit, Redirect.
  • bill_rate Unit rate applicable for the call
  • call_status Status of the call. Possible values are ‘in-progress’
  • conference_name Name of the Conference bridge.
  • call_uuid UUID of the incoming call
  • conference_uuid UUID of the conference
  • member_id ID of a member in a conference. A unique ID is assigned to each member in a conference.
  • to_iso2 ISO2 code of the country to which the to phone number belongs
  • from_iso2 ISO2 code of the country to which the from phone number belongs
  • to_country Country to which the to phone number belongs
  • from_country Country to which the from phone number belongs

Play Audio

The Play Audio component plays a message on an ongoing-call.

Configuration Parameters

  • Speak Text
  • Settings

Options:

  • Prompts List of messages to be played on the call. Speak Text and Play Audio are the types of messages. In a Speak Text message, the message to speak, language and voice can be configured. In a Play Audio message, a url to an audio or an audio file can be configured.

States:

The component is set to Prompt completed after the messages are played on the call.

Record Audio

The Record Audio component records a message from the caller. Optionally, it can play a message before recording the message.

Configuration Parameters

  • Speak Text

Options:

  • Prompt Message to play on the call. Speak Text and Play Audio are the types of messages. In a Speak Text message, the message to speak, language and voice can be configured. In a Play Audio message, a url to an audio or an audio file can be configured.

  • Record By default, a beep is played along with the message before the recording is initiated. Deselect the Play beep after audio option to disable it.

States:

The component is set to Recording completed after the message is recorded.

Variables:

  • call_uuid UUID of the incoming call.

  • recording_url URL of the recording.

  • recording_uuid Identifier for the recording.

  • recording_duration Duration (in milliseconds) of the recording.

  • recording_start_time Time (Unix timestamp) when the recording started.

  • recording_end_time Time (Unix timestamp) when the recording ended.

Multi-Party Call

The Multi-Party Call component allows multiple users to dial-in to a single call.

Configuration Parameters

  • From
  • To
  • Recording Options
  • Hold Music Configuration
  • Transfers
  • Roles

Options:

  • conference_name (required) Name of the Conference bridge.

  • Announcement Message to be played when a dialler is added into the conference. Speak Text and Play Audio are the types of messages. In a Speak Text message, the message to speak, language and voice can be configured. In a Play Audio message, a URL to an audio or an audio file can be configured.

  • Waiting Callers Music can be played to users waiting for a conference to start. A URL to the audio or an audio file can be configured to be played until the moderator joins the conference

  • Miscellaneous When a new caller is added/removed from the conference, a beep or double beep can be played to all the callers on the conference. Diallers can be muted when joining a conference.

States:

Conference Bridge component is set to Completed state when there are no callers on the conference bridge. The Failed state is set when an error occurs.

Variables:

  • from Phone number or SIP endpoint from which the call is made

  • direction Direction of the call can be set to outbound or inbound.

  • caller_name Name of the caller. Defaults to the from phone number or SIP endpoint.

  • to Phone number or SIP endpoint to which the call is made.

  • event Latest triggered event in the component. Can take the values ConferenceEnter, ConferenceExit, Redirect.

  • bill_rate Unit rate applicable for the call

  • call_status Status of the call. Possible values are ‘in-progress’

  • conference_name Name of the Conference bridge.

  • call_uuid UUID of the incoming call

  • conference_uuid UUID of the conference

  • member_id ID of a member in a conference. A unique ID is assigned to each member in a conference.

  • to_iso2 ISO2 code of the country to which the to phone number belongs

  • from_iso2 ISO2 code of the country to which the from phone number belongs

  • to_country Country to which the to phone number belongs

  • from_country Country to which the from phone number belongs

Multi-Party Call - Triggers

Multi-Party Call component allows multiple users to dial-in to a single call. You have complete control over the call. Based on triggers, you can choose a specific action for each user on the call. Following are the types of Triggers:

  • Call
  • Hold
  • Transfer
  • Hangup

Call

With the Call trigger, you can use a phone number or a SIP endpoint to make a call. Once the call is received, you and the receiver will be added to a conference call.

SDK method & Usage

Python

phlo(phlo_id).multi_party_call(node_id).call(trigger_source, to, role)

Hold

You can use the Hold trigger to place the caller on hold. A customer-hold-music will be played while the caller is on hold. Once you end the hold, the customer-hold-music will be stopped and the caller will return back to the conference call.

SDK method & Usage

Python

  • Hold

phlo(phlo_id).multi_party_call(node_id).member(member_address).hold()

  • Resume

phlo(phlo_id).multi_party_call(node_id).member(member_address).unhold()

Transfer

You can use the Transfer trigger to perform either a warm or cold transfer. In a warm transfer, the caller will be placed on hold while you connect to another agent. Once both of you are connected, the caller will be taken off the hold and will join the conference call with you and the other agent.

In cold transfer, the customer will be placed on hold while you connect to another agent. Once the other agent connects to the call, the customer will be taken off the hold and will join the call with the other agent. Your call will hangup.

SDK method & Usage

Python

phlo(phlo_id).multi_party_call(node_id).warm_transfer(trigger_source, to)

Hangup You can use the hangup trigger to disconnect yourself, the customer, or any other agent from the call.

SDK Method

Python

Agent 1

phlo(phlo_id).multi_party_call(node_id).member(agent1_address).hangup()

Agent 2

phlo(phlo_id).multi_party_call(node_id).member(agent2_address).hangup()

Customer

phlo(phlo_id).multi_party_call(node_id).member(customer_address).hangup()

HTTP Request

The HTTP Request component makes requests to APIs. Optionally, the data returned by the API can in the child nodes connected to it.

Options:

  • Request Request URL and HTTP method are mandatory. HTTP methods supported are GET, POST, PUT, DELETE.

Headers, Auth, Params and Body are key-value pairs, with an option to bulk edit. Bulk edit mode accepts only a JSON.

Authorization mechanisms can be configured in the Auth tab. Basic Auth is the only mechanism that is supported currently and it accepts Username and Password parameters.

Params are added as query string in the request URL. Ex: Params {“key1”:”value1”, “key2”:”value2”} are added to the request URL as http://example.com/path/to/resource?key1=value1&key2=value2

Body is applicable only for POST, PUT, DELETE methods. The content types form-data, x-www-form-urlencoded and application/json are supported for body.

  • Response On clicking Fetch Response, an API request is made to fetch the response and the content type & response are stored. When response_type is is application/JSON, the keys in the response are available to configure in the child nodes.

States: HTTP Request Component is set to Success when a HTTP response code between 200 and 300 is returned. Else, the state is set to Failed.

Variables:

  • content_type Content type of the response from the API. For application/jsoncontent, the data/keys in the response are available to configure in the child nodes.

  • status_code HTTP status code returned by the API. Additionally it is set to 400 when the content_type does not match the response type, or when all keys in response format (for an application/jsoncontent) are not present in the response .

  • response Response returned by the API. For application/jsoncontent, the data/keys in the response are available to configure in the child nodes.

Counter

Use the Counter component to branch the flow based on the number of executions. The counter increments with every encounter of the counter node.

Options:

  • Max Count (required) Maximum number of the times the counter can be executed.

States: Counter component is set to Count Reached state when the component is executed Max Count number of times. Else, it is set to Count Not Reached state.

Branch

The Branch splits a workflow by comparing a variable with different values. Based on the conditions, The execution branches into different workflows.

Configuration Parameters

  • Variable to compare
  • Condition

Options:

  • lhs (required) The variable based on which the PHLO should branch on.
  • conditions A list of different conditions to apply on the lhs
  • alias (required) Alias for the condition
  • operation (required) Operation to be performed on the lhs and rhs
  • rhs (required) Value to compare the lhs with

States:

For each condition configured, a state with the condition’s alias is added to the node. Based on the condition that is met, the component is set to the corresponding state. The No Match state is available by default, and is set when none of the conditions are met.