Frigade allows you to group users together in organizations. This is especially useful for building Targeting rules based on actions that only needed to be completed once across an entire organization (e.g. connect an organization’s bank account). Once you set an organization ID for a user, they will automatically be added to that organization in Frigade.

Updating the organization ID

Organization can be provided to Frigade through a series of methods. If you don’t provide a organization ID, Frigade will generate a guest organization id for you. Organization IDs can be provided at time of render in the <FrigadeProvider /> component or at any time using the setOrganizationId method:

import { useOrganization } from '@frigade/react';

const { setOrganizationId } = useOrganization();

setOrganizationId('1234');
Make sure to call any Frigade hook within the context of <FrigadeProvider />

If you want to set an organization’s properties in the same call, you can do so by using the setOrganizationIdWithProperties method:

import { useOrganization } from '@frigade/react';

const { setOrganizationIdWithProperties } = useOrganization();

setOrganizationIdWithProperties('1234', {
  name: 'Acme Inc.',
  logo: 'https://acme.com/logo.png'
});

Adding custom organization properties

You can add custom properties to an organization that can be used within Frigade to personalize the product experience. For instance, you could add a property for company size or industry and then use those properties for targeting to build personalized onboarding for startups in healthcare vs enterprises in finance.

import { useOrganization } from '@frigade/react';

const { addPropertiesToOrganization } = useOrganization();

addPropertiesToOrganization({
  name: 'Acme Inc.',
  logo: 'https://acme.com/logo.png'
});

Tracking events for the organization

Similar to organization properties, tracking events can also be attached to organizations and allow you to personalize the onboarding experience of an organization with targeting based on when or how often they take certain actions in your product.

import { useOrganization } from '@frigade/react';

const { trackEventForOrganization } = useOrganization();

trackEventForOrganization('bank-account-connected', {
  provider: 'Bank of America'
});

Standardized fields

When setting organization properties, Frigade automatically detects and stores the following fields on the organization:

  • logo - a url for a company logo
  • name - the name of the organization