Skip to main content

Groups

Groups (called SourceAuthorCompany internally) represent companies or organizations that your users belong to. They're useful for B2B products where you want to segment feedback by company.

How groups work

Call the group function to associate a user with a company. Each group is identified by a unique groupId within a source.

Web

told('group', 'company_456', {
name: 'Acme Corp',
industry: 'SaaS',
employees: '50',
plan: 'enterprise'
});

Android (Kotlin)

Told.group("company_456", mapOf(
"name" to "Acme Corp",
"industry" to "SaaS"
))

iOS (Swift)

Told.group(id: "company_456", properties: [
"name": "Acme Corp",
"industry": "SaaS"
])

What is stored per group

FieldDescription
groupIdRequired. Unique company identifier in your database
sourceThe source this group belongs to
customDataKey-value object with all traits you send
groupSizeNumber of associated users

Supported custom data fields

These fields have semantic meaning in Told:

TraitTypeDescription
idStringUnique group ID (same as groupId)
nameStringCompany name
emailStringCompany email
phoneStringPhone number
websiteStringWebsite URL
industryStringIndustry
employeesStringNumber of employees
planStringCurrent plan/subscription
avatarStringLogo/avatar URL
addressObjectPostal address (city, country, postalCode, street, state)
descriptionStringCompany description
createdAtDateCreation date (ISO-8601)

Any additional key-value pairs are stored in customData for audience filtering.

When to call group

  • When a user creates a new company
  • When a user joins an existing group
  • When group information changes
tip

To remove a trait, call the function and set the trait value to null.

Import groups

Bulk import groups:

  1. Go to your source's Audience section → Companies tab
  2. Click Import
  3. Upload a JSON or CSV file

Each entry must include a mandatory id field. Include a users field with a list of user IDs to associate. If a user doesn't exist, they will be created.

Viewing groups

Groups are visible in the Companies tab of your source's Audience section. Click on a company to see a drawer with its details and associated users.

Using groups for targeting

Group traits can be used as filters in audiences for targeting surveys to users of specific companies.