An interesting support experience – Troubleshooting External Notification Channel(Slack)

Published on : Aug 23, 2018

Category : Kovai.co

Sivaramakrishnan

Author

I can say last month was one another interesting month for me as a Support and Test engineer, as we have received quite a few interesting tickets.

Every support ticket gives us a different experience in its own way. But, some of the support tickets seem interesting, because it helps us to explore and learn new things. One of such tickets was related to the Slack Notification Channel.

Short intro about Notification Channels

BizTalk360 is embedded with a feature called Notification Channel. Not only does BizTalk360 support internal notification like emails and SMS, along with it, we support external notifications so that customers can write their own code to send alerts to the Notification Channel they use as per their organization policy.

External Notification Channel is another customer’s feature request, which we have developed and included in our product. As it can be very helpful to Support teams, we decided to create some inbuilt Notification Channels. Further, customers can create their own Notification Channel using their own code. Kindly find the blog for Custom Notification channel.


Feedback from the customer about custom Notification Channel

We have got very positive feedback from our customers about external Notification Channels and received quite a few requests to include some of the Notification Channels as an inbuilt feature. And we did so.

Also, we haven’t kept support aside; whenever customers face challenges with Notification Channels, we helped them to solve the issue at hand to our best. One such classic case is ‘Using BizTalk360’s Notification Channel to perform some action via a PowerShell script’.


Default Notification Channels

During the initial point of time, along with the version 8.0, we have provided BizTalk360 with some inbuilt Notification Channel such as:

1. Slack and
2. Webhook Notification Channel

Later as per the customer’s request, we have included two more Notification Channels and we have 4 now.

3. ServiceNow
4. Teams
Notification channel configuration in our latest version 8.8 looks like below.


Also, we have enhanced the Notification Channel feature as per the customer’s request. Such as,

Challenge in External notification #Slack

Last month, we received a support case regarding the Slack Notification Channel, that it’s not receiving any notifications from BizTalk360 and they faced the below exception in the log file:

2018-06-08 12:01:40 ERROR – Unable to connect to the remote server

We started to approach the case with the basic troubleshooting steps such as:

• Does the user have proper credentials?
• Any ports are blocked?
• Any security tools are blocking the connection?
• The URL what they used to connect slack?
•Does the proxy is blocking the internet connectivity?

The basic troubleshooting did not help us to solve the problem. So, we went into the screen-sharing session to investigate furthermore. At that point of time, we found that admin scope is missing for the application.

To give more insight about Slack:

In Slack,

• Groups are considered as #Channels
• Applications are predefined functionality, that is considered as #Apps
• Permissions are called as #Scopes

The flow is like:

1. You must create a Channel inside Slack
2. App creation will be followed by channel
3. Add necessary permissions/scopes to the created app
4. Generate Access Key/Token for the app
5. Add app inside the channel
6. Add the Access token for the app inside BizTalk360

We asked the customer to provide the admin scope and left the call. After few days customer came back with the same problem even though they have provided admin scope.

Creation of test environment

For Testing purposes, I have created a new Slack account and Channel, tested from the scratch and we have provided the same permission as the customer had.We got the same issue as the customer encountered, though the application has the scope admin.

What our code does?

We have analyzed with the source code level to find if anything is missing at our side. But found, the code is written in a generic way to push the plaintext message to any Notification Channel. So that, it could be sent to any platform. we have found that it is not a problem with sending a notification from BizTalk360, but it could be a permission issue.



After some testing and researching, we were not able to find the minimum permission what needs to be provided for the application in order to solve the customer issue. Later, we have decided to seek help from the Slack support team for further investigation.

Working with Slack Support

Daniel from the slack support team who worked with me throughout the way. I have created the support ticket along with the sample test application which had been created for testing. The conversation started with the basic questionaries and made sure the basic configuration is configured as per the actual expectation. However, everything is correct, still, we couldn’t make the app work. The direction of an investigation gone little deep and we will look it in the coming section in detail.

Troubleshooting with the permissions

Daniel conveyed, installed app in the test workspace has a valid token. But, looking through the logs, the application has enough permission (both admin & User identity) to receive the messages. Permissions are as below,

  1. https://api.slack.com/scopes/admin – Got Admin scope
  2. https://api.slack.com/scopes/identify – And got Identify Scope

Additionally, he suggested providing 

  1. Conversiontions:write &
  2. Converstions:read scopes

After following the suggestion, the app was not working. But the next suggestion made a trick.

What is the trick?!!

Later, we got a reply from Daniel “I took a closer look at your app, and it appears you haven’t added the chat: write scope. You’ll need this to make any chat:postMessage (https://api.slack.com/methods/chat.postMessage) calls with your app.
Providing the chat: write permission to the application indeed did the trick! The application writes a message in the Slack from BizTalk360. I have updated the same to the customer and that helped them to resolve their issue.


Satisfaction does it!

This was another support case which was interesting for me as it helped me to understand the code of Notification Channel from a Developer perspective. I have explored Slack along with BizTalk360 which provided more insight from the Tester perspective. Working along with the customer and Slack Support team gave satisfaction as a Support engineer. I have received “an Awesome” review from the customer side 😊