Navigation

Groups

Groups are collections of user accounts. Groups represent company or team structures specific to your implementation.

Benefits of using groups

Groups can be very useful for exploring statistics for specific subsets of your users. For example, you may want to explore how many people, active users or shared users associated with a group.

Many B2B applications use groups to represent companies or teams. This allows you to explore usage statistics for specific companies or teams.

Group list screen

More specific usage statistcs for the group can be found on the group detail screen. View the account list, location and usage heatmap.

Group detail screen

Using metadata, you can also tie specific information to groups. For example, you may want to track subscriptions/plans for your users at the group level. This metadata can be specified in the attach function. For more information, please refer to the device attachment documentation.

await Rupt.attach({
  ...
  groups: [{
    id: "group_id",
    metadata: {
      plan: "pro",
    }
  }]
});

Adding groups

Adding an account to groups is as simple as specifying the groups in the attach function. For more information, please refer to the device attachment documentation.

await Rupt.attach({
  client_id: "client_id",
  account: "user_id",
  groups: [{
    id: "group_id",
    name: "Group name",
    metadata: {
      key_1: "value_1",
      key_2: "value_2",
    }
  }]
});