Set up a webhook for the Plivo spoke

  • Release version: Washingtondc
  • Updated February 1, 2024
  • 2 minutes to read
  • 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
    • 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

    1. Navigate to All > Plivo Spoke > Plivo Webhook Registries.
    2. Click New.
    3. On the form, fill in the fields.
      Table 1. Plivo Webhook Registry form
      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.
    4. Right-click the form header and click Save.
    5. Click Callback URL.
      The system displays the webhook callback URL.
    6. 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 yourPlivo account to create a webhook.

    Before you begin

    Role required: sn_plivo_spoke.Plivo_Admin and decision_table_admin

    Procedure

    1. Log in to your Plivo console.
    2. 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.
    3. 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

    1. Navigate to All > Flow Designer > Designer.
    2. Click Subflows.
    3. 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.
    4. 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.
    5. Navigate to Plivo Spoke > Plivo WebHook Routing Policy.
    6. Click New.
    7. On the form, fill in the fields.
      Table 2. Decision form
      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 (Lookup icon).
      2. Select the required subflow from the Document list.
        Note:
        Ensure that the Table name is Flow [sys_hub_flow].
      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
    8. 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.