Skip to content

User & Company

You can identify users in Crisp by providing their details through the User and Company classes. This information appears in the Crisp dashboard alongside the conversation.

User

The User class holds personal details about the chat user. All fields are optional.

dart
final user = User(
  email: 'jane@example.com',
  nickName: 'Jane Smith',
  phone: '+1234567890',
  avatar: 'https://example.com/jane-avatar.png',
  company: myCompany, // See Company section below
);

User Fields

FieldTypeDescription
emailString?User's email address (validated format)
nickNameString?Display name shown in the Crisp dashboard
phoneString?Phone number
avatarString?URL to the user's avatar image
companyCompany?Company details (see below)

Email Validation

If you provide an email, it must be a valid email format. openCrispChat will throw an ArgumentError if the email is invalid.

Company

The Company class provides information about the user's organization.

dart
final company = Company(
  name: 'Acme Corporation',
  url: 'https://acme.com',
  companyDescription: 'Building innovative solutions for modern businesses.',
  employment: Employment(
    title: 'Senior Developer',
    role: 'Engineering',
  ),
  geoLocation: GeoLocation(
    city: 'San Francisco',
    country: 'USA',
  ),
);

Company Fields

FieldTypeDescription
nameString?Company name
urlString?Company website URL (validated format)
companyDescriptionString?Short description of the company
employmentEmployment?User's role within the company
geoLocationGeoLocation?Company location

Employment

FieldTypeDescription
titleString?Job title (e.g., "Software Engineer L-II")
roleString?Department or role (e.g., "Engineering")

GeoLocation

FieldTypeDescription
cityString?City name
countryString?Country name

Full Example

dart
final config = CrispConfig(
  websiteID: 'YOUR_WEBSITE_ID',
  tokenId: 'user_12345',
  user: User(
    email: 'jane@acme.com',
    nickName: 'Jane Smith',
    phone: '+1-555-0123',
    avatar: 'https://avatars.githubusercontent.com/u/12345',
    company: Company(
      name: 'Acme Corporation',
      url: 'https://acme.com',
      companyDescription: 'Innovative solutions for modern businesses.',
      employment: Employment(
        title: 'Senior Developer',
        role: 'Engineering',
      ),
      geoLocation: GeoLocation(
        city: 'San Francisco',
        country: 'USA',
      ),
    ),
  ),
);

await FlutterCrispChat.openCrispChat(config: config);

How It Appears in Crisp

When user and company details are set, they appear in the Crisp dashboard sidebar next to the conversation. Your support agents can see the user's name, email, company, and other details without asking.

TIP

Set user details before calling openCrispChat. The details are sent to Crisp when the chat is opened.

Next Steps