Example pages are complete web pages that show the Nurture widget in use. Each card below is one page. Choose View and copy to read and copy its code, or Download to save the file. Then put it on a test page of your portal.
-
01-minimal.html
The paste-in snippet: a floating button, with client and adviser from data attributes.
-
02-programmatic.html
Loading the script without starting it, then starting it with init(), and every method on a button.
-
03-branding.html
Colours, button text, position, a button in your own toolbar, the shared theme object in dark mode, and your own wording.
-
04-call-note-and-context.html
A call note instead of the menus, previous quotes as background, and an unreplaced merge field.
-
05-portal-record-swap.html
Docked mode in a single-page portal, switching client with setConsumer().
-
06-signed-identity.html
Using a signed identity pass, and what happens when the firm id is edited.
Trying an example#
- Save the page and replace its placeholders with the values Subcontext
gives you:
YOUR_WIDGET_KEY(your widget key,nwk_...),YOUR_FIRM_ID(a firm id Subcontext has set up for you) andSIGNED_PASS_FROM_YOUR_SERVER(a pass your server created for that firm id and the page's adviser id, see Signed identity). Put your own email address where the page saysyou@your-firm.example. - Put it on a test page at an address Subcontext has allowed for your widget key. Opening the file from your computer won't work.
The firm id and adviser id in the page must be the ones the pass was
created for, or every request fails with identity_mismatch. Passes expire,
so create a fresh one when it runs out.
- Test messages are sent for real. Use an email address you own, and don't press Send for a made-up client whose email or mobile you don't control.
- Unknown firm ids can create real trial accounts. If your portal offers trials, accepting the terms for a firm id that isn't set up creates one. Use a firm id Subcontext has set up for you.
- The first time each adviser opens the widget, they accept the terms.
- Work in progress is kept per browser tab. Open a new tab, or press Cancel or Done, to start fresh.