Added in 24.2.
Note: Before setting the escalation permissions, make sure that you have configured Salesforce in your community. See Configure and set the salesforce integration.
In this guide, you will learn the following:
- Retrieve the escalation permissions
- Set the escalation permissions
- Escalate a case manually
- Configure the automatic escalations
- View the escalation details
We have introduced the following three permissions for escalating a case to Salesforce:
- escalateTopicTweet - Escalate any case to Salesforce.
- escalateOwnTopicTweet - Escalate one's own case to Salesforce.
- allowViewEscalations - View the escalation details.
Retrieve the escalation permissions
You can retrieve the escalation permissions at a core node or role level.
Here is an example GraphQL query to retrieve the escalation permissions:
Core node
query {
permissionsForCoreNode(id: "community:<YOUR AURORA COMMUNITY>") {
__typename
... on CommunityPermissions {
escalateTopicTweet {
access
}
escalateOwnTopicTweet {
access
}
allowViewEscalations {
access
}
allowManageEscalations {
access
}
}
}
}
Role
query {
permissionsForRole(
roleKey: { roleName: "SFTestRole", nodeId: "community:<YOUR AURORA COMMUNITY>" }
) {
__typename
... on CommunityPermissions {
escalateTopicTweet {
access
}
escalateOwnTopicTweet {
access
}
allowViewEscalations {
access
}
allowManageEscalations {
access
}
}
}
}
Here is the response to the GraphQL query:
Core node response
{
"data": {
"permissionsForCoreNode": {
"__typename": "CommunityPermissions",
"escalateTopicTweet": {
"access": "GRANTED"
},
"escalateOwnTopicTweet": {
"access": "DENIED"
},
"allowViewEscalations": {
"access": "DENIED"
},
"allowManageEscalations": {
"access": "DENIED"
}
}
}
}
Role response
{
"data": {
"permissionsForRole": {
"__typename": "CommunityPermissions",
"escalateTopicTweet": {
"access": "GRANTED"
},
"escalateOwnTopicTweet": {
"access": "DENIED"
},
"allowViewEscalations": {
"access": "DENIED"
},
"allowManageEscalations": {
"access": "DENIED"
}
}
}
}
Set the escalation permissions
You can set the escalation permissions at the following levels:
- Community
- Category
- Role
Here, we are going to grant the following permissions:
- Escalate one's own
- View the escalation details
- Manage the escalation
Note: This permission must be set at the community level.
Here is the mutation to set the escalations:
Community level
mutation {
setCommunityPermissions(
updateInput: {
escalateTopicTweet: { access: GRANTED }
escalateOwnTopicTweet: { access: GRANTED }
allowViewEscalations: { access: GRANTED }
allowManageEscalations: { access: GRANTED }
}
) {
result {
escalateTopicTweet {
access
}
escalateOwnTopicTweet {
access
}
allowViewEscalations {
access
}
allowManageEscalations {
access
}
}
}
}
Category level
mutation {
setCategoryPermissions(
categoryId: "category:sd"
updateInput: {
escalateTopicTweet: { access: GRANTED }
escalateOwnTopicTweet: { access: GRANTED }
allowViewEscalations: { access: GRANTED }
allowManageEscalations: { access: DENIED }
}
) {
result {
escalateTopicTweet {
access
inheritedAccess {
access
}
}
escalateOwnTopicTweet {
access
inheritedAccess {
access
}
}
allowViewEscalations {
access
inheritedAccess {
access
}
}
allowManageEscalations {
access
inheritedAccess {
access
}
}
}
}
}
Role level
mutation {
setCommunityPermissionsForRole(
roleName: "SFTestRole"
featureId: "core"
updateInput: {
escalateTopicTweet: { access: GRANTED }
escalateOwnTopicTweet: { access: GRANTED }
allowViewEscalations: { access: GRANTED }
allowManageEscalations: { access: DENIED }
}
) {
result {
escalateTopicTweet {
access
inheritedAccess {
access
}
}
escalateOwnTopicTweet {
access
inheritedAccess {
access
}
}
allowViewEscalations {
access
inheritedAccess {
access
}
}
allowManageEscalations {
access
inheritedAccess {
access
}
}
}
}
}
Here is the response to the mutation:
Community response
{
"data": {
"setCommunityPermissions": {
"result": {
"escalateTopicTweet": {
"access": "GRANTED"
},
"escalateOwnTopicTweet": {
"access": "GRANTED"
},
"allowViewEscalations": {
"access": "GRANTED"
},
"allowManageEscalations": {
"access": "GRANTED"
}
}
}
}
}
Category response
{
"data": {
"setCategoryPermissions": {
"result": {
"escalateTopicTweet": {
"access": "GRANTED",
"inheritedAccess": {
"access": "GRANTED"
}
},
"escalateOwnTopicTweet": {
"access": "GRANTED",
"inheritedAccess": {
"access": "DENIED"
}
},
"allowViewEscalations": {
"access": "GRANTED",
"inheritedAccess": {
"access": "DENIED"
}
},
"allowManageEscalations": null
}
}
}
}
Role response
{
"data": {
"setCommunityPermissionsForRole": {
"result": {
"readReplyOwnCases": {
"access": "GRANTED",
"inheritedAccess": {
"access": "DENIED"
}
},
"createDirectSupportCase": {
"access": "GRANTED",
"inheritedAccess": {
"access": "GRANTED"
}
},
"allowToCloseOwnCase": {
"access": "DENIED",
"inheritedAccess": {
"access": "DENIED"
}
},
"escalateTopicTweet": {
"access": "GRANTED",
"inheritedAccess": {
"access": "DENIED"
}
},
"escalateOwnTopicTweet": {
"access": "GRANTED",
"inheritedAccess": {
"access": "GRANTED"
}
},
"allowViewEscalations": {
"access": "GRANTED",
"inheritedAccess": {
"access": "DENIED"
}
},
"allowManageEscalations": {
"access": "DENIED",
"inheritedAccess": {
"access": "DENIED"
}
}
}
}
}
}
Escalate a case manually
You can escalate a case manually by using the escalateTopicCase
mutation.
In this example, we are going to escalate the message (ID: 390) to Salesforce with a reason and comment.
mutation escalateTopicCase {
escalateMessageToSalesforce(
id: "message:390"
includeAttachments: true
comments: "The discussion was opened for long time and the threshold limit has been exceeded."
reason: "Threshold limit exceeded."
) {
result
errors {
... on Error {
__typename
message
}
}
}
}
Here is the response to the GraphQL mutation:
{
"data": {
"escalateMessageToSalesforce": {
"result": true,
"errors": null
}
}
}
Configure the Automatic escalation
You can configure the automatic escalation for a specific role.
In this example, we are configuring the automatic escalation to a moderator role for the board (ID: testforum) and setting the escalation time in minutes to 2880.
mutation {
setCaseEscalationSettingsOnNode(
nodeId: "board:testforum"
settingsInput: {
enableManualThreadEscalation: false
enableManualMessageEscalation: false
enableUnansweredTopicAutomaticEscalation: true
unansweredTopicEscalationWaitTime: 2880
enableUnsolvedThreadAutomaticEscalation: true
unsolvedThreadEscalationWaitTime: 2880
automaticEscalationRoleList: "included"
automaticEscalationExcludedRoleList: ["Moderator"]
automaticEscalationIncludedRoleList: ["Moderator"]
stripHtmlFromMessages: true
}
) {
result
errors {
__typename
}
}
}
In the mutation, the following fields are described below:
- enableUnansweredTopicAutomaticEscalation - To escalate the unanswered discussion to Salesforce
- enableUnsolvedThreadAutomaticEscalation - To escalate the unsolved discussion to Salesforce
Here is the response to the GraphQL mutation:
{
"data": {
"setCaseEscalationSettingsOnNode": {
"result": true,
"errors": null
}
}
}
View the escalation details
You can view the escalation details when the allowViewEscalations
permission is granted to the user.
Here is the query to retrieve the escalation settings:
{
community {
caseEscalationSettings {
canSet {
failureReason {
message
}
}
enableManualThreadEscalation {
key
value
}
enableManualMessageEscalation {
key
value
}
enableUnansweredTopicAutomaticEscalation {
key
value
}
unansweredTopicEscalationWaitTime {
key
value
}
enableUnsolvedThreadAutomaticEscalation {
key
value
}
unsolvedThreadEscalationWaitTime {
key
value
}
automaticEscalationRoleList {
key
value
}
automaticEscalationExcludedRoleList {
key
value
}
automaticEscalationIncludedRoleList {
key
value
}
stripHtmlFromMessages {
key
value
}
ATLAS
Comments