AccoilAccoil Developer Docs
Concepts

How Accoil Works

Understand Accoil's three-call data model and how users, accounts, and events relate in a B2B analytics system.

Accoil is built around a simple principle: B2B product analytics require two first-class entities -- users and accounts -- connected by the actions users take.

Everything you send to Accoil flows through three API calls. There are no other data ingestion methods to learn.

The three-call model

                    ┌─────────────────────────────────────────┐
                    │              Your Application            │
                    └──────┬──────────┬──────────┬────────────┘
                           │          │          │
                      identify()   group()    track()
                           │          │          │
                    ┌──────▼──────────▼──────────▼────────────┐
                    │           Accoil Ingress API             │
                    │         https://in.accoil.com            │
                    └──────┬──────────┬──────────┬────────────┘
                           │          │          │
                    ┌──────▼───┐ ┌────▼─────┐ ┌─▼───────────┐
                    │  Users   │ │ Accounts │ │   Events    │
                    │ (traits) │ │ (traits) │ │ (name only) │
                    └──────────┘ └──────────┘ └─────────────┘
CallWhat it doesCreates or updates
identifyRegisters a user and sets their traits (email, name, role)User profiles
groupRegisters an account, sets account traits, and links a user to itAccount profiles and user-account relationships
trackRecords that a user performed a named actionEvent stream

The B2B two-entity model

Most analytics tools treat users as the only entity. Accoil models both users and accounts as first-class objects because B2B products need account-level insight.

Users represent the individuals who interact with your product. Each user has a unique ID and traits like email, name, and role.

Accounts (called "groups" in the API) represent the organizations, teams, or companies that users belong to. Each account has a unique ID and traits like name, plan, MRR, and status.

A single user can belong to one account. Multiple users belong to the same account. This relationship is established through the group call.

  Account: Acme Corp (group_id: "acme_123")
  ├── User: alice@acme.com  (role: admin)
  ├── User: bob@acme.com    (role: member)
  └── User: carol@acme.com  (role: member)

When to call each

identify -- on user creation and login

Fire an identify call whenever a user is created, logs in, or updates their profile. This ensures Accoil has current user traits before any events are recorded.

group -- on account creation and changes

Fire a group call when an account is created, when a user is associated with an account, or when account traits change (plan upgrade, MRR update, status change).

track -- on meaningful user actions

Fire a track call whenever a user performs an action worth measuring. Only the event name is sent -- no properties. Choose events that reflect real product engagement, not every button click.

How it fits together

A typical integration fires calls in this order:

  1. User signs up -- send identify with user traits
  2. User is associated with an account -- send group with account traits
  3. User performs actions -- send track for each meaningful event

After this, Accoil calculates engagement scores at both the user and account level, giving your team visibility into product health, feature adoption, and account risk.

Next steps

On this page