Insights

Personalized customer interactions with an AI chatbot

Personalization with an AI chatbot goes beyond a first name. Learn the three levels, how to identify logged-in users securely, pass page context and keep it respectful.

By the Askocto team · · 4 min read

Personalized customer interactions with an AI chatbot work on three levels: knowing who the customer is, knowing where they are in your product or store, and knowing their account data. Each level needs a different setup, and each has limits worth setting up front. This article shows how to implement all three, with a code example for identifying logged-in users securely.

In short: Identify the customer, pass the context of the page they are on, let procedures use account data when it helps and never use data in ways the customer would find surprising.

The three levels of personalization

Level What the chatbot knows Example effect
1. Identity Name, email, plan "Hi Maria, I can see you are on the Growth plan."
2. Context The page, the cart, the step in a flow Answers about the product the customer is viewing
3. Account data Orders, bookings, tickets, usage "Your order shipped on Tuesday and arrives tomorrow."

Imagine a software company with a billing question that comes up every week. At level 1, the chatbot greets the customer by name. At level 2, it knows the customer is on the invoices page. At level 3, it reads the last invoice and explains the charge. Each step makes the answer shorter and more exact, and each step needs more care with data.

Start with levels 1 and 2, which need little data. Add level 3 where it saves the customer a step, such as looking up an order. AI personalization covers the wider picture beyond support.

Level 1: identify logged-in customers

If customers log in to your site or app, you can tell the chatbot who they are. This matters for two reasons: the answers become personal, and the conversation history stays linked to the right person across visits.

In Askocto, you identify a user on the page with window.askocto.identify. To prevent someone from pretending to be another user, your server signs the user id with the agent's identity secret and passes the result as userHash.

On your server (Node 20+):

import { createHmac } from "node:crypto";

export function userHash(userId) {
  return createHmac("sha256", process.env.OCTO_IDENTITY_SECRET)
    .update(String(userId))
    .digest("hex");
}

In the page, after the user logs in:

window.askocto.identify({
  userId: "42817",
  userHash: "<value from your server>",
  name: "Maria Costa",
  email: "maria@example.com",
  metadata: { plan: "Growth" },
});

Never put the identity secret in browser code. The identity verification guide has the full steps.

Level 2: pass context from the page

A customer on a pricing page asks about plans differently from one on a checkout page. Use window.askocto.setContext to pass the facts that change the answer.

window.askocto.setContext({
  page: "checkout",
  cartItems: 2,
  country: "NL",
});

Keep the context small and relevant, and name the keys the same way on every page so procedures can rely on them. A cart value and the page name help. A full browsing history does not, and it raises privacy questions you do not need.

Level 3: use account data through actions

The most useful personalization is a correct answer about the customer's own situation. That needs data from your systems, which the agent gets through actions, such as a Shopify lookup or a custom HTTP request to your own API. A procedure then tells the agent when to use it:

Order status
1. Ask for the order number, unless the customer is identified.
2. Look up the order.
3. Tell the customer where it is and when it should arrive.
4. If the order is late, offer to bring in a colleague.

Askocto lets you write procedures like this in plain language under Build > Procedures, and add actions under the Actions tab. Start with read-only lookups so the agent can see but not change anything.

Make it personal without being creepy

Personalization fails when it surprises people. A few rules help.

  • Use data the customer expects you to have. Their order, yes. Their browsing on other sites, no.
  • Say where it comes from. "I can see your last order" is clearer than answering as if by magic.
  • Do not personalize sensitive topics. If the customer mentions a health problem or a bereavement, respond with care and bring in a person.
  • Collect only what you need. Every attribute you store is something to protect. See GDPR compliant chatbot checklist for the review questions.
  • Let customers correct you. If the chatbot gets a detail wrong, it should accept the correction.

Tone is part of personalization

A formal tone suits a bank, a casual one suits a surf shop. Set a voice that fits your brand and your customer, then keep it consistent on every channel. Chatbot persona gives a method for defining one, and multichannel chatbot guide explains how to carry it across channels.

Measure whether it helps

Compare a few numbers before and after you add personalization:

  • Resolution rate on topics that use account data
  • Number of messages before the customer gets an answer
  • Repeat contact on those topics
  • Customer ratings on identified conversations

If a personal touch does not shorten the path to an answer, remove it. You can see how widgets and actions work together on the widgets page.

Frequently asked questions

How do I personalize an AI chatbot?

Identify logged-in users, pass the page context and connect your order or account data through actions. Then write procedures that use that data in the situations where it saves the customer time.

Is it safe to pass user data to a chatbot?

It can be, if you sign identity with a server-side secret, pass only what you need and mask sensitive data. Review it with your data protection lead, since this is not legal advice.

Can a chatbot remember past conversations?

When customers are identified, their conversations can be tied to their contact record, so your team sees the history in one place. Decide how long you keep it as part of your retention policy.

What data should I avoid using for personalization?

Avoid sensitive categories and anything the customer would not expect you to know. If the agent does not need it to solve the problem, leave it out.

Train an agent on your own help center

Askocto answers the repeat questions across chat, email and voice and hands the hard ones to your team.

Keep reading

All articles
Insightstypes of chatbots
Mar 14, 20265 min read

Types of chatbots and how to pick the right one

There are five main types of chatbots. Learn how each one decides what to say, what it can do besides talk, and which type fits the conversations your customers start.

Read article