Spec: B2B SaaS

This guide explains how B2B SaaS companies should send core user and account lifecycle data to Segment.

Overview

Most B2B SaaS companies have a few common, core lifecycle events for users and accounts. We understand that account hierarchies can be unique and complex, but by following this spec you can take advantage of account-based tools on Segment platform, and B2B SaaS data products by Segment.

Events

The B2B SaaS category has the following semantic events:

Account Created

This event should be sent when a new account is created.

Properties

This event supports the following semantic properties:

PropertyTypeDescription
account_nameStringThe name of the account being created.
context.groupIdStringThe id of the account being created.

Example

Account Deleted

This event should be sent when an account is deleted.

Properties

This event supports the following semantic properties:

PropertyTypeDescription
account_nameStringThe name of the account being deleted.
context.groupIdStringThe id of the account being deleted.

Example

Signed Up

This event should be sent when a user signs up for your service.

Properties

This event supports the following semantic properties:

PropertyTypeDescription
typeStringThe type of signup, e.g. invited, organic.
first_nameStringThe first name of the user.
last_nameStringThe last name of the user.
emailStringThe email of the user.
phoneStringThe phone number of the user.
usernameStringThe username of the user.
titleStringThe title of the user.
context.groupIdStringThe id of the account the user is joining.

Example

Signed In

This event should be sent when a user signs in to your service.

Properties

This event supports the following semantic properties:

PropertyTypeDescription
usernameStringThe username of the user logging in.
context.groupIdStringThe id of the account being created.

Example

Signed Out

This event should be sent when a user signs out for your service. You should also call analytics.reset() to refresh the cookie when a Signed Out event occurs.

Properties

This event supports the following semantic properties:

PropertyTypeDescription
usernameStringThe username of the user logging in.
context.groupIdStringThe id of the account being created.

Example

Invite Sent

This event should be sent when a user invites another user.

Properties

This event supports the following semantic properties:

PropertyTypeDescription
invitee_emailStringThe email address of the person receiving the invite.
invitee_first_nameStringThe first name of the person receiving the invite.
invitee_last_nameStringThe last name of the person receiving the invite.
invitee_roleStringThe permission group for the person receiving the invite.

Example

Account Added User

This event should be sent when a user is added to a group.

Properties

This event supports the following semantic properties:

PropertyTypeDescription
roleStringThe permission group for this user in this account.
context.groupIdStringThe id of the account being created.

Example

Account Removed User

This event should be sent when a user is removed from a group or account.

Properties

This event supports the following semantic properties:

PropertyTypeDescription
context.groupIdStringThe id of the account being created.

Example

Trial Started

This event should be sent when a trial is started.

Properties

This event supports the following semantic properties:

PropertyTypeDescription
trial_start_dateDateThe date when the trial starts. It is an ISO-8601 date string.
trial_end_dateDateThe date when the trial ends. It is an ISO-8601 date string.
trial_plan_nameStringThe name of the plan being trialed.
context.groupIdStringThe id of the account being created.

Example

Trial Ended

This event should be sent when a trial ends.

Properties

This event supports the following semantic properties:

PropertyTypeDescription
trial_start_dateDateThe date when the trial starts. It is an ISO-8601 date string.
trial_end_dateDateThe date when the trial ends. It is an ISO-8601 date string.
trial_plan_nameStringThe name of the plan being trialed.
context.groupIdStringThe id of the account being created.

Example



Questions? Need help? Contact us!
Can we improve this doc?
Email us: docs-feedback@segment.com!