Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Go to Haptik Website
  • Contact Us
  • Home

What is a Webhook? How does a Webhook work?

Written by Soham Amburle

Updated on December 7th, 2022

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Getting Started
    Build Deploy Analyse Manage Account Bot Deactivation
  • Bot Building
    Essentials Smart Skills Steps User Messages Bot Responses Entities Connections Customisations User feedback collection Testing Whatsapp Bots NLU Bot Maintenance
  • Smart Agent Chat
    Set up Admin Settings MyChats Section (Agent Inbox) Live Traffic Section Teams Section Archives Section Analytics Plans on Smart Agent Chat
  • Conversation Design
    Design Basics Design Guides Designing for Platforms Designing WhatsApp Bots
  • Developer Guides
    Code Step Integration Static Step Integration Shopify Integration SETU Integration Exotel Integration CIBIL integration Freshdesk KMS Integration PayU Integration Zendesk Guide Integration Twilio Integration Razorpay Integration LeadSquared Integration USU(Unymira) Integration Helo(VivaConnect) Integration Salesforce KMS Integration Stripe Integration PayPal Integration CleverTap Integration Fynd Integration HubSpot Integration Magento Integration WooCommerce Integration Microsoft Dynamics 365 Integration
  • Deployment
    Web SDK WhatsApp Facebook Instagram Sunshine Conversation LINE Google Business Messages Telegram MS Teams Bot as an API iOS SDK Android SDK
  • External Agent Tool Setup
    Zendesk Chat Salesforce Service Cloud Freshchat Zoho NICE CXOne Gorgias
  • Analytics & Reporting
    Intelligent Analytics
  • Notifications
    SMS Notifications Success Measurement
  • Commerce Plus
    Catalog Integration Bot Building Guide Channel Deployments Unified ML Pipeline Documentation
  • Troubleshooting Guides
    Error Messages FAQs
  • Release Notes
+ More

Table of Contents

Webhook Working of Webhook

Webhook

A Webhook is an API concept that is growing in popularity. Whatever we do on the web, can be described as an Event. A Webhook (also called a web callback or HTTP push API) is a way for an app to provide other applications with real-time information. A Webhook delivers data to other applications as it happens, meaning you get the data immediately. Unlike typical APIs where you would need to check for the data very frequently in order to get it real-time. This makes webhooks much more efficient.

Working of Webhook

Let us understand the working of a Webhook, with the help of this flow shown below.

Here, as we can see, there is a online pet store, that has information about all the animals that are available in the store as pets. 

Following are the series of events that happen - 

  1. A buyer comes to the online pet store and he wants to buy a dog. He goes through the catalog, selects a dog, and proceeds to pay.
  2. A request is been sent to the payment gateway that is integrated with the online pet store. This payment gateway handles all the payment-related technicalities. 
  3. Payment gateway sends all the details to the buyer, related to payment. 
  4. The buyer makes the payment and the same is notified to the payment gateway.
  5. The owner contacts the buyer after receiving the notification of successful payment being made by the buyer. 

In this scenario, every event that has occurred in this transaction was sent as a notification to the owner, and the owner responded only when he received the final notification which was "Payment done successfully by the buyer".

This is how Webhook works, by sending real-time information of the events as they occur.

In general, Haptik uses the following Webhook events:

  1. A new event when an agent completes a chat (ex: webhook_agent_chat_complete)
  2. Sending a new event with 8 min of inactivity (ex: webhook_conversation_complete_partial)

Payload of these two events is as follows:

{
  "version":
  "timestamp":
  "business_id":
  "business_name":
  "event_name": "webhook_agent_chat_close/webhook_conversation_complete_partial", 
  "user": {
    "auth_id":
    "device_platform":
    "device_platform_name":
    "user_name":
    "user_id":
    "phone_model":
    "os_version":
    "package_name":
  },
  "agent": {
    "name":
    "username":
    "profile_image":
    "id":
    "email":
    "is_automated":
  },
  "data": {
    "collection_id":
    "conversation_no":
    "conversation_identifier":
    "chat_link":
    "complete_chat_link":
    "closing_categories": (Only if this exists)
  }
}

 Kindly reach your Haptik SPOC if you have any queries regarding webhook events of Haptik.

Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

  • What are Chat Elements?
  • How will agents take chats?
  • How to Create & Manage Teams
  • How to ensure Zendesk Chat integration is working properly?
  • How to Set Up CleverTap Integration

Platform

  • Conversation Studio
  • Smart Skills
  • Advanced NLU
  • Intelligent Analytics
  • Omnichannel
  • Smart Agent Chat
  • Enterprise Security
  • Integrations

Solutions

  • Conversational Commerce
  • Lead Generation
  • Customer Care
  • WhatsApp
  • Conversational IVR
  • Google Business Messages

Industries

  • Retail/ E-Commerce
  • Financial Services
  • Travel & Hospitality
  • Telecom

Knowledge

  • ROI Calculator
  • Reports & Research
  • Case Studies
  • Webinars
  • ISAT
  • Tech Blog
  • Business Blog
  • Resources
  • Haptik v/s Yellow
  • Haptik v/s Liveperson
  • Haptik v/s IBM Watson
  • Haptik v/s Verloop
  • Conversations on AI

Company

  • Why Haptik
  • About Us
  • Careers
  • News & Media
  • Awards & Recognition
  • Contact Us
  • Partnerships
  • Investor Relations

Subscribe

Sign up to recieve the latest updates

Find us on

  • Twitter-footer
  • Linkedin-footer
  • YT-footer
  • Insta-footer
  • G2-footer
  • Facebook-footer

Knowledge Base Software powered by Helpjuice

Copyright © jio Haptik Technology Limited 2021 | Data Security & Privacy Policy | GDPR

North America | Asia Pacific | Africa | enterprise@haptik.ai

Definition by Author

0
0