
When an existing customer comes back, your AI agent should not treat them like a stranger. AiEngage CRM can tell the agent who it is talking to, so a customer who is already in your CRM:
does not have to fill in the chat form again when they are signed in to your website,
is greeted by name (“Hello Sneha!”),
sees their earlier conversations in the widget’s Messages tab, and
has every chat saved to their own contact record, not to a new, anonymous “visitor”.
This article explains how recognition works on each channel, then walks you through switching it on for your website one screen at a time. Every screenshot is explained underneath, so you know exactly what you are looking at.
Where the customer chats | How they are recognised | What changes for them |
|---|---|---|
Website, signed in to your site | Your website tells the chat widget the customer’s email address (Part 1 below). | No chat form. Greeted by name. Chat saved to their contact. Past chats under Messages, and their tickets under My tickets. |
Website, filled in the form before | The widget remembers the details they typed, in that browser, for later visits. | Not asked again on that browser. The chat is linked to the contact the form matched or created. |
Automatically: WhatsApp proves the phone number, and the conversation is linked to the contact with that number. | Greeted as a known customer. The agent also gets a short summary of their CRM record (Part 4). | |
Website, anonymous visitor | Not recognised. | Sees the Ask visitor details form if you switched it on. See Ask Visitor Details. |
An AI agent that is published on your website. See Publish Your AI Agent to Your Website.
The chat widget installed on your website. See Install the Chat Widget on Your Website.
Admin access to Customer Support → Settings in the CRM.
A website where customers sign in (an online store, booking site or customer portal), and someone who can edit its page templates. Recognition on the website only works for customers your website already knows.
For WhatsApp: the agent connected to your WhatsApp number. See Connect an AI Agent to WhatsApp.
Your website knows which customer is signed in. These steps show you the two lines in the widget’s install script that pass that customer’s name and email to the chat widget.
Click Customer Support (the headset icon in the left rail), then Settings at the bottom of its sidebar, then the Chat Widget tab.

What this screenshot shows. The top of the Customer Support Settings page. The page title and the Chat Widget · Install script & routing tab are ringed, and the arrow points at them.
Customer Support Settings: the page where all support channels are set up: support email, from address, notifications, general settings and the chat widget.
Chat Widget (orange when selected): the tab with your website widgets, their install script and the Logged-in visitors settings used in this article.
Below the tabs (not ringed) is the list of your widgets on the left and the selected widget’s settings on the right. Click the widget that is on your website.
Scroll down the widget’s settings until you reach Install script.

What this screenshot shows. The Install script heading and its instruction are ringed.
Install script: the code that puts the chat widget on your website.
Paste this just before the closing </body> tag on every page you want the widget on: where the code goes on your site.
If the widget is still a Draft, a red note under the heading reminds you that the script will not load until you set the widget to Active and save. Recognition only works on a live widget.
Inside the install script are two lines that tell the widget who the visitor is:

What this screenshot shows. The install script, with its two visitor lines ringed and pointed at by the arrow.
w.crmwidget.visitor.name('Mark Holt');: the signed-in customer’s name. It is used for the greeting and to pre-fill forms.
w.crmwidget.visitor.email('mark@example.com');: the signed-in customer’s email address. This is the line that identifies the customer. It is matched against the Email field of your contacts.
Mark Holt and mark@example.com are sample values. The widget ignores sample addresses on purpose (anything ending in @example.com, .net or .org), so nobody is recognised until you replace them.
The rest of the script (the widget id, the backend address and the loader) stays exactly as it is.
Ask whoever manages your website to replace the sample values with the signed-in customer’s real name and email, written into the page by your website’s server. For example, on a page template it might look like this (the exact tags depend on your platform):
w.crmwidget.visitor.name('{{ customer.full_name }}');
w.crmwidget.visitor.email('{{ customer.email }}');

What this screenshot shows. The paragraph directly under the install script is ringed, and the arrow points down at it.
Signed in customers: tells you to swap the values for your own, rendered by your server, or to delete both lines if your pages do not know who is visiting.
email is what identifies the visitor: a recognised visitor skips the chat form, and My tickets shows the tickets on that customer’s record.
The name only pre-fills the form: the name alone never identifies anyone.
It also reminds you to call crmwidget('logout') when the customer signs out (Step 7).
Below the install script is the Logged-in visitors section. It applies to every chat widget in your organisation.

What this screenshot shows. The heading of the Logged-in visitors section is ringed and pointed at by the arrow.
Logged-in visitors with a green Enabled badge: recognising signed-in visitors is available for your organisation.
The description says the same thing as the install script: tell the widget who is visiting with crmwidget.visitor.email(), and My tickets works. There is nothing to compute and no secret is needed.
Applies to every chat widget in your organization: this section is shared, so changing it here changes it for all your widgets.
Underneath (not ringed) is Login page URL: the page the widget’s Log in button opens for a visitor who isn’t signed in. Leave it empty to hide the button.

What this screenshot shows. The How visitors are recognised block at the bottom of the Logged-in visitors section is ringed.
Tell the widget who is signed in and it does the rest, followed by the one call that does it: crmwidget.visitor.email('customer@example.com');
That address selects the customer: My tickets shows the tickets on their record, and they can chat and raise new tickets without filling in the chat form.
A visitor who completes that form instead is remembered the same way on later visits: this is the “returning chatter” row in the table at the top of this article.

What this screenshot shows. The sign-out note is ringed and pointed at by the arrow.
When a customer signs out, call crmwidget('logout'). The widget remembers the customer in their browser, so without this call it keeps recognising them on that computer. This matters most on shared or public computers.
Signing in without a page reload? If your site signs customers in without reloading the page (a single-page app), call crmwidget.visitor.email('…') with the customer’s address at that moment. It is the same call the install snippet makes.
When the code is ready, save the widget, set it to Active if it is still a draft, and publish the change on your website. Install the Chat Widget on Your Website explains where to paste the script on popular website builders.
Recognition is only as good as your contact data. The widget looks for a contact whose Email is the address your website passed. WhatsApp uses the contact’s Phone.

What this screenshot shows. The left panel of a contact record (our sample customer Sneha Patil) is ringed, from the name down to the phone number.
SP / SNEHA PATIL: the contact’s name. This is the name the agent greets the customer with.
Email (sneha.patil@mail.example): must be the same address your website passes in visitor.email. Capital letters and spaces around it don’t matter.
Phone (+919822071346): used to link WhatsApp chats. Save numbers with the country code, the way WhatsApp sends them.
Contact Owner: the team member who owns the customer. Chats are linked to this record whoever owns it.
No contact with that email yet? The CRM creates one from the name and email your website passed, so the customer is recognised from their next visit onwards.
Two contacts with the same email or phone? Merge the duplicates. A clean, single record is what the agent should see.
Merged or deleted contacts are never used to describe anyone, even if an old browser or WhatsApp thread still points to them.
Here is our sample customer, Sneha, visiting the GreenLeaf Dental Clinic website while signed in. The clinic’s website passes her name and email to the widget exactly as in Part 1.

What this screenshot shows. The clinic’s own website, with its header and welcome line ringed and an arrow pointing at them.
● Signed in as Sneha Patil: this comes from the clinic’s own website, not from AiEngage. Because the site knows who she is, it can pass her email to the chat widget.
Welcome back, Sneha: the clinic’s own greeting. The chat widget sits in the bottom-right corner of the page.

What this screenshot shows. The open chat widget on its Home screen, ringed, with the arrow pointing at the panel.
Recent message: her last conversation with the agent, with the start of the agent’s reply (“Hello Sneha, welcome back…”). It is shown because the widget knows which customer she is.
Send us a message: starts a new conversation.
Home and Messages at the bottom switch between this screen and her list of past conversations (Step 4).

What this screenshot shows. A new conversation. The whole panel is ringed and the arrow points at the agent’s reply.
Sneha asked “Hi! Can I book a teeth cleaning this Saturday morning?” and the agent answered straight away.
No “Before we start…” form appeared, even though this agent has Ask visitor details switched on with email and phone required. A recognised customer skips it.
Hello Sneha!: the agent knows her name and uses it.
The agent goes on to help with the booking (opening hours, the service name and the price), using its own knowledge sources. The suggested follow-up questions sit under the reply.

What this screenshot shows. The Messages tab, ringed, with the arrow pointing at the list.
PREVIOUS CONVERSATIONS: each of Sneha’s earlier chats with the agent, newest first, with her question, the start of the agent’s answer and how long ago it was.
Click a conversation to open it and carry on where she left off.
Load more: shows older conversations.
Her history follows her to any browser where she is signed in to your site, because it is stored on her contact, not in one browser.
On the same website, someone who is not signed in is asked for their details first (because this agent has Ask visitor details switched on):

What this screenshot shows. The chat widget for an anonymous visitor, showing the Ask visitor details form, ringed.
Before we start, please answer a few quick questions: the form appears after an anonymous visitor sends their first message.
They type their name, email and phone, and the CRM matches them to an existing contact (email first, then phone) or creates a new one.
Typed details are not proof of who someone is, so a visitor recognised this way never unlocks the CRM summary described in Part 4. Ask Visitor Details explains this form in detail.
On WhatsApp there is nothing to set up. WhatsApp proves the customer’s phone number, so when the conversation is linked to a contact the agent knows exactly who it is talking to. Before each reply, the CRM gives the agent a short, private summary of that contact’s record, so it can answer as someone who already knows the customer, without asking again for things your business already holds.
The summary includes | Details |
|---|---|
The contact | Name, plus up to 8 key fields that have a value: for example lead status, lifecycle stage, owner, company, email, phone, tags, source, job title, city and country. |
Linked records | Deals and Tickets first, then records in other modules that look up the contact. Up to 4 records per module, open ones before closed ones. |
Activities | Up to 4 recent meetings, tasks, calls and notes linked to the contact, open ones first. |
Private notes, not a script. The agent is told the summary is internal and not to read it back word for word. It uses it to understand the customer.
Short and quick. The summary is capped at about 1,500 characters and is put together without any extra AI call, so it costs no extra AI credits and doesn’t slow replies down. If gathering it ever fails, the reply goes out normally without it.
Refreshed every few minutes. The summary is reused for up to 5 minutes, so a change you make in the CRM reaches the agent within about 5 minutes.
Same records your team sees. Linked records are collected the same way the contact’s detail page shows them, and modules that are switched off are left out.
visitor.email() (Part 1) recognises the customer, removes the form and links their chats, but it does not share their deals, tickets or notes with the agent. If you need the agent to use CRM history on your website, contact AiEngage support about signed visitor identity.Every chat from a recognised customer is saved to their existing contact, so your team sees the full history in one place.
Tickets they raise from the widget appear on their record, and they can follow them under My tickets in the widget.
In AI Agents → Conversations, website chats are still listed under the name Visitor. Open the customer’s contact to see their chats. See Conversations & Usage.
What you see | Why | What to do |
|---|---|---|
The chat form still appears for a signed-in customer | The visitor lines still hold the sample values, are missing on that page, or contain a sample address such as | Check the page source of a signed-in page: the two lines must contain the customer’s real name and email. |
The agent greets the customer by the wrong name | The contact’s name in the CRM is wrong, or two customers share one email. | Fix the name on the contact, and merge duplicate contacts. |
The previous customer is still recognised after signing out | The website doesn’t call | Add the logout call to your site’s sign-out action (Part 1, Step 7). |
A WhatsApp customer is treated as new | No contact has their number, or the number is saved without the country code. | Save the phone with the country code on the right contact (Part 2). |
The widget doesn’t appear at all | The widget is still a Draft. | Set it to Active and click Save changes. |
Do I need a developer?
Only for the two visitor lines in Part 1. They need the signed-in customer’s details from your website, so whoever manages your website templates should add them. Everything else is done in the CRM.
Is there a switch to turn recognition on for the AI agent?
No. There is nothing to switch on in the AI agent itself. On the website, recognition starts once your site passes the customer’s email. On WhatsApp, it is automatic.
Can a visitor pretend to be one of my customers?
Typing a customer’s email into the chat form links the chat to that contact, but the agent is not given the customer’s deals, tickets or notes, so nothing private is revealed. Keep the visitor lines for signed-in customers only, so your site never states an email for someone who hasn’t signed in.
What if the customer isn’t in my CRM yet?
The CRM creates a contact from the name and email your website passes, and recognises them on later visits.
I run more than one store. Will a customer’s chats mix between them?
Not if you give each store its own id with the optional visitor.account() line in the install script. Install the Chat Widget on Your Website explains how.
Does recognition use extra AI credits?
No. Recognising the customer and building the CRM summary don’t use any AI. Only the agent’s replies use credits, as usual.
On WhatsApp, customers are recognised automatically by their phone number, and the agent gets a short private summary of their CRM record.
On your website, open Customer Support → Settings → Chat Widget, find the install script and fill the visitor.name / visitor.email lines with the signed-in customer’s real details.
Call crmwidget('logout') when the customer signs out.
Keep contacts clean: one contact per customer, with the right email and a phone number that includes the country code.
Recognised customers skip the chat form, are greeted by name, see their past conversations and have every chat saved to their record.
Previous: Ask Visitor Details
Next: AI Agent Capabilities
OpenAI Engage and apply what you just learned to your own workspace.
Open AI Engage CRM