Webhooks

Understand the information Rdentify sends to your specified endpoint via webhooks and how to utilise it effectively.


Overview

Webhooks in Rdentify are used to notify your system when an interaction with a customer is complete. This enables your application to react in real-time to the interaction. Each webhook is associated with a specific bot and will trigger for all interactions connected to that bot.


Webhook Payload

At the end of an interaction, Rdentify will make a POST request to your designated webhook URL. This POST request will contain details about the customer, the transcript of the interaction, and evaluation properties related to the bot. Below is an example payload:

{
  "customer_id": "123456789",
  "interaction_id": "437a1ee7-b569-ee11-b006-6045bdd13058",
  "evaluation": {
    "howfeel_scale": "5",
    "action": "Timeout"
  },
  "transcript": [
    {
      "body": "How do you feel about your behaviour?",
      "timestamp": "2023-10-13T10:47:29.2008091",
      "type": "bot"
    },
    {
      "body": "i feel fine",
      "timestamp": "2023-10-13T10:49:22.2008091",
      "type": "customer"
    }
  ]
}

Payload Properties

  • customer_id: The internal ID you use for the customer in your system.

  • interaction_id: A unique identifier for the interaction session.

  • evaluation: An object containing key-value pairs of evaluation properties and their corresponding values as set by the bot. Each bot as it’s only evaluation properties that can be provided by your account manager or accessed via the bot endpoint in the API

  • transcript: An array containing the full dialogue between the customer and the bot, along with timestamps.

Transcript

Each entry in the transcript array has:

  • body: The content of the message.

  • timestamp: A Unix timestamp marking when the message was sent.

  • type: Who sent the message, either ‘customer’ or ‘bot’.


Creating Webhooks

While the primary focus here is to understand the webhook payload, creating a webhook is generally done via the Rdentify Dashboard or directly through the API. For further details, refer to the API Reference.