Skip to content
Fineguide

Platform

Home AI Assistants CRM Messages & Inbox Voice QA AI Telephony Campaigns Workspace Automations MCP connectors
Pricing Enterprise Partners Contact Blog

Session variables: how a chat becomes clean CRM data

Set up session variables so your AI assistant fills in names, phones, reasons and choices from every chat and writes them into your CRM automatically.

A chat conversation turning into structured CRM fields: name, phone, reason for contact

Session variables are the fields you ask your AI assistant to fill in from every conversation: a name, a phone number, why the person came, how many guests, which product. Fineguide reads the conversation, saves each value on it, and writes the ones that matter into your CRM, so a chat ends as a clean record instead of a transcript someone has to read.

Most teams already have the data they need. It is just buried in chat logs. A visitor tells the assistant their name in the second message, mentions their budget in the fifth, and leaves a phone number at the end. If nobody copies those details somewhere useful, they are gone. Session variables fix that without asking anyone to copy anything.

What a session variable is

A session variable is one piece of information you want from each conversation, described in plain language. You give it three things:

  • a name that stays fixed, written in lowercase words joined by underscores, like preferred_language or visit_reason
  • a type, which says what kind of value it holds
  • a short brief under What to look for, telling the assistant what counts and what doesn’t

You set them up per assistant, in Session Variables under the Knowledge group of the assistant menu.

The types cover almost everything a business asks for:

TypeExample variableExample value
TextThe visitor’s nameMaria Popescu
NumberHow many guests4
Yes or noAsked for a personYes
One of a listWhy they cameReturn
Several from a listProducts they asked aboutLaptops, Phones

The two list types are where session variables become really useful. Instead of free text that every conversation phrases differently, you get the same small set of values every time: Order status, Product question, Return, Other. That is what makes the data countable and sortable later.

Write the brief like you’d brief a colleague

The assistant decides what to save from your description, so the description is the whole job. Compare these two briefs for a phone number:

  • Too vague: “Phone”
  • Clear: “The phone number the visitor gives so we can call back. Not order numbers, prices or dates.”

The second one tells the assistant what to ignore, and that is what keeps a delivery date from landing in your phone field. If a conversation never gives the value, it is left empty rather than guessed.

For list types, each value can carry its own description too: “The visitor asks where their order is”, “The visitor wants to send something back”. Add an Other value so a conversation that fits none of them still gets one, and keep values short.

Start with the common ones

You don’t have to write everything from scratch. The arrow beside New variable adds ready-made variables with their instructions already written:

  • name, phone and email, with rules such as normalising phone numbers to international format and ignoring prices, IDs and order numbers
  • human escalated, a yes-or-no that marks conversations where the person wanted a human, a return, a refund, or help only a person can give
  • summary and intent, so every conversation has a short description and a reason

Each one can be edited like any other, so you can tune the wording to your business.

From the conversation to the CRM

This is where session variables pay off. Turn on Collect leads under Features → Lead collection, and the assistant asks visitors for their contact details and saves them as leads in your CRM. You choose When it asks:

  • When the visitor shows interest
  • In every reply
  • Before it answers anything

Then tick the variables a lead needs. A lead is saved once those are collected. Leave them all unticked and it is saved as soon as there is an email or a phone number.

What happens next is automatic. The person is found or created as a contact by their email or phone, the conversation stays linked to that record, and your other variables travel with it. Name, email and phone go into the contact’s own fields. Everything else becomes a custom field on the CRM record, made for you from the variable, with the same type and the same list of options. A “One of a list” variable becomes a single-select field, a “Yes or no” becomes a checkbox. You never set up the field twice.

When the same person comes back later and a new conversation collects a fresh answer, the field is updated. Fields that conversation did not ask about stay as they were.

If you haven’t seen how the CRM side works, this overview of lead capture in Fineguide CRM walks through it.

A worked example: a furniture shop

Picture a furniture shop that sets up four variables on its website assistant:

  1. name and phone from the common list
  2. visit_reason, one of a list: Buy, Delivery question, Return, Other
  3. room, several from a list: Living room, Bedroom, Kitchen, Office

A visitor writes: “Hi, I’m looking for a sofa and a desk for a small flat, can someone call me? 069 123 456, Ion.”

The assistant answers the question about sofas from the shop’s catalogue, and the conversation ends with name = Ion, phone = 069123456, visit_reason = Buy, room = Living room, Office. Ion is now a contact in the CRM with those fields filled in, and the sales team can filter for everyone who asked about office furniture this week.

Nobody typed anything.

Where else the values go

Session variables are not locked inside the CRM.

  • Webhooks: the Variable Update event sends the collected values to your own system as they change.
  • Conversations: every value is saved on the conversation itself, so you can see what the assistant understood when you review a chat.

FAQ

Do I need to tell the assistant to ask for these details? No. The assistant fills variables from what is said. If you want it to actively ask for contact details, that’s what Collect leads and When it asks are for.

What if a visitor gives a wrong or partial number? The assistant saves what was said, following your brief. A clear brief (“only the number to call back on”) keeps unrelated numbers out.

Can I rename a variable later? The name can’t change once the variable exists, because webhooks and your own integrations read it by that name. Pick a name that will still make sense in a year. The description can be edited any time.

Does this work on WhatsApp, Instagram and Telegram too? Yes. Variables belong to the assistant, so they are collected on every channel the assistant answers. See how to connect WhatsApp for one example.

Try it on your own assistant

Open your assistant, add the common variables plus one list that matters to your business, and turn on lead collection. After a day of conversations, open the CRM and look at what arrived. It’s the fastest way to see what your AI assistants are actually learning from your customers.

All articles