Any user associated with the community (the owner or a member) can invite other users from their network to the community.
Members can invite others only to the public communities.Users associated with the ADMINISTRATOR scope can invite to the community any user, not only the ones from their network.
Community invitations enhance social engagement by allowing users to invite other users from their network to join communities.
| Parameter | Type | Description |
|---|
id | ID | Required. ID of the community invitation entity. |
initiatorUserContext | UserContext | Required. The loaded user context associated with the user who created the community invitation. |
inviteeUserContext | UserContext | Required. The loaded user context associated with the invitee. |
community | Community | Required. Community that is related to the invitation. |
created | Int | Required. Timestamp when the community invitation was created. |
cta | Cta | The list of the available CTA. |
| Action ID | Description | Corresponding mutation |
|---|
ACCEPT_COMMUNITY_INVITATION | Available for the user associated with the invitee context. Allows to accept the invitation and, as a result, become the community member. | acceptCommunityInvitation |
DECLINE_COMMUNITY_INVITATION | Available for the user associated with the invitee context. Allows to decline the given community invitation. | declineCommunityInvitation |
CANCEL_COMMUNITY_INVITATION | Available for the user associated with the community owner context. Allows to cancel the given community invitation. | cancelCommunityInvitation |
To invite a new member, the createCommunityInvitation mutation should be executed. It accepts the following arguments:
| Argument | Type | Description |
|---|
communityId | ID | Required. ID of the community to invite a user. |
inviteeUserContextId | ID | Required. The user context ID to be invited to the community. |
mutation createCommunityInvitation {
createCommunityInvitation(communityId: 2, inviteeUserContextId: 345) {
errors
response {
id,
community {
id
},
created,
cta {
actionId
arguments {
key
value
}
}
}
}
}
After the successful mutation execution, the community invitation will be created.
Then it can be accepted
or declined by the invitee
or cancelled by the community owner
or users associated with the ADMINISTRATOR scope, if it was not accepted yet.