Zervice LogoZervice
User Guide

Business System Integrations (Webhooks, MCP & A2A)

Connect HTTP Webhooks, remote MCP servers, and A2A agents so your chatbots can query live customer data and run guarded actions with zero-knowledge Opaque Auth Passthrough.

Three Ways to Connect Your Business Systems

Static Q&A can answer what your documentation says, but real customers also ask questions about their own account ("Where is my shipment?" or "Cancel my upcoming renewal"). Open Integrations (/admin/integrations) in your Workspace Console to register external capabilities once at the workspace level and assign them to any bot:

  • Webhook (HTTP/HTTPS): Connect any standard REST endpoint on your backend (GET, POST, PUT, PATCH, or DELETE) without building a custom agent wrapper. Under the hood, Zervice exposes your webhook to the chatbot planner alongside native MCP tools so your assistant can extract conversation parameters and call the endpoint automatically.
  • MCP Server (Model Context Protocol): Connect a Streamable HTTP MCP endpoint and click Sync (or Connect & Discover) to import its declared tools and input schemas automatically. Toggle individual tools on or off, mark write actions as requiring confirmation, and test live calls in one place.
  • A2A Agent (Agent2Agent): Enter your agent's base URL or endpoint URL and Zervice automatically detects its metadata and skills, allowing your chatbot to delegate multi-step customer requests directly to your specialized backend agent.

Using Webhooks alongside MCP Servers and A2A Agents lets every business start with simple REST endpoints today and adopt native agent protocols whenever ready.


How to Add, Test, and Assign an Integration

Every integration lives in a shared Workspace Library so you never duplicate credentials or endpoints across multiple bots.

  1. Click + New at the top of the Integrations list and pick Webhook, MCP Server, or A2A Agent.
  2. Enter a clear Display Name, Endpoint URL, and a plain-English description explaining when the chatbot should use it (for example, "Fetches the signed-in visitor's active orders and tracking links").
  3. Add optional Request Parameters for Webhooks, or click Sync on an MCP Server / A2A Agent to refresh its tool and skill list.
  4. Click Test to send a sample request—optionally supplying a temporary opaque user token—and inspect the HTTP status and response preview before going live.
  5. Click Assign to Bots (or open the Integration Access Matrix button in the top bar) to choose which bots in your workspace can invoke that integration.
  6. Use Edit, Duplicate, or Delete from the sidebar row or the detail header at any time—clicking Duplicate on an existing Webhook clones its headers, parameters, and auth passthrough settings so adding multiple endpoints on the same backend takes seconds.

To avoid hardcoding API keys inside integration configs, open Workspace Secrets from the top bar, save secrets such as CRM_API_KEY, and reference them in headers or URLs as {{secret.CRM_API_KEY}}. Workspace Secrets are substituted securely on the server at request time and never appear in chat logs or browser requests.


Passing Visitor Sign-In Credentials Safely (Opaque Auth Passthrough)

When a signed-in visitor asks your chatbot to view personal account data or perform an action on their account, Zervice needs a way to forward that visitor's own session token to your backend without reading, storing, or exposing it to AI models.

  • Zero-Knowledge Passthrough: Your website or API caller passes any session JWT, API token, or signed payload opaquely using the Widget JavaScript SDK or HTTP request header:
    • Call window.ZerviceChatbot?.setAuthPassthrough(currentUserAccessToken) (or pass { token, passthrough } into window.ZerviceChatbot?.identify(...)).
    • For direct API calls to /api/v1/chat, pass the value in the X-Zervice-Passthrough header.
  • Transient Request Handling Only: Zervice keeps the passthrough value strictly in transient memory for that request turn, forwards it only to integrations where Opaque Auth Passthrough is enabled (Authorization: Bearer <opaque>, a custom HTTP header such as X-User-Auth, or JSON-RPC metadata), and never writes it into AI prompts, Saved Fields, or conversation logs.
  • Signed-In Guardrail: Enable Require signed-in user or passthrough token on sensitive integrations so unauthenticated visitors receive a polite prompt to sign in first rather than triggering a failed backend call.

Protecting Account Changes With Visitor Confirmation Gates

Not every connected endpoint should run silently during conversation. Zervice distinguishes between safe read-only lookups and actions that change customer state:

  • Read-Only Lookups Run Seamlessly: Leave Ask visitor to confirm before calling off for lookups (such as fetching order status, plan details, or invoices) so the chatbot answers immediately in a single turn.
  • Confirmation Gates Pause Before Writes: Turn Ask visitor to confirm before calling on for mutations (such as cancelling an order, issuing a refund, or changing billing settings). Before sending the request, Zervice asks the visitor to reply clearly (for example, "Yes" or "Confirm") and only executes the call once explicit approval is given.
  • Reuse in Dialog Flows Too: Alongside free-form Consulting conversations, any Webhook, MCP Server, or A2A Agent you register in Integrations can also be selected inside a visual Dialog Flow's Webhook / Integration step when you want strict step-by-step control.