Access content via a Slack App

This article gives an overview of how to use the MI Slack App (MI Slack App = MI Slackbot + Slack App) to fetch data from Metric Insights. 

The ability to search and find MI content via the MI Slack App is governed by the corresponding Security Provisions (learn more from Managing Slack App settings and Slack Security).

PREREQUISITES:

  1. MI 5.3.0+ application must be installed on your server. 
  2. MI Slackbot must be deployed to your server. 
  3. Slack Configuration: an App with bot functions must be created in Slack. 
  4. MI Slackbot must be connected to Slack App to implement the realization of the MI Slack App functionality
  5. MI Slackbot must be configured to establish connectivity with the main MI application
How data is delivered to a Slack Channel

Users type the name of the element they need to find or ask a question they would typically ask a person, e.g: What are daily sales in France? If there is one direct hit, the MI Slack App will serve it up. If it is a fuzzy match, the App will parse the query and provide search results based on the subject of the question.

Add the MI Slack App to a Channel

To integrate Slack functionality with that of Metric Insights, add the MI Slack App to your Channel. This can be done directly in Slack. 

To do so:

  1. Click the [+Add an app] when you create a Channel
  2. Click the [+] next to Apps in the sidebar 
  3. Click the Edit (Gear) icon to open the Edit menu > select Add apps

After the Slack App has been added to a Channel, it must be granted access to this Channel so that it can respond to queries. This is done via !access command.

To configure the Slack App authorization in a particular Channel, you must have the corresponding admin rights. Learn more in  Manage Slack App settings (for Admins)

Once the app is added, you can ask questions or search elements and the app will suggest content based on the search criteria.

There are two ways to ask a question:

  1. Type a question in a Slack Channel
  2. Direct Message the MI Slack App

1. Ask a question in a Channel

1.1. Ask a question without addressing the MI Slack App

You can ask a question in the Channel without actually addressing the App (This option is activated by the Admin).

Whenever there is a hit, the Slack App will reply with a message that can be muted or dismissed.

  1. Click [Show More] to see details on the potential match. The search result will be displayed as a link and a description value.
  2. Follow the hyperlink to view the element in Metric Insights.
  3. Preview the element or Share it with your Channel.
  4. Click [Dismiss] to hide the match.

NOTE:

  • Elements found by the Slack App will only be visible to a person who typed the query and they remain so until shared.
  • Only elements with a Preview image can be Shared to a Slack Channel (like Reports, Metrics, External Objects).
  • Content without the Preview image (such as Datasets) will be displayed as a link.

1.2. Preview and Share Content in a Slack Channel

  1. The Preview image of the element will only be visible to you.
  2. The Shared image can be seen by everyone in your Channel.

1.3. Direct a question at a Slack App

1.3.1. ONE match is found

When you explicitly ask the Slack App a question, if there is only one hit, the result will automatically be displayed as a Preview in a Slack Channel.

  1. The sample query may look like this: @slackapp_name France website visits.
  2. Dismiss or Share the matching element.

1.3.2. Several possible matches are found

In case of several inexact matches, the Preview images are not automatically shown in the Channel.

  1. To see the Preview, click [Preview].
  2. If required, Share the element(s) to your Channel.

2. Direct Messaging the MI Slack App

When you are messaging the MI Slack App directly, search results can be shared to other Channels.

  1. Add the App for Direct Messaging.
  2. Type your Query.
  3. After the Slack App finds a match, click [Share to channel] and select one from the dropdown.

When you are Direct Messaging the Slack App, you can Share elements only to the Channel that the App has already been invited to join.

3. Available commands for Users
  1. Typing @(slackapp_name)!help displays List Commands and Usage help buttons.
  2. Click [List commands]
  3. View the list of available commands

!tags command displays a list of available Tags in Metric Insights. Tags, in addition to element Titles, can also be used to find content.

!search command. Since the primary MI Slack App function is to search and find content, if you do not type this command, the Slack App will understand that the request is to search for elements. The search function is the default.

4. Security Provisions

In Metric Insights Security settings control which content will be served up to a Slack channel. To learn more, refer to Manage Slack App settings (for Admins)

5. What's next?

  1. Sending Alerts to a Slack Channel. 
  2. Delivering MI Burst content to Slack.