For the complete documentation index, see llms.txt. This page is also available as Markdown.

Specify the User for Consumer App by providing an external user ID

This page explains how you can pass your external user IDs to the Consumer App and link them with Haut.AI's user names in the Consumer App

Haut.AI has a concept of subject to store and process data separately for different real users. You can read more about subjects here: Subjects

Option 1: Automatic User Detection by Haut.AI

By default, the Consumer Apps identifies the user automatically by device + browser fingerprint.

  • New User: When a new fingerprint is identified, a new subject will be created. The subject will be assigned an automatically generated internal ID -subject_ID;

  • Existing User: When the same device + browser fingerprint is used to access the Consumer Apps again (read: same user returned to the app), the Consumer Apps will automatically identify the already existing subject.

When is this option applicable?

  • If your product (website or mobile application) has no authentication feature.

  • If your product has an authentication feature, but your users can access the Consumer App without it (for example, the Consumer App is a part of the lead generation funnel, leading to the registration page)


Option 2: Define User via External User ID passing

You can optionally pass your external user IDs to the Consumer App's name parameter.

  • New User: When you pass an external user ID as a name that does not yet exist in SaaS, a new subject will be created. The subject will be assigned an automatically generated internal ID -subject_ID, — and a name equal to your external user ID;

  • Existing User: When you pass an external user ID as a name that already exists in the SaaS, the Consumer Apps will use the existing subject.

When it is applicable

  • If your product has an authentication feature, and users are assigned user IDs, and the Consumer App experience starts after your user logins to your system.

Benefits

By linking your external user IDs with Haut.AI's name parameter, you will:

  • Enable better tracking of users, especially in multi-tenant applications.

  • Enhance the ability to better segment and analyze user behavior (for example, compare the behavior of users who did and did not use Consumer App).


Each Consumer App has a unique URL that allows you to open it as a separate webpage or integrate it (see Integrate Consumer App to your e-Commerce Website). You can find the link here: Previewing your Consumer App.

The URL has the following format:

What does each parameter in URL mean?
  • app_id: The unique identifier for your Consumer Apps. Never change this parameter.

  • company_id: The identifier of your company within Haut.AI SaaS. Never change this parameter.

  • company_cid: A client identification number of your company. Never change this parameter.

  • utm_campaign: Used for tracking the campaign that led the user to the app. This parameter is optional — you can change it to label different channels, or remove it entirely.

Example

Let's say your user has a user ID in your system as User123. When correctly implemented, your URL for your Consumer Apps should look like this:

Recommendations for Implementation (for Developers)

  • Your frontend application should be configured to inject parameter name to the URL in the iframe when the user accesses the application. Typically, this is done in the app's initialization code.

  • Validate the incoming query parameters to prevent potential security vulnerabilities, such as injection attacks.


Find External User ID in Haut.AI SaaS

When the user that is identified via an external user ID (&name=<external_user_id>) finishes the Consumer App session, you will see in SaaS a new Subjects. This subject will have:

  • Subject ID: Haut.AI internal user ID, generated automatically.

  • Name: your <external_user_id> user will be here.

You will be able to see External User ID in the SaaS User Interface on a page of Datasets > Subjects

External User ID visible in SaaS UI

You will also be able to export this information via CSV export from Dataset (see Export Results as CSV file):

External User ID present in CSV Export

Book a demo external-linkPlatform overview on haut.ai

Last updated