Integrations

How Subcontext connects to your firm's own systems, what it sends them, and how to build the receiving end.

This section is for the developers who build the other end of an integration: the endpoint an agent calls, the server that receives Subcontext's webhooks, or the code in your CRM that tells Subcontext what became of a lead. It describes exactly what goes over the wire, so you can build and test your side.

The dashboard's Help articles cover the dashboard screens, and each page here names the article to read. Most integration settings are for owners and managers, and custom integrations and webhooks are a plan feature.

Which integration do I need?#

You want to... Use Read
Let an agent look something up in your system, or do something there, during a conversation A custom integration's endpoint, exposed as an agent tool Your API as an agent tool
Hear about every new lead, or other lead events, in a standard signed format A Webhook endpoint connection and a workflow's Send a webhook action Webhooks Subcontext sends
Push each lead into your CRM's own API, shaped the way it wants A custom integration's endpoint and a workflow's Send to an integration action Webhooks Subcontext sends
Have your CRM tell Subcontext about sales, quotes and commission, using its webhooks An inbound custom integration Sending events to Subcontext
Write code that sends leads or outcomes to Subcontext The Subcontext API, with an access token API and Access tokens
Add bookings to Google Calendar, or rows to a Google Sheet The built-in Google connections Built-in integrations
Tell Google Ads or Meta which leads went on to buy The built-in ad platform connections Outcomes to ad platforms

Integrations work in one of two directions:

  • Subcontext calls you: agent tools, webhooks, Send to an integration, policy sync. Your server answers Subcontext's requests. The rules all of these share (HTTPS, timeouts, retries, status codes) are in How Subcontext calls your systems.
  • You call Subcontext: the API (you ask for a token and send requests), or an inbound custom integration (your system posts signed events to a delivery address).

A first integration in ten minutes#

  1. Save webhook-receiver.mjs on a server that has an https:// address, and start it with a signing secret you make up: SUBCONTEXT_SIGNING_SECRET=A_LONG_RANDOM_VALUE node webhook-receiver.mjs.
  2. In the dashboard, open Integrations, External systems, press Connect and choose Webhook endpoint. Enter your address as the Base url and the same value as the Signing secret.
  3. Open CRM, Workflows, press New workflow, set When to A lead arrives, add the action Send a webhook and pick your connection.
  4. Add a test lead with your own details (Leads, New lead). Your server prints lead.created and the name.

Need help?#

Email hello@subcontext.com. Say which integration you're building and, if something failed, the time of the call. The Integration logs in the dashboard hold the request and the answer.

In this section

Stuck, or something missing?

Get in touch and a person on the team will help.

Contact us