Set up a bi-directional webhook for the Plivo spoke
Configure a webhook to subscribe to your Plivo account with a ServiceNow callback URL.
Before you begin
- Request Integration Hub subscription.
- Activate the Plivo spoke.
- Set up the Plivo spoke
- Role required: sn_plivo_spoke.Plivo_Admin and decision_table_admin.
Register a Plivo webhook in ServiceNow
Register a Plivo webhook in your ServiceNow instance to notify the ServiceNow app when certain events occur in Plivo.
Before you begin
Role required: sn_plivo_spoke.Plivo_Admin and decision_table_admin
Procedure
Navigate to All > Plivo Spoke > Plivo Webhook Registries.
Click New.
On the form, fill in the fields.
Field Description Name Unique name to identify the record. For example, Plivo webhook.Description Description of the record. Path Plivo webhook path. By default, this path is set to api/sn_plivo_spoke/plivo_webhook_handler/wh_entry.Right-click the form header and click Save.
Click Callback URL.
The system displays the webhook callback URL.
Copy and record the webhook callback URL.
Result
The Plivo webhook is registered in your ServiceNow instance.
Add a callback URL in Plivo
Provide a webhook callback URL in your Plivo account to create a webhook.
Before you begin
Role required: sn_plivo_spoke.Plivo_Admin and decision_table_admin
Procedure
Log in to your Plivo console.
Create an application in the Plivo console as per your requirement.
For more information about creating an application in the Plivo console, see the Create an Application section in the Make your first Outbound Call page of the Plivo documentation. You can also refer to the Plivo Application documentation for more information about creating and updating an application using Plivo APIs.
Enter the webhook callback URL in MESSAGE URL and ANSWER URL, and configure the application as per your requirement.
Result
The callback URL is added in your Plivo account. You can create routing policies and subflows as per your requirement. See Create routing policy and customize webhook for information regarding the creation of new routing policies and subflows.
Create routing policy and customize webhook
Create a webhook routing policy and subflow as per your requirement.
Before you begin
Role required: sn_plivo_spoke.Plivo_Admin and decision_table_admin
About this task
Routing policy in the Plivo WebHook Routing Policy module triggers the subflows and notifies the ServiceNow instance when certain events occur in your Plivo account. See Plivo Spoke for information about the fields that the routing policy and subflows support.
Procedure
Navigate to All > Flow Designer > Designer.
Click Subflows.
Create a copy of the default subflow.
Two subflows are available along with Plivo spoke; Plivo Call Handler and Plivo SMS Handler. You can create a copy of either of these subflows as per your requirement.
Customize the subflow as per your requirement and publish it.
See Building subflows for more information about creating and using subflows, and Plivo Spoke for information about the supported fields.
Navigate to Plivo Spoke > Plivo WebHook Routing Policy.
Click New.
On the form, fill in the fields.
| Field | Description |
|---|---|
| Label | Unique label to identify the routing policy. |
| Default answer | Option to specify if this is the default answer. The default answer is applicable when the conditions are not met.1. Click the lookup icon ( Image omitted: lookup-icon.png 2. Select the required subflow from the Document list. Lookup icon). Note: Ensure that the Table name is |
| Condition | Conditions to be met when the required events occur in Plivo. |
| Answer | Subflow that must be triggered when the specified conditions are met. |
Routing policies and subflows support these Plivo fields:
- Keywords
- Call Event
- Caller Name
- Event Type
- SMS Text
- To Number
- Show Related Fields
Click Submit.
Note: These routing policies are saved in the Decision tables. Users are cautioned against directly updating or modifying data in these tables.
Result
The routing policy and subflow are created.