Product

Why does it take more than a name to identify a customer?

A shared browser can reopen the wrong support conversation. Follow Camille and Samir to see how customer identity works in the Messenger.

Written by Salian Diakite

A person returns to a lit doorway, followed by a golden thread connecting messages.
Recovering a conversation requires recognising the current account at every stage of the journey.

Camille opens the Messenger from her customer account. Her name appears, her conversation is there, and she can continue her question without explaining everything again. The integration looks successful. A few minutes later, she signs out and Samir uses the same browser. What should he find when he opens the panel?

Seeing Samir’s name does not answer that question. The recognised account, accessible conversations, and context passed to the team must all match his login. Changing a label while leaving Camille’s conversation on screen would give the wrong person an impression of continuity.

Camille and Samir are two fictional test accounts here. Following them in sequence lets us look at the Messenger as part of signing in, switching accounts, and leaving, rather than a button installed once and forgotten.

Continuity starts with a stable account

Identification connects the Messenger to an account known by your application. A signed-in person can then find their conversations. Your team keeps a recognisable contact instead of having to reconstruct the context with every exchange.

That continuity relies on a stable identifier. A name can change; an email address can be updated or shared by two distinct accounts. In Khony, those accounts must remain distinguishable by their identifiers, even when their addresses look similar or are identical.

If identifiers in your application are unique only within an organisation, accounts also need to be distinguished across organisations. Settle this with your developer before passing the identity: adding a fuller name will not fix an identifier collision.

The browser carries a proof

The Messenger cannot assume that someone is Camille because a script sends the name “Camille.” In a Khony integration, your server reads the authenticated session and signs a proof for the relevant product. The browser passes that proof to the Messenger.

  1. Your application knows the session

    Camille has already signed in through your usual system. The Messenger neither creates that login nor decides her permissions within your application.

  2. Your server attests the account

    The identity endpoint checks the current session and issues a new proof for its identifier. It does not choose the account from a name or identifier freely supplied by the browser.

  3. The Messenger receives the proof

    Khony verifies the proof before opening a Messenger session for that account. The identity provider contacts your server again whenever the Messenger needs a fresh proof.

This separation explains why pasting a snippet into a page is not enough to complete identification. The script installs the Messenger; connecting it to your session also requires server-side work. Keep the complete examples in the identification guide as your technical reference, rather than an abbreviated copy of this article.

What changes when Samir takes over

Return to the shared browser. When Samir signs in after Camille, the integration must obtain a proof from Samir’s session and identify that new account. Reusing the proof kept from the initial page load would tie identity to the first person who happened to use the page.

The change can happen without a full application reload. Connect it to the real sign-in or account-switching flow. A Messenger that stays visible in the corner does not automatically follow every change to your session.

A less visible case also deserves a test: Camille’s identity request starts slowly, then Samir signs in before it finishes. A late response must not restore Camille. The provider receives an abort signal; the guide’s example passes it to the request sent to your backend.

Plan for a missing proof

An expired session and a network failure mean different things. In the guide’s simple provider, a 401 response means that no signed-in account can be attested, so it returns no identity. A network error or unsuccessful server response should be treated as a failed request.

In either case, falling back to an old token to “keep the Messenger working” is the wrong repair. The integration should make the failure understandable and allow a retry with a fresh proof. It should not conceal uncertainty about the account behind the appearance of a successful login.

The same principle applies after a reload or on another device: start from the actual application session. Additional attributes should help support do its work; they can never compensate for an incorrect identity.

Signing out is part of the integration

Camille leaves her account using your application’s usual button. That flow must also call the Messenger’s logout operation. Closing its panel, hiding its button, or removing a page component does not replace clearing the identified context.

The guide waits for the Messenger logout call to finish before continuing application logout and any redirect. The next person must then obtain their own proof. Test this connection using your application’s actual button, not only a call made manually in the console.

With the simple provider described in the guide, logout clears the local context and can finish offline. It does not confirm remote revocation. The advanced contract that waits for server confirmation has different conditions and can fail; choose and implement it explicitly if you need it.

Test with two people

A single account will not reveal handoff errors. Use two distinct test accounts and recognisable messages. In the Inbox, check which person and product each conversation belongs to.

  • Sign in as Camille, send a test message, then reload the page. Her conversation should remain associated with the right account after identification runs again.

  • Sign Camille out through the actual flow, then sign Samir in. He must not find Camille’s exchanges, even if the two accounts share an email address in your system.

  • Keep a second tab open, switch accounts in the first, then return to the second. Check which account is actually attested when that tab resumes.

  • Slow an identity request, switch accounts, then let the earlier response arrive. Also test interrupted identification and offline logout with the simple provider.

Appearance alone cannot validate this flow. A visible space may depend on product settings; a displayed name may be an attribute. The decisive question remains: can this account access only the context that belongs to it?

If you are preparing the integration, start with the Messenger overview, then follow installation and user identification. Those guides provide the examples to connect to your application and the checks to repeat whenever its sign-in journey changes.

Listen. Decide.
Close the loop.

Try Pro features for 14 days with $5 in AI credits valid during the trial. No credit card required.

  • 14-day trial
  • No credit card
  • Unlimited customers and votes