ReplyCX Documentation
Login
  • ⛩️Welcome to ReplyCX Knowledge Base! 📚
    • ReplyCX Basics
  • ▶️GETTING STARTED
    • Building a Chatbot
    • Testing a Chatbot
    • Channel Configurations
    • Deploying a Chatbot
    • Utility Tools
  • 🧩ACTION BLOCKS
    • Overview
    • Trigger
    • Send Message
    • Collect Input
    • Buttons
    • Carousel
    • Calendar
    • Send an Email
    • Condition
    • Image Carousel
    • Human Handover
    • Slider
    • Collect File
    • Delay
    • Form
    • Flow
    • Code-block
    • Options
    • Jump
    • List
    • Reply Button
    • AI Model
    • SET AI
    • Answer AI
    • AI AGENT
    • Webhook
    • Javascript
    • Send Status
    • Http Request
    • Dynamic data
    • Whatsapp flow
  • 🦾AI Studio
    • Building a GPT Chatbot
    • Knowledge Base
    • Training on historical live chat to generate response
    • Retrain frequency for URL data source
    • Custom Answers
    • Function Call
    • Prompts
    • Tokens
    • Setting up retrain
    • Advanced Crawling Criteria
  • ⛓️Integrations
    • Types of Integrations
    • Service Call
    • Google Sheets
      • Support for “Update Record” in Google Sheets
    • Codeblock
    • Google Calendar
    • Calendly
    • Zoho CRM
    • Hubspot
    • Dialog Flow
    • Events
    • Google Analytics
    • Freshdesk
    • Salesforce
    • Zapier
    • Airtable
    • Public API's
  • 🟢WhatsApp Business API
    • Prerequisites
    • WhatsApp Business API - Meta
    • Using a test WhatsApp Business API account
    • Product catalog on WhatsApp
    • Sync WhatsApp Template
    • Support for Carousel template message
  • Instagram
    • Using the Instagram Channel
  • 💬Live Chat
    • Overview
    • Saved Replies
    • Manage Saved Replies
    • Message status on live chat
    • Generating Response Using AI.
    • Rewriting existing response with AI
    • Labels
    • Managing Labels
    • Qualification details covered during a conversation
    • Settings
    • Filter conversations
    • Conversation History
    • Close a conversation
    • Related / Past Conversations
    • Elements on conversation card
    • Kind of Conversation Status
    • Copy Chat Transcript of a Conversation
    • Customize Live Chat Screen
    • Restart Conversation
    • Blocking Contacts
    • Agent status on live chat
  • ⚙️Troubleshooting
    • Variable Manager
    • Fallback Variables
    • Human Handover Configuration
    • Clone a bot
    • Preffered Image Dimensions
    • Working of Link Tracking
    • Setting up variables using trigger block
    • Availability of agents in Human Handover
    • Creating loop in the conversational flow
    • Requesting Edit Access
    • Cookies
  • 📢Outbound Bots
    • Outbound Action Blocks
      • Delay
      • Send WhatsApp
      • Send SMS
      • Send Email
    • Building a One-Off Campaign
    • Building a Ongoing Campaign
    • Creating WhatsApp Templates
  • 📱Chat Widget Customization
    • Embedding Chat Widgets
    • Customize Chat Widget UI using CSS
    • Display Chat Widget in iFrame
    • Change Appearance
    • Chat widget 3.0
  • 🏦Account Management
    • Manage Teams
    • Manage Teammates
    • Manage Roles
      • Channel configuration Permission
    • Opt Out Management
  • 📊Reporting
    • Custom Reports
    • Contacts Feature Recap
    • Scheduling Contact Report
    • Weekly Reports and Interactions
    • Export a contact list
    • Tracking link clicks on chatbot messages
    • Agent Report
    • AI Agent Report
    • Outbound Report
  • 🧑‍💻 Support
    • Forget Password
Powered by GitBook
On this page

Was this helpful?

  1. ACTION BLOCKS

Webhook

Listens to events that occur on this event and proceeds to the next step in the flow.

PreviousAI AGENTNextJavascript

Last updated 2 months ago

Was this helpful?

A webhook listens for incoming events on a specified endpoint and triggers the next step in the workflow upon receiving relevant data.

Webhooks listen for events from third-party apps.

They are commonly used for tasks like payment collection, where the chatbot waits for a payment processor to notify it once the payment is received.

Endpoint:

Set this webhook endpoint in the application that will send the event.

When calling this endpoint, you must include the conversation_key in the response payload. If it’s missing, the system will not consider the response successful.

You can extract the conversation_key from the Conversation URL variable.

Before using the webhook block, add a JavaScript Action Block with the following code.

const conversation_url = "Conversation URL";

// Function to extract the conversation key from the URL

function getLastPartOfUrl(url) {

// Split the URL by slashes

const parts = url.split('/');

// Return the last part

return parts[parts.length - 1];

}

// Retrieve the conversation key from the URL

const conversation_key = getLastPartOfUrl(conversation_url);

// Sets the conversation key into a new variable

wn.setConversationVariable("conversation_key", conversation_key);

// This variable will be used to push the conversation_key to the third-party app.

Timeout:

The chat flow will wait for the webhook call for a set duration.

If the webhook is not triggered within this timeframe, the chat flow will continue through the FAILURE path.

Response:

When a webhook response is received, you can assign specific fields to variables for storage.

Set the duration between 1 and 300 seconds.

You can map a maximum of 50 variables.

🧩
ℹ️
ℹ️