Chat lead capture, webhooks, and action signals - #208
Merged
Conversation
# Conflicts: # tests/e2e/specs/dashboard.spec.js
Co-authored-by: HardeepAsrani <2649903+HardeepAsrani@users.noreply.github.com>
Co-authored-by: HardeepAsrani <2649903+HardeepAsrani@users.noreply.github.com>
Generate a persistent per-site token and send it as X-Site-Token so the platform can bind a free site's identity without a license key.
# Conflicts: # src/backend/screens/Dashboard.js # src/backend/style.scss # src/backend/utils.js Co-authored-by: HardeepAsrani <2649903+HardeepAsrani@users.noreply.github.com>
Soare-Robert-Daniel
approved these changes
Jul 20, 2026
Member
Author
|
@copilot resolve the merge conflicts in this pull request |
Co-authored-by: HardeepAsrani <2649903+HardeepAsrani@users.noreply.github.com>
Resolved the merge conflicts and pushed the merge-resolution commit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds lead capture and outgoing webhooks to the chat, and a generic "action signals" mechanism the chatbot uses to decide when to surface them. Closes https://github.com/Codeinwp/hyve/issues/168 and https://github.com/Codeinwp/hyve/issues/192.
Pro PR: https://github.com/Codeinwp/hyve/pull/268
Agent PR: https://github.com/Codeinwp/agents/pull/136
Everything here is a Pro feature. This plugin holds the widget-side pieces and the free-tier upsell shells; the functional/server code lives in the Hyve Pro PR (linked below). The platform-side change for Hyve Connect is in the agents PR (also linked).
What it does
Lead capture. Visitors can leave their details through a contact form inside the chat. Admins build the form field by field (label, type, required, reorder) and choose when it appears:
Submissions are stored on the site as leads, linked both ways to the conversation they came from, and the transcript shows a "Visitor submitted the contact form" marker at the point it happened. Admins review leads in a Leads tab under Messages (with CSV export), and a conversation that produced a lead is badged in the list.
Webhooks. Chat activity can be sent to any URL as JSON, as it happens: visitor messages, bot replies (with whether the question was answered), and actions (the contact form today, more later). Each request is signed with an HMAC
X-Hyve-Signatureheader, delivery is non-blocking so a slow endpoint never delays the chat, and admins pick which events to send so metered tools like Zapier only receive what they use. Payloads are raw JSON, so the settings copy notes that Slack incoming webhooks need Zapier/Make/n8n in between.Action signals. Rather than hardcoding "detect a contact request", the model is given a generic list of signals (a
typeand a plain-Englishdescription) and returns which apply. The widget maps each returned signal to an action it knows how to handle, and unknown ones are ignored. Adding a new action type later is a one-line change on the server; the widget and the platform don't need to change. The contact form is the first signal.How it's split
Manual QA
Needs an active Pro license. In Settings, Chat, Leads: turn on Collect leads and pick some triggers.
user_message/bot_message/actionarrive with the documented shape and a valid signature, and that submitting a form sends anactionevent with the full transcript.Unit tests cover the submission pipeline, webhook delivery and signing, the signal schema/mapping, and the threads lead badge.