Guides · confiqure 3.0
Opening Context
The chat is never fenced to one object. It opens on the context of the screen that launched it and reaches any object or tool class the conversation needs. The opening context is how your screen says what that context is.
No more configEnd. The embed token no longer names an endpoint for the chat to open on. The start of a conversation is the opening context only.
Frames
What the opening context opens.
- A conversation is one transcript plus a set of frames. A setting frame is an object (and its record, once bound). A tool frame is a tool class.
- Frames never close inside a conversation. The last one touched is current; a class already open is re-entered, not opened again.
- When an ask needs something that isn't open yet, the chat finds the class it needs and opens it. The first message goes through that same search like any other — there is no start router.
The fields
All optional. An empty context: the chat greets the user and waits.
| Field | Type | What it does |
|---|---|---|
| intent | string | Prose describing what the user was doing when they opened the chat. It goes into the prompt. |
| referentKeys | string[] | Keys of records the screen is showing. Each one opens a setting frame on that record. |
| data | object | Unchanged from before 3.0 — see Embed Token & SDK. |
| toolClass | string | New in 3.0. A tool class name. Opens a tool frame on that class when the session opens. |
referentKeys and toolClass open their frames directly when the session opens — nothing has to be searched for. The tool frame becomes current, after any referent frames. A toolClass that names no tool class of your workspace is ignored; it is never an error to your application. A resumed chat applies the context too.
Where to pass it
The same four fields, in either of two places.
- In the page —
confiqure.open()with the fields besidetoken(embed SDK ≥ 0.3.0), as in the example below. The chat opens at once and the context follows it. The recommended place. - On the mint — the
openingContextobject of the embed-token mint (Endpoints), next toendUserHandle. The mint takes noconfigEnd; sending one is a400. The mint'sattachmentsblock is unchanged from 2.x — send it on every mint, or the widget shows no attach button, no paste and no ctrl+v.
Preloading a tool class
A screen may open the chat with its tool class already loaded — the Listings page with ListingsTool, an Amazon page with AmazonTool.
confiqure.open({
target: '#chat-panel',
token,
intent: 'The user opened the chat from the Listings page.',
referentKeys: [selectedRecordKey], // optional — a record the screen is showing
toolClass: 'ListingsTool', // optional — preloads a tool frame
})Related: