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.
MI 5.3.0+ application must be installed on your server.
- For details, go to Install or Update MI via Installation Packages
MI Slackbot must be deployed to your server.
- For more information, check MI Slackbot deployment
Slack Configuration: an App with bot functions must be created in Slack.
- Refer to Building a bot app for Slack
- MI Slackbot must be connected to Slack App to implement the realization of the MI Slack App functionality
- MI Slackbot must be configured to establish connectivity with the main MI application
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:
- Click the [+Add an app] when you create a Channel
- Click the [+] next to Apps in the sidebar
- 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)
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.
- Click [Show More] to see details on the potential match. The search result will be displayed as a link and a description value.
- Follow the hyperlink to view the element in Metric Insights.
- Preview the element or Share it with your Channel.
- Click [Dismiss] to hide the match.
- 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
- The Preview image of the element will only be visible to you.
- 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.
- The sample query may look like this: @slackapp_name France website visits.
- Dismiss or Share the matching element.
2. Direct Messaging the MI Slack App
When you are messaging the MI Slack App directly, search results can be shared to other Channels.
- Add the App for Direct Messaging.
- Type your Query.
- 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.
- Typing @(slackapp_name)!help displays List Commands and Usage help buttons.
- Click [List commands]
- 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)