Added in 24.2.
A badge is a type of visual reward that community members can earn for completing specific community actions or community milestones. Badges are a great way to encourage members to use different community features and spend more time engaging with the community.
Badge sets are groups of related badges that are often used to reflect progress in a particular achievement. For example, a badge set titled Likes could have badges in it that reflect a member receiving 10 likes, 20 likes, 50 likes, 100 likes, and so on.
Enable the badge feature
In this section, you will learn how to enable the badge feature.
Note: Only the Administrator role can enable the badge feature.
Here is the GraphQL mutation and variable to enable the badge feature.
mutation SetBadgeSettingsOnCommunity(
$settingsInput: CommunityBadgeSettingsInput!
) {
setBadgeSettingsOnCommunity(settingsInput: $settingsInput) {
result
errors {
... on Error {
message
fields
__typename
}
}
}
}
Here is the variable to accompany the mutation.
{
"settingsInput": {
"enabled": true
}
}
Here is the response to the mutation and the variable.
{
"data": {
"setBadgeSettingsOnCommunity": {
"result": true,
"errors": null
}
}
}
Disable the badge feature
Here is the GraphQL mutation and variable to disable the feature.
mutation SetBadgeSettingsOnCommunity(
$settingsInput: CommunityBadgeSettingsInput!
) {
setBadgeSettingsOnCommunity(settingsInput: $settingsInput) {
result
errors {
... on Error {
message
fields
__typename
}
}
}
}
Here is the variable to accompany the mutation.
{
"settingsInput": {
"enabled": false
}
}
Here is the response to the GraphQL mutation and variables.
{
"data": {
"setBadgeSettingsOnCommunity": {
"result": false,
"errors": null
}
}
}
ATLAS
Comments