Skip to main content
Identify the customers who are already logged in to your shop or app, and your AI agent knows who it’s talking to from the first message. Nobody has to log in again or type their email and order number. A signed-in customer asks “Where is my order?” and gets the status of their latest order right away. Once a customer is identified, your agent can:
  • Answer with their data. Look up past orders, subscriptions, or contracts through Unitools or actions, using the customer’s email or the custom attributes you pass, such as a customer number.
  • Act on their behalf. Cancel an order, change a delivery address, or switch a plan. Gate these steps in a procedure with an audience that requires user.external_id_signed, so they only run for verified users.
  • Know their preferences. The agent sees the customer’s name, email, phone, language, and custom attributes like their plan, loyalty tier, or preferred store, and tailors every answer to them. Reference them in guidance, for example {{user.first_name}}.
  • Pick up where they left off. Customers see their past conversations on every device they sign in from.
botBrains tracks anonymous users by default. You can annotate additional user data via the Web SDK. New data will always overwrite old data.
We store phone numbers in E.164 (+4915168433056), but allow common variations such as +49 30 12345678 or +1 (415) 555-2671 for the input

Annotate Users

Arbitrary Data

You can also annotate custom values with the external_attributes JSON. By default we merge external attributes, keeping unset values, to deactivate merging the top level keywords set merge_external_attributes to false
The total JSON size of external_attributes must be below 8KB.

Session Continuity

A session allows users to retrieve their past conversations. By default, botBrains enables session continuity within the same browser and all subdomains. This means botBrains will still identify a user who goes to your landing page on www.acme.com and then signs into app.acme.com as the same user. You can opt-in to cross device session continuity by manually the user via the user.identify action in the SDK.

User Identification

User Identification must be implemented correctly on your part. Make sure to read the Security section to learn how.
The user_01234567890 key here is what we call the external_id of a user. Two users with the same external_id will be able to reach each others conversations.

🚨 Security 🚨 - READ THIS

Not following these recommendations make the conversations of your users vulnerable to impersonation. botBrains does not take responsibility for misconfigured systems.
Since we allow you to explicitly set if users are the same or different and thus retrieve sensitive information such as past conversations, we need to be careful in choosing the external_id. You have two options:
  1. User-Specific Secret Generate a random id, store it with your user, and send it to your frontend. Don’t use or leak this anywhere.
  2. Verified User ID (✅ Recommended) Your own user ID, in a token your back end signs with your project’s identity secret.

User-Specific Secret

You associate your user with a unique identifier (e. g. UUID) that other users should never know. Your app commonly leaks User Ids when it supports Teams, Collaborates, Share Links, and other features, so your user_id is usually a bad choice. Insecure External Ids are:
  • timestamps
  • email
  • phone
  • serial identifiers (e. g. user id 38992)
  • any text shorter than 16 characters (the system rejects these)
Good External Ids are:
  • UUIDs
  • anything with large entropy

Verified User Id

✅ Recommended
Your server signs a short-lived token for the logged-in customer with your project’s identity secret, and the Web SDK passes it to botBrains. botBrains then marks the user ID, email and phone from the token as verified. Identity Verification shows how to create the secret, sign the token on your server and hand it to the widget.

Finish

We’re happy to help you setup verified users, contact support@botbrains.io to schedule a quick meeting.