Ratnakar7
Mega Sage
Mega Sage

If you're looking to streamline communication and provide your organisation's users with features such as ticket status checks, issue/request submissions, and service desk chats via organisation's existing Slack bot, then this article is for you.
Here's how you can simplify communication by integrating your self configured Slack bot with ServiceNow's virtual agent.

 

Step 1: Plugin Installation
Obtain the Virtual Agent plugin (com.glide.cs.chatbot) and Conversational Integration with Slack(sn_va_slack)  

Fig1.pngFig1.1.png
Make sure you update Omni-Experience Standard Feature Set (sn_oe_sfs) plugin.
Fig 1.2.png

Step 2 :  Create a bot in Slack
 -> Log in to Slack API.

-> Navigate to Your Apps and click Create New App, select 'From Scratch' option.

Fig2.png

-> Navigate to Interactivity > Shortcuts in the left menu and turn on InteractivityUpdate the Request URL

Fig 4.png

the request URL must be https://<instance-name>/api/now/v1/cs/adapter/slack/actions.

-> Configure Event Subscriptions - Click Event Subscriptions in the left menu and turn on Enable Events.

Update the Request URL (the request URL must be https://<instance-name>.service-now.com/api/now/v1/cs/adapter/slack/events.)

Fig 5.png

 

--> Under Subscribe to bot events, click Add Bot User Event and add message.im. And Click Save

 

Fig 5.1.png

--> Navigate to the Incoming Webhook tab and slide the Activate Incoming Webhooks toggle switch to enable it.

 

Fig 6.png

--> Configure OAuth & Permissions. : 

     - Click OAuth & Permissions from the left menu and navigate to Scopes > Bot Scopes.

     - Select Add an OAuth Scope and add the following scopes:

  • chat:write
  • files:read
  • files:write
  • im.history
  • incoming-webhook
  • team:read
  • users:read
  • users:read.email
Fig 7.png

 

--> Navigate to OAuth & Permissions, click Install to Workspace.

Fig 8.png

 And click Allow

Ratnakar7_0-1702452734220.png

 

--> Navigate to App Home and click on checkbox -'Allow users to send Slash commands and messages from the messages tab'  under Show Tabs -> Message tab.

Fig 9.png

Step 3:  Copy Integration attributes.

 Take a note of integration attribute from slack as below:

 --> On the Basic Information page, expand the App Credentials section and then copy the values in the Signing Secret fields. Save it in a secure location for later use.

Fig 13.png
--> On the Basic Information page, expand the Display Information section and then copy the values in the App Name fields. Save it in a secure location for later use.
Screenshot 2023-12-14 at 2.14.45 PM.png
--> On the OAuth & Permissions page, copy the values in the Bot User OAuth Token fields. Save it in a secure location for later use.
Fig 14.png

--> Launch the Slack workspace in browser and copy the value for Team ID from browser's address bar (starting with 'T") Save it in a secure location for later use.

Fig 10.png
 

Step 4:  Channel & Integration Configuration.

 --> Navigate to All-> Conversation Interface -> Channel and Integrations

Fig 11.png

--> Click on Add Integrations button and select Integrate with Self-configured bot under 'Integrate Slack now' section:

Fig 12.png
--> Paste all the values, copied in Step 3.
    - Name of the Bot : App Name
    - Team ID:  Team ID (values starts with 'T' in slack workspace URL)
    - Signing Secret : Signing Secret
    - Access Token:  Bot User OAuth Token
Screenshot 2023-12-11 at 8.26.17 PM.png
-->Click on the Submit button.
 
Now, navigate back to slack workspace and start the conversation from newly created 'My Company Bot'  with out-of-the-box slash command (hi, help, restart, logout etc)
-> Type "hi" and select 'Link to ServiceNow' option.
Screenshot 2023-12-11 at 8.29.05 PM.png

 -> All available Virtual agent topics will be displayed ( Note: for this demo, I've created 'Report IT Issue' topic to create incident)

Screenshot 2023-12-12 at 4.31.30 PM.png

 -> When particular topic is selected, it will prompt for user inputs and provide the respective bot responses like below:

Screenshot 2023-12-13 at 2.51.50 PM.png

In conclusion, integrating ServiceNow with Slack bot can greatly simplify communication within your organization. By following the four steps of plugin installation, creating a bot in Slack, copying integration attributes, and configuring the channel and integration, you can provide your users with convenient features such as ticket status checks, issue/request submissions, and service desk chats all through your existing Slack bot. This integration not only improves communication efficiency but also saves time and effort in navigating multiple platforms. Give it a try and see the positive impact it can have on your organization.

Comments
abhinandan801
Mega Explorer

This inputs is incredibly informative and helpful, providing easy-to-follow explanations. In short, it's a practical idea to improve team collaboration. Thanks!!

Version history
Last update:
‎12-14-2023 02:30 AM
Updated by:
Contributors