Groups

Overview

The Groups service allows players to gather to chat and play together. This service allows players to create, join, and invite other players to groups. Group admins can also manage join requests and add members to or remove members from their group. The Groups service can be integrated with other services such as Lobby, Statistics, and Leaderboards, to extend its functionality. For example, you can create groups for players that have achieved a specific level or rank in your game.

How It Works

Group Types

There are three types of groups that can be created:

  • Open Groups are searchable and do not require any approval to join. A player can search for the group using the Group Name or Group Code, and then join the group without waiting for a group admin to approve their request.
  • Public Groups are searchable, but require permission to join. When a player tries to join, they must first wait for a group admin to approve their request. These groups often have membership requirements, such as only allowing players with an MMR more than 100 to join the group.
  • Private Groups can’t be searched and require permission to join. Players can only join these groups if they’ve been invited by an admin.

Integration with Other Services

The Groups service is integrated with other services such as Lobby, Statistics, Leaderboards, and Achievements to maximize the usability of the group. Integration with these services allows for the creation of groups based on member rank, score, and achievements. After the group has been created, the Lobby service will automatically prepare a chat room for the group.

group

Tutorials

Make sure you’ve read about Roles Management to know the basics of creating a role.

Create a New Group Role

Create a New Group Role in the API

  1. Use the Create New Member Role: POST - /group/v1/admin/namespaces/{namespace}/roles endpoint.
  2. Input the Namespace where the group belongs.
  3. Fill out the Request Body.
    • Input the Member Role Name, e.g. Group Admin.
    • Fill out the Member Role Permissions.
      • Define the Action of the permission. Input 1 if you want the role to be able to invite members to the group.
      • Input the Resource of the permission with the appropriate format, e.g. GROUP:INVITE to make the role able to invite members to the group.

Create a New Group Role in the Admin Portal

  1. On the Group Roles page in the Admin Portal, click the Add Role button.

    group

  2. A pop up window appears. Here, input the Role Name for your new role. Click Submit when you’re done.

Add New Permissions to a Group Role

Add New Permissions to a Group Role in the API

  1. Use the Update Member Role Permission: PUT - /group/v1/admin/namespaces/{namespace}/roles/{memberRoleId}/permissions endpoint.

  2. Input the Member Role ID.

  3. Fill out the Request Body.

    • Input the Member Role Name, e.g. Group Admin.
    • Input the Member Role Permissions.
      • Define the Action of the permission. Input 1 if you want the role to be able to invite members to the group.
      • Input the Resource of the permission with the appropriate format, e.g. GROUP:INVITE to make the role able to invite members to the group.

Add New Permissions to a Group Role in the Admin Portal

  1. In the Admin Portal, go to the Group Role you created earlier, and in the Group Role Detail click the Add Permission button.

    group

  2. A pop up window appears. Fill in the required fields:

    • Input the Permission with the appropriate format.
    • Choose the Action of the permission.

    group

    Click Add when you’re done.

Create a New Group Configuration

Create a New Group Configuration in the API

  1. Use the Create New Configuration: POST - /group/v1/admin/namespaces/{namespace}/configuration endpoint.

  2. Input the Namespace where you want to place your configuration. This is usually a game namespace.

  3. Fill out the Request Body.

    • Input the Configuration Code with the appropriate format.

    • Input a Description of the configuration.

    • Fill out the Global Rules section. This is used to limit players from joining the group based on the players’ statistical attributes.

      • Input the Allowed Action for the rule. For now, the only available value is createGroup, which allows players to create a group.

      • Fill out the Rule Detail section.

        • Input the Rule Attribute with the statCode related to the desired player attribute.
        • Input the Rule Criteria. The available values are EQUAL, MINIMUM, and MAXIMUM.
        • Input the Rule Value with the desired statistic value.

        Here is an example of a Global Rule. This rule requires that a player has a score of at least 100 to be able to create a group.

        "globalRules": [
        {
        "allowedAction": "createGroup",
        "ruleDetail": [
        {
        "ruleAttribute": "score",
        "ruleCriteria": "MINIMUM",
        "ruleValue": 100
        }
        ]
        }
        ],
        • Input the Group Admin Role ID.
        • Input the maximum number of group members in the groupMaxMember field.
        • Input the Group Member Role ID.
        • Input a Name for the group configuration.

Create a New Group Configuration in the Admin Portal

  1. On the Group Configurations page of the Admin Portal, click the Add Configuration button.

    group

  2. Once the form appears, fill in the fields as shown below:

    • Input the configuration Code with the appropriate format. E.g. group-clan.
    • Input the configuration Name.
    • Input athe Description of the configuration.
    • Input the Maximum Group Members.
    • Select the Group Admin Role.
    • Select the Group Member Role.

    group

  3. Click Add. Your new configuration will be added to the list.