> For the complete documentation index, see [llms.txt](https://docs.storylane.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.storylane.io/repx-chat/integrations/webhooks.md).

# Webhooks

### **Setting up webhooks**

* Click on the **Integrations** tab in [RepX dashboard](https://app.storylane.io/repx-dashboard/integrations).
* Paste in the webhook which needs to be hit, here.
* Click 'Send test webhook' to receive a test event with a sample payload from your conversations.&#x20;
* Confirm that the webhook payload is received on your end and hits the systems you expect it to hit.

RepX sends a `POST` request to the URL you configure every time a conversation completes. The payload is described below.

#### **The RepX conversation completed event**

The `repx_conversation_completed` event fires once for every conversation, as soon as that conversation is complete and RepX has finished processing it. There is one event per conversation - it isn't fired again if the same visitor returns and starts a new conversation, that produces its own event.

#### **What the event contains**

<table><thead><tr><th width="215.234375">Field</th><th width="128.86328125">Data Type</th><th>Description</th></tr></thead><tbody><tr><td><code>id</code></td><td>String</td><td>Unique identifier for the conversation</td></tr><tr><td><code>event</code></td><td>String</td><td>Always <code>repx_conversation_completed</code></td></tr><tr><td><code>transcript</code></td><td>String</td><td>The full conversation, message by message, including whether it happened in text or voice mode</td></tr><tr><td><code>conversation_summary</code></td><td>String</td><td>A short AI-generated summary of what the conversation covered</td></tr><tr><td><code>topics</code></td><td>Array</td><td>The topics discussed during the conversation</td></tr><tr><td><code>intent_level</code></td><td>String</td><td>Buying intent calculated for the conversation - <code>high</code>, <code>medium</code> or <code>low</code></td></tr><tr><td><code>extracted_variables</code></td><td>Object</td><td>All <a href="/pages/PJ5RkUAeKa4GZ2hfSWzf">conversation signals</a> extracted from the conversation - both default and custom</td></tr><tr><td><code>duration</code></td><td>Number</td><td>Length of the conversation, in seconds</td></tr><tr><td><code>message_count</code></td><td>Number</td><td>Number of messages exchanged in the conversation</td></tr><tr><td><code>started_at</code></td><td>String</td><td>Timestamp of when the conversation began, in ISO 8601</td></tr><tr><td><code>completed_at</code></td><td>String</td><td>Timestamp of when the conversation completed, in ISO 8601</td></tr><tr><td><code>cta_opened</code></td><td>String</td><td>The CTA URL the visitor clicked during the conversation, if any</td></tr><tr><td><code>lead</code></td><td>Object</td><td>Lead details - <code>id</code>, <code>email</code>, <code>first_name</code>, <code>last_name</code>, <code>lead_source</code>, <code>client_source</code> and <code>client_tracking_id</code></td></tr><tr><td><code>buyer_reveal</code></td><td>Object</td><td>Company details resolved from the visitor's IP or email - name, domain, revenue range, employee range and a confidence score</td></tr><tr><td><code>location</code></td><td>Object</td><td>The visitor's <code>country</code>, <code>city</code> and <code>state</code></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

{% hint style="info" %}
`extracted_variables` always contains the four default signals - `email`, `visitor_name`, `phone_number` and `qualified`. See Conversation signals for how to set them up.
{% endhint %}

#### Sample payload:

```
{
  "id": "2f37f8ce-6ecb-49a2-be12-36ae9c063042",
  "event": "repx_conversation_completed",
  "buyer_reveal": {
    "company_name": "Acme Inc",
    "company_domain": "example.com",
    "company_annual_revenue_range": "1M-10M",
    "company_employee_range": "11-50",
    "confidence_score": "high"
  },
  "lead": {
    "id": "f3694255-aed4-4514-8ce6-ac55506a67fe",
    "client_source": "none",
    "client_tracking_id": null,
    "email": "john.doe@example.com",
    "first_name": "John",
    "last_name": "Doe",
    "lead_source": "Direct"
  },
  "intent_level": "high",
  "conversation_summary": "The user asked about pricing and integrations while planning a migration, and the assistant shared a calendar link to book a live demo.",
  "topics": ["Pricing", "Integrations", "Customer Onboarding"],
  "duration": 90,
  "messages_count": 3,
  "extracted_variables": {
    "email": "john.doe@example.com",
    "visitor_name": "John Doe",
    "phone_number": "+1-555-0100",
    "qualified": true
  },
  "transcript": "[text mode]\n\nAssistant: Hi, how can I help you today?\n\nUser: I want to see a demo.\n\nAssistant: Are you a new customer?\n\nUser: Yes, we're planning a migration soon.\n\nAssistant: Got it. What's your work email?\n\nUser: john.doe@example.com\n\nAssistant: Thanks, John. Pick a time on the calendar to book a live demo.",
  "started_at": "2026-07-22T10:54:05.337+00:00",
  "completed_at": "2026-07-22T10:55:35.337+00:00",
  "cta_opened": "https://example.com",
  "location": {
    "country": "United States",
    "city": "Miami",
    "state": "FL"
  }
}
```

Implementation examples in Node.js, Ruby and Python are available on the [Webhooks](https://docs.storylane.io/integrations/integrations-and-data-flow/webhooks) page.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.storylane.io/repx-chat/integrations/webhooks.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
