"Nurture with AI" is a button you add to the client record page of your adviser portal or CRM. After a call with a client, the adviser clicks it, says what the call covered, picks how to reach the client (email, SMS or WhatsApp), checks the message the AI writes, and sends it. From then on the firm's Subcontext assistant keeps the conversation going with the client until they are ready to talk to the adviser again.
It is built for portals that many advice firms use. One snippet serves every firm on your portal. You pass in the firm and the adviser on each page.
It is not for a public website. For website visitors, use Subcontext's chat, lead form or quote form widgets instead.
Quick start#
- Get your widget key and firm ids from Subcontext, and ask them to allow your portal's address (see What you need from Subcontext).
- On your client record page, have your server create a signed identity pass for the firm and adviser (see Signed identity).
- Paste this into the page, filling the values from your own records:
<script
id="nurture-embed-script"
src="https://js.subcontext.com/nurture-latest.js" defer
data-integration-key="YOUR_WIDGET_KEY"
data-firm-id="YOUR_FIRM_ID"
data-firm-name="Harbourline Financial"
data-identity-token="SIGNED_PASS_FROM_YOUR_SERVER"
data-advisor-name="Sam Patel"
data-advisor-id="ADVISER-7"
data-advisor-email="sam@example.com"
data-consumer-first-name="Priya"
data-consumer-last-name="Sharma"
data-consumer-email="priya@example.com"
data-consumer-phone="07700 900841"
data-consumer-external-id="CLIENT-123"></script>
A "Nurture with AI" button appears in the bottom-right corner of the page.
Most portals fill these values from their own templates, for example
data-consumer-email="{{Client.Email}}". If a value is missing, the widget
asks the adviser for it (see Merge fields).
What you need from Subcontext#
Subcontext sets up your portal and the firms on it. Email hello@subcontext.com to arrange it. You will get, or need to agree:
| What | What it is |
|---|---|
| Widget key | Starts with nwk_. It identifies your portal. It is public, so it can appear in your page source. |
| Firm ids | Your portal's own id for each advice firm, such as HARBOURLINE-01. You tell Subcontext the ids you use, and Subcontext links each one to that firm's Subcontext account. |
| Allowed addresses | Every web address your portal runs on, written as https://portal.example.com (scheme, host and port if any; no path, no trailing slash). The widget only works on pages at these addresses. Ask Subcontext to add a new one at any time. |
| Signing key (usually) | A key id (starts with nhk_) and a secret (starts with nhs_). Your server uses them to create the signed identity pass. Signed identity is on unless Subcontext agrees to switch it off, which is only suitable for demo pages. |
| Trial accounts for new firms (optional) | Subcontext can let firms that aren't set up yet start a free trial straight from the widget. Ask if you want this. |
Which channels a firm can send on (email, SMS, WhatsApp) is also arranged with Subcontext. The widget shows the adviser why a channel is not available.
How it works#
- The page loads the script with your widget key and the firm id.
- The widget draws a "Nurture with AI" button. (In "docked" mode it shows the form straight away, with no button.)
- When the adviser opens it, the widget checks with Subcontext which channels the firm can use, whether this adviser has accepted the current terms, and the state of the firm's account.
- The adviser fills in the form: a reason and outcome for the call, plus an optional note. If you pass the call note your portal already holds, the form shows that instead. If you didn't pass the client's first name, email or mobile, the form asks for them.
- The adviser presses Generate message. Subcontext writes a draft for each chosen channel. This usually takes a few seconds.
- The adviser can edit each draft (one tab per channel) and presses Send. WhatsApp messages use an approved message template, so the adviser edits one sentence inside it.
- The client gets the message. When they reply, the firm's Subcontext assistant answers and keeps the conversation going.
The widget is drawn inside a shadow root (an isolated part of the page), so your portal's styles can't change it and its styles can't leak into your portal.
What the adviser may see#
The firm id decides what the adviser sees:
| The firm's situation | What the widget shows |
|---|---|
| Set up, with a full Subcontext account | The form. The first time, the adviser accepts the terms. The footer links to the firm's Subcontext dashboard, or to a page where the adviser can ask to be invited. |
| Set up, on a free trial (started from the widget) | The form, email only, with a monthly limit and a line showing how much is used. SMS and WhatsApp show as locked and open an upgrade prompt. |
| Not set up yet, and your portal offers trials | "Turn on Nurture with AI for your firm". Accepting the terms creates a free trial account for the firm on the spot, named after firmName. |
| Not set up yet, and your portal doesn't offer trials | "Not enabled yet". |
| Switched off for this firm | "Not enabled yet". |
Terms are accepted once per adviser, and again whenever the terms change.
Example pages#
The example pages are complete web pages that show the Nurture widget in use, from the simplest install up. You can read, copy or download each one.
In this section
- Install the widget Add the widget with the paste-in snippet or start it from JavaScript, and what the client and adviser details you pass are used for.
- Options Every setting for the script tag and init(), merge fields, and how to change any of the widget's wording.
- JavaScript API and events The SubcontextNurture methods, switching client without a reload, and the events and callbacks your page can listen for.
- Signed identity Create the signed identity pass on your server that proves which firm and adviser a page is for.
- Security and troubleshooting Privacy and security, rate limits, content security policy, and what each message and error code means.
- Example pages Six working pages to copy, from the paste-in snippet to switching client and signed identity.