Back to Help Home
Settings & Configuration

Custom actions (webhook, URL, JavaScript)

4 minutes read time Difficulty: advanced

Custom actions

Create custom buttons that agents can click during conversations to trigger external actions.

What are custom actions?

Custom actions are buttons that appear in the chat interface. When clicked, they:

  • Call a webhook URL with conversation context
  • Open an external URL (e.g., CRM record)
  • Execute a JavaScript snippet

Creating a custom action

  1. Go to Settings → Custom Actions
  2. Click "New Action"
  3. Configure:
    • Name — Button label (e.g., "Open in CRM", "Create Ticket")
    • Icon — Choose an icon
    • Type — Webhook, URL, or JavaScript
    • Configuration — Type-specific settings

Action types

Webhook

Sends a POST request to your URL with conversation data:

{
  "contact_id": "uuid",
  "contact_phone": "+919876543210",
  "contact_name": "John Doe",
  "agent_id": "uuid",
  "agent_name": "Agent Smith"
}

URL

Opens a URL in a new tab. Supports variables:

https://crm.example.com/contacts?phone={phone}&name={name}

JavaScript

Executes a JS snippet in a sandboxed VM:

// Example: Copy contact phone to clipboard
navigator.clipboard.writeText(contact.phone_number);

Where actions appear

Custom action buttons appear in the chat header toolbar, available to agents during conversations.

Tips

  1. Keep it simple — One action per button
  2. Use webhooks for automation — Create tickets, update CRM, trigger workflows
  3. Use URLs for navigation — Open related records in other tools
  4. Test thoroughly — Verify the action works before enabling for the team

Was this guide helpful?

Your feedback helps us make these guides better for everyone.