Trigger Flow using Webhook and Voice Call

Kaleyra’s flow builder facilitates inbound and outbound calling capabilities for incoming and outgoing voice calls.

The flow can be triggered by enabling:

Trigger Flow using Webhook

You can use webhook to trigger flow one-way (such as SMS, API, and other offline widgets where customers are not required to be on the other side of the call to respond immediately similar to a voice call). Webhook can be enabled from the Start widget and a webhook URL is generated post flow publish which has to be used to trigger the flow. Use the generated URL to trigger the flow which will execute all the widgets inside.

📘

Note:

Flows triggered using Webhook execute only the offline widgets (that is SMS, API, Jump, and, Date and time widgets). All the other widgets in the flow will be skipped.

The flow can be triggered using Webhook in two steps:

  1. Generating the Webhook URL through Kaleyra.
  2. Triggering Flow using Webhook URL through HTTP Call.

Generate Webhook URL

To create a flow and generate a Webhook URL, perform the following steps:

  1. Follow steps 1 and 2 of the Widget Library page.
  2. Click the Start widget.
    The Start widget appears.
243
  1. Enable Webhook.
  2. Click Save.
  3. Drag and drop the other required widgets from the Widget Library to complete the flow.
    Sample flow with all the widgets:
1325
  1. Click Publish.
    The Webhook URL appears.
1366
  1. Click the Copy icon to copy the webhook URL and then click Okay to publish the flow.

📘

Note:

You have the option to copy the Webhook URL from the Flowbuilder listing page in the Existing Flows section.

Trigger Flow using Webhook URL

To trigger flow using the generated Webhook URL using HTTP or API Call, perform the following steps:

  1. Open any platform for building and using APIs or HTTP Calls.
  2. In the method type, select POST.
  3. In the Request URL field, paste the Webhook URL copied from the flow.
  4. In Headers, enter api-key in the parameter field and then enter the API key value. For more information on how to generate an API key, see Create Kaleyra.io API key.
  5. Click Send.

📘

Note:

You can view the trigger flow logs in the Logs tab. For more information see Logs.

Trigger Flow using Voice Call

You can trigger the flow using a Voice call through an active subscribed number. Voice call can be enabled from the Start widget and an active subscribed number has to be assigned to trigger the flow. When customers make a call to the configured number, the flow is triggered and all the widgets configured inside the flow get executed.

📘

Note:

Flows triggered using Voice Call will execute all the widgets.

To trigger a flow using the voice call, perform the following steps:

  1. Follow steps 1 and 2 of the Widget Library page.
  2. Click the Start widget.
    The Start widget appears.
243
  1. Enable Voice Call.
  2. Select a number you wish Customers will reach out to you on the number configured here..

📘

Note:

Your account have an active subscribed number to enable voice call. For more information, see Numbers.

  1. Click Save.
  2. Drag and drop the other required widgets from the Widget Library to complete the flow.
    Sample flow with all the widgets:
1325
  1. Click Publish. Any incoming call made to the configured number will land on to the published flow.

📘

Notes:

  • A number can be used in a single flow at a time. In case, if you wish to use the same number in another flow, then select the number in another flow which will automatically delink it from the previous flow.
  • You can also view the advanced features available in the Start widget. To see how these advanced features work, navigate to Start.
  • You can view the flow logs in the Logs tab. For more information see Flow Builder Logs.