You can now start using your Click-2-Calland OBD API to trigger Text-2-Speechmessages as well.
All you need to do is, configure the IVR flow and update the click2call API on the below formats:
API configuration:
Click-2-call:
On Click-2-Call API, the IVR id needs to be updated with the receiver parameter of the API, with the Format: ivr:id (Ex: receiver=ivr:1234). The ID of the IVR appears on the IVR Studio page.
The “Meta” parameter is mandatory.
The dynamic values have to be in JSON format inthe parameters.
API: https://api-voice.kaleyra.com/v1/?api_key=A2943763b1bdad7660XXXXXXXXXX80e3a&method=dial.click2call&caller=99XXXXX&receiver=ivr:1234&meta={“Parameter1Name”:” parameter1Value”,"Parameter2Name”:”parameter2Value”}
OBD:
In theOBD API, the IVR id needs to be added toon the play parameter of the API. Format: ivr:id (Ex: play=ivr:1234 or play=1234.ivr). The ID of the IVR appears on the IVR Studio page.
The “Meta” parameter is required.
The dynamic values have to be in JSON format the parameter.
API: https://obd.kaleyra.com/api/v1/?api_key=1234abc&method=voice.call&format=xml&numbers=phone_number&play=ivr:1234&meta={“Parameter1Name”:” parameter1Value”,"Parameter2Name”:”parameter2Value”}
IVR flow configuration:
To create your IVR flow for a call, follow the steps below:
From the main menu click on “IVR Studio” under Voice.
Click on the ‘+New’ button from the top right corner of the page. A pop-up window appears, enter the name of the IVR and click on ‘Save’.
The name of the IVR saved now appears in the IVR Studio page. Click on the Settings icon to create and edit your IVR flow. A fresh page opens with our functional IVR widgets that can be dragged and dropped as per your configuration needs
Choose a widget from the widget menu to decide what your call flow should begin with. In the example below, we’ve chosen to display “Play”, which opens an option to play a message to the caller for the values passed on the API.
To add the widget, drag it to the “Call Start” zone.
Add the Play widget and configure the static message which is required to place.
In case you need a dynamic value to be added, You will need to use the replaceable parameter on the play widget.
Parameter: {script:outbound:VARIABLE}
VARIABLE: The value passed on the API request
Example: Parameter passed on API is customername and value is David. ( meta={“customername”:”David”,”order_id”:”12345”} )
The parameter to be configured is {script:outbound:customername}.
the same process can be followed for multiple dynamic and static values addition to the IVR
Once the widgets are added to create a flow click on “Save”.
Special Operations
{script:outbound:variable} : Understands and accepts data similar plain text. This parameter vocalizes the script variable value.
{play:{script:outbound:variable}} : Streaming of a mp3/wav file from the parameter added on the JSON meta
{digit:{script:outbound:variable}} : vocalizing of the given number/ variable (X), digit by digit.