Search-Based Analytics with Slack

Knowi's slack integration combines our powerful search-based analytics capabilities with Slack's intuitive messaging user interface. This enables users to ask questions of their data, receive answers, and visualize those answers within Slack.

There are two steps in the process of setting up Knowi's slack integration. The first step is installing the Knowi bot, which must be done by a Slack admin, which your admin should have already taken care of. If your admin has not installed the Knowi bot, you will see an error message, in which case you must refer them to this this page.


Connecting Your Knowi Account in Slack

Once the Slack admin has installed the Knowi bot, the next step is connecting to Knowi with your login:

  1. Enter the /knowi command. This will prompt you to connect your Knowi account. Click "Connect Knowi Account" to start this process.
  2. Enter the login credentials for your Knowi account and click "Sign In."
  3. Click "Allow" in order to grant the Slack Knowi app with permission to access Knowi.
  4. Click "Get Started:" and "open in Slack". This will redirect you to the Knowi app in your workspace
  5. In the "Commands" section at the bottom of the page, click "Start command"
  6. You should now see the image below, and can begin entering questions preceded by the command /knowi



Getting Started

To get started, run a pre-configured question under "Favorite Queries" (the Slack amin would have set this up beforehand).

  1. Under "Favorite Queries", select a query category from the first dropdown and the query string to ask in the second dropdown. Or, keep the default values.
  2. Click "Run"
  3. Your answer will be returned in the form of a visualization. Above the visualization, you will see the query syntax you entered and the name of the matched dataset.

Below the visualization, you will see the options: Download Data, Explore/Validate, Favorite, Share, and Schedule. We'll cover the first two in this section, and go through Favorite, Share, and Schedule in the "Create Your Own Question" section.


Download Data

Downloads the underlying data to csv.


Explore/Validate

Clicking this takes you to the Visualization settings of the query results. In this tab, you can modify the settings or choose another visualization type altogether.

The Data tab shows you how the results were aggregated. Here, you can do further analysis and modify the results as needed.

For example, you can:

  • Drag additional fields to the results or remove fields
  • Change the grouping, aggregation
  • Edit or apply an operation (sum, min, max, avg, etc.)
  • Add filters to the results

There is a search-based analytics search bar in both tabs where you can modify your question or ask a brand new one. In the search bar, the name of the underlying dataset is displayed on the right edge of the bar.


Create Your Own Question

Of course, you have the option to write and run your own queries directly. To get started:

  1. Enter your question preceded by /knowi (i.e. /knowi )
  2. In a few moments, your answer will be returned in the form of a visualization. Above the visualization, you will see the query syntax you entered and the name of the matched dataset
  3. Below the visualization, you will see the following options: Download Data, Explore/Validate, Favorite, Share, and Schedule

There are different ways you can format your query. We'll go through how to format them below and provide some examples using a demo dataset (your syntax will vary based on your own datasets):


Select a Dataset

This allows you to select the dataset you want to query by adding "-d" at the end:

  1. Enter the command /knowi -d
  2. The Knowi Search Analytics window will pop-up, with a drop down to select a dataset and a text box with the query string of your question
  3. Use the dropdown to select the dataset you want to query (by default, it chooses the best match)
  4. Click Submit
  5. In a few moments, your answer will be returned in the form of a visualization


You can also specify the dataset name upfront:

  1. Enter the command /knowi -d
  2. The Knowi Search Analytics window will pop-up and the dataset name you entered will be pre-selected in the dropdown
  3. Click Submit
  4. In a few moments, your answer will be returned in the form of a visualization

Example:

/knowi total email sent -d


"All Details" Command

A handy query for getting detailed results for a string value (i.e. customer, product, sales associate, etc.) in your dataset is by including "all details for..." in your question. This will return all fields in the dataset for the given string value. For example, the query /knowi all details for Wells Fargo -d will return all columns for each record with the value "Wells Fargo" in the dataset.

Format:

/knowi <"all details for"> <string value> -d

Example:

/knowi all details for Wells Fargo -d

You can also add conditions to the "All Details" command to refine your results. Below are some examples:


Rolling Date Range

Format:

/knowi <"all details for"> <string value> since <time frame>

Example:

/knowi all details for Wells Fargo since yesterday


"Where" Statement

Format:

/knowi <"all details for"> <string value 1> where <column name> is <string value 2>

Example:

/knowi all details for Wells Fargo where message type is Marketing


Favorite Queries

These are pre-configured queries you have marked as Favorite and placed in a category. Here's how to set this up:

  1. Enter your question preceded by /knowi (i.e. /knowi )
  2. Once the results are returned, click "Favorite"
  3. Click "Create new Category" and give it a name (the default Category is "Default")
  4. Click Save
  5. The next time you enter the command /knowi, the Category you created and the query string you saved will appear as drop down options under "Favorite Queries"
  6. Under "Favorite Queries", you can run the pre-configured query, modify, or delete it


Share

Allows you to share the query string of your question to another Slack channel.


Schedule

Allows you to schedule your query to run at a chosen interval. Once you click on "Schedule", you'll see the following settings:

  • Query String - The query syntax of your question
  • Alert Frequency - Enter how frequently you want the alert to run
  • Alert Frequency Type - Select the alert interval (minutes, hours, days, month)
  • Schedule report to a channel - Select the Slack channel the query results will be sent to
  • Starting At (optional) - Select the start date for the alert