Smart Sessions (AI interview agent)

Smart Sessions (AI interview agent)

Smart Sessions turn a Question Set into a guided chat with an AI assistant (for example "Charlie"). The assistant asks the questions you define, understands free text answers, picks the matching option, asks the candidate to rephrase when it is unsure, flags risky answers and writes a summary for the recruiter. Every answer is stored on the Candidate Scorecard as real, reportable records.

Typical uses: pre-screening applicants, reference collection, referral collection, knowledge checks, feedback collection and data enrichment. Answers can also be saved to real Salesforce fields: update the candidate's Contact, update the context record (for example a Reference), update or create child records, or create new records such as referred candidates.

How it works

  1. An admin ticks Smart Session on a Question Set and builds the conversation in the 3B Smart Session Builder on the Question Set record page.
  2. The candidate opens the chat from a direct link, a 3B Portals page or their document pack.
  3. Each answer creates or updates an Assessment Response on the candidate's Candidate Scorecard.
  4. When the conversation ends the scorecard is marked Completed (or Knocked Out), the AI summary is saved and, when the Question Set belongs to a document pack, a Document Submission is created for review.

Candidates can leave and come back. The conversation resumes where they left off, and one candidate can have several Smart Sessions open at the same time (one scorecard each). A finished session is not restarted from the same link: reopening it shows the closing message. Set "allowRetake": true in the configuration to allow a new attempt.

Prerequisites

Requirement Where
3B AI configured (provider, endpoint, supplier key, AI Thinking Model) Onboarding Default Settings custom setting. The thinking model must support tool calling and temperature; a per-session Model override wins
CSP Trusted Site for the 3B AI endpoint X3B_AI (installed with the package)
Site URL Onboarding Default Settings > Site URL
Admin permissions Onboarding Admin Full Permission permission set
File questions for guests (3B Portals / Sites) Site guest users must be allowed to upload files (Setup > Salesforce Files > General Settings > Allow site guest users to upload files)

Build a Smart Session

Open a Question Set, tick Is Smart Session and save. The record page shows the builder instead of the classic assessment builder. Use Start from example to load a working sample.

The builder has four sections.

1. Assistant

Setting Description
Name, avatar How the assistant introduces itself, for example Charlie
Tone For example "warm, concise, professional"
Languages Languages the assistant may use
Guidance Free text instructions: purpose of the conversation, what to focus on, what to avoid
Language monitoring When on, unprofessional or abusive answers are not accepted and the candidate is asked to rephrase
Advanced Optional model and temperature override for this Question Set

2. Disclosure and messages

Setting Description
AI disclosure + consent label Shown before the first question. The candidate must accept it when Required is on. Acceptance is stamped on the scorecard (Consent Timestamp)
Completion message Shown when the conversation ends normally
Knockout message Shown when a knockout answer ends the conversation
Summary instructions How the AI should write the end-of-conversation summary. Leave blank to skip the summary
Pass mark Saved to the Question Set Passing Score; drives the scorecard Result
Inactivity (hours) After this long without activity the session expires

3. Context

Choose what the assistant knows about the candidate before the conversation starts.

{
  "object": "b3o__Application__c",
  "contactPath": "b3o__Candidate__c",
  "groups": [
    { "title": "Candidate", "description": "The candidate's personal details",
      "fields": [ { "path": "b3o__Candidate__r.FirstName", "meaning": "First name, self reported" } ] },
    { "title": "Job", "description": "The job they applied for",
      "fields": [ { "path": "b3o__Job__r.Name", "meaning": "Job title" } ] }
  ]
}

Values are read once when the session starts and stored with the session, so the audit shows exactly what the assistant saw.

4. Save answers to records

Optional. Each record is a target that questions can save to.

Setting Description
Label / Key The key is used by questions and $record.<key> tokens. Renaming it updates every reference
Object A custom object, Contact or Account
Mode Create new, Update existing or Update or create (upsert)
Find it by (update / upsert) Record id: a token such as $contact or $context. Matching fields: field = value rows, all must match, the newest record wins
Defaults (create / upsert) Field = value rows written when a record is inserted. Lookups are allowed
Allow multiple (create) An option with Repeat starts another record of this kind, for example one more referral
Allow duplicates Saves even when a duplicate rule would block it
Save At the end of the session (one transaction) or after each answer
If saving fails Show the error and ask again, or end the session with an error (uses the "Message when saving fails")

Values accept literals or tokens (the builder suggests them while you type): $contact, $contact.<path>, $context, $context.<path>, $scorecard, $record.<key> (an EARLIER record only), $recordType.<DeveloperName>, $today, $now.

How saving works

Examples

Refer a candidate (referred contacts report to the referrer):

"records": [
  { "key": "referral", "label": "Referral", "object": "Contact", "mode": "create", "multiple": true,
    "saveOn": "end", "onError": "reask",
    "defaults": { "RecordTypeId": "$recordType.Candidate", "AccountId": "$contact.AccountId",
                  "ReportsToId": "$contact", "LeadSource": "Referral" } }
],
"questions": [
  { "key": "q_first", "type": "field", "text": "What is their first name?", "mapping": { "record": "referral", "field": "FirstName" } },
  { "key": "q_last", "type": "field", "text": "And their last name?", "mapping": { "record": "referral", "field": "LastName" } },
  { "key": "q_email", "type": "field", "text": "What is their email address?", "mapping": { "record": "referral", "field": "Email" } },
  { "key": "q_more", "type": "yesNo", "text": "Would you like to refer someone else?",
    "options": [ { "key": "yes", "label": "Yes", "repeat": "referral", "goTo": "q_first" }, { "key": "no", "label": "No" } ] }
]

Confirm a reference (the session context is the Reference record):

"context": { "object": "b3o__Reference__c", "contactPath": "b3o__Contact__c", "groups": [] },
"records": [ { "key": "reference", "object": "b3o__Reference__c", "mode": "update", "recordId": "$context", "saveOn": "answer" } ],
"questions": [
  { "key": "q_role", "type": "field", "text": "What was your role when you worked with them?",
    "mapping": { "record": "reference", "field": "b3o__Position_Referee__c" } },
  { "key": "q_since", "type": "field", "text": "When did you start working together?", "aiExtract": true,
    "mapping": { "record": "reference", "field": "b3o__Start_Date__c" } }
]

Re-engage a candidate and enrich their profile:

"records": [ { "key": "candidate", "object": "Contact", "mode": "update", "recordId": "$contact" } ],
"questions": [
  { "key": "q_mobile", "type": "field", "text": "Is this still the best mobile number for you?", "prefill": true,
    "mapping": { "record": "candidate", "field": "MobilePhone" } },
  { "key": "q_disciplines", "type": "field", "text": "Which disciplines do you work in?",
    "mapping": { "record": "candidate", "field": "b3o__Disciplines__c" }, "prefill": true },
  { "key": "q_cv", "type": "file", "text": "Could you upload your latest CV?", "accept": ".pdf,.docx", "optional": true,
    "mapping": { "record": "candidate" } }
]

Field types that can be collected: checkbox, picklist, multi-select picklist, text, text area, email, phone, URL, encrypted text, number, currency, percent (decimal places are rounded to the field's scale), date, date/time (entered in the respondent's local time, stored in UTC), time and geolocation. Lookups cannot be asked for but can be set through defaults. For addresses, map the individual fields (MailingStreet, MailingCity...). Picklist questions list the field's active values (record type specific values are not applied). To offer only some values or change how they read, turn on Customise answer options under the field: untick the values you do not want and type the label the respondent sees. The value saved to the field stays the same, and the respondent cannot submit a value you left out. This also works for checkbox fields (relabel Yes / No). Files of any size can be uploaded: large files go through the 3B files service, which needs Files Endpoint set in Onboarding Default Settings.

5. Questions

Questions run top to bottom unless a branch says otherwise.

Type Candidate sees What is stored
Open answer A text box The exact answer, optional sentiment and summary
Single choice Buttons (or a list for long options) The selected option and its score
Multiple choice A checkbox list. The candidate ticks every option that applies The selected options. Scores add up; the best score is the sum of all positive options
Yes / No Yes and No buttons The selected option and its score
Blind single choice A text box. The options are hidden The AI picks the matching option from the free text answer, with a confidence score
Blind multiple choice A text box. The options are hidden The AI picks every option that applies (one or more). Scores add up; the best score is the sum of all positive options
Record field An input that matches the field it saves to (date, number, picklist buttons, text...) The value, written to the mapped record field
File upload An upload control The files, kept on the scorecard and linked to the mapped record (if any)

Per question settings:

Setting Description
Options Label, score, Red flag (selecting it flags the answer), Knockout (selecting it ends the conversation), Go to (jump to another question or end)
How the AI should choose (blind) Extra instructions for mapping the answer to options. Example for "What is the best mobile number to reach you on?" with options "Accepted mobile number" / "Mobile number outside accepted countries": "We accept UK mobile numbers (+44 or 07). Any other country code is outside accepted countries." The candidate never sees it
Confidence (blind) Threshold 0-100. Below it the candidate is asked to rephrase, up to Max rephrase times, then the fallback option (for example "Unsure" at 50 percent of the top score) is recorded
Red flag guidance Tells the AI when to flag an answer, for example "Flag if the candidate contradicts their CV"
Sentiment Stores Positive / Neutral / Negative / Mixed for the answer
Summarise Stores a short AI summary of the answer
Images Public image URLs shown with the question (the chat runs as a guest user, so images must be publicly reachable)
Then go to Next question after this one: the following question, a specific question, or end
Save the answer Record + field the answer is written to. Only fields the question type and record mode can write are listed (open answers: text fields; multiple choice: multi-select picklist or text). File uploads pick a record only
Show the current value (record field) Prefills the value already on the record. The respondent sees it
AI extracts the value (record field) Free text chat, the AI pulls out the value. Not for checkbox, picklist or location fields
Optional (record field, file) Shows Skip; a skipped answer writes nothing
Accepted files / Max files (file) accept string such as .pdf,.docx (also enforced on the server); 1-10 files
Option value / Repeat Value written to the mapped field (blank = the label); Repeat starts a new instance of a record with Allow multiple

Scores and knockouts always come from your option configuration. The AI only decides which option matches the answer.

Send the chat to a candidate

Entry point URL / setup
Assessment Publisher Select the site and Contact. If the Question Set uses a separate context object, select the context record. The generated link includes the Question Set, Contact, session key and any selected context record.
Document pack Add a Document with the Smart Session Question Set to the pack. My Documents opens the chat automatically
Resume link <Site URL>/apex/b3o__SubmitAssessment?key=<scorecard key>

People without a login (for example a referee) get a resume link with a scorecard key; the key opens that one session only and expires after 30 days. A script that prints a resume link for a scorecard is available from 3B support.

Ready-made bots

A setup script, available from 3B support, creates three bots you can use as they are or adjust in the builder:

Bot Sent to What it does
Smart Session - Profile Update A candidate Confirms name, email and mobile (current values shown) and adds any number of employment and education history rows
Smart Session - Reference Check A referee (context: the Reference) The referee confirms or corrects what the candidate entered (organisation, position, dates), describes the candidate's work and confirms; the Reference is set to Confirmed. "I don't know them" ends the chat with a red flag
Smart Session - Refer a Candidate A candidate Collects one or more referrals; each becomes a Contact reporting to the candidate, only after the candidate confirms the person agreed to be contacted

The same SubmitAssessment and PreviewAssessment pages serve classic assessments and Smart Sessions. For a Question Set with Is Smart Session selected, SubmitAssessment opens the chat and PreviewAssessment opens the transcript.

Review results

Scorecard statuses: Not Started, In Progress, Completed, Knocked Out, Expired, Error (saving failed with "End with an error"). Classic assessment scorecards keep a blank status.

Security

Troubleshooting

Symptom Check
Classic assessment builder still shows Tick Is Smart Session on the Question Set and refresh the page
"The AI request failed" in the chat Onboarding Default Settings AI configuration and the X3B_AI CSP Trusted Site
Every answer is rejected after the AI replies The 3B AI service must support signed results. Contact 3B support
Session shows as expired Inactivity (hours) elapsed since the last answer. Start a new session
No Document Submission created The Question Set must be on a Document in an active document pack assigned to the contact. Submissions are created when the session completes or is knocked out
Status Error or entries in Save Errors Read the error line: fix the validation rule / flow / required field, or change the record's "If saving fails" to Ask again
"No ... record was found to update" The record id token is blank or the matching fields match nothing. Use Update or create to insert when missing
File upload rejected A type not in Accepted files, guest file upload disabled in Salesforce Files settings, or (files over 3 MB) Files Endpoint not set in Onboarding Default Settings
Configuration rejected on save The message names the record or question: object/field missing, field not createable / updateable for the mode, unsupported field type, or a token that does not resolve