Connect MicroStrategy to Askdata

QUICK REFERENCE GUIDE:

CREATE A MICROSTRATEGY ASKDATA AGENT IN MINUTES

The goal of this workshop is to train you to create your own Askdata Agent, plug it on any MicroStrategy Dataset and customize queries. We want you to be very soon able to do all this in just a few minutes.

Warming up

Before we start, let’s get used to the end user capabilities. Go ask a few questions to https://app.askdata.com/agent/ASKDATA/619247D0-CD55-40AA-9B76-09A3BA1AC6DB-Sales

  1. Say hi > “Hello”
  2. Ask for a list of available datasets > “Datasets” (or click on the “List Datasets” button)
  3. Ask for a list of available metrics > “List metric”
  4. Ask for a list of available attributes > “List attributes”
  5. Ask for a metric value a. “Show me Revenue” b. “Give me revenue” c. “Revenue”
  6. Ask for a metric over an attribute a. “Revenue per Region” b. “Unit sales for customer city” c. “Revenue per Year” d. “What’s the revenue over Years and Category”
  7. Ask for a metric filtered for an attribute value a. “Revenue in Region USA”
  8. The Agent guess which Attribute to query based on the Attribute Element you ask for a. “Revenue in 2016” b. “Costs by city in Canada in the last month” (filtering on 2 attributes)
  9. Shortcuts / synonyms can be configured manually. For instance, ATL stands for Atlanta, Sales stands for Revenue a. “Revenue USA” b. “Revenue Mexico” c. “Revenue Canada”
  10. Sort based on Metrics a. Show me revenue per region sort by revenue descending b. top 3 product by units sold in the last mont

  11. BONUS: try to ask questions of your own, similar questions with different terminology, or new kinds of questions. If you break it, we’ll have it enhanced!
  12. BONUS: try to find a way to ask questions with your voice

Glossary - What’s in an Agent?

Askdata Agents are made of multiple components: Channels, Datasets, Entities:

  1. Agent: It is recommended to create one agent per POC/Customer. The name, logo and description of an agent can be entirely customized. Each agent gets their own Web / Skype / Facebook Messenger access
  2. Channels: are user interfaces that can be used to query agents. Each agent gets their own independent set channels. You are free to enable the ones you need for each of your agents. Options are Web, Facebook Messenger and Skype
  3. Datasets: are mapped to MicroStrategy Intelligent Cubes. You can configure as many datasets as you want. When the end user asks a question, the SmartBot decides itself which Dataset to query based on the question, metrics and attributes identified in the question
  4. Entities: each MicroStrategy object is referenced as entities. Entities are mostly used by the NLPs and the NL2API algorithms. Entities can be to customize object names and attribute element synonyms. There are 3 main types of Entities: a. MEASURES: contains the list of all the metrics from your datasets b. ENTITY_TYPE: list of all the attributes available in your datasets c. : single Entity containing all the attribute elements for a given attribute

ADMIN INTERFACE – CREATE YOUR OWN AGENT

Your turn! The goal is simple : create the demo you played with at the very beginning of this workshop Let’s start by exploring Askdata administration interface.

Architecture – Multi Tenancy

Askdata architecture is multi-tenant. We are all working on the same environment. Our workspaces are differentiated with Domains, submitted when connecting to the platform. Each of you have your own domain. A great benefit from that is any new change to their technology is automatically available to all existing and future agent. This will allow them to keep enhancing your demos and POCs without having to re-create these from scratch. Please make note of your Domain as you will need it for Login and for creating agents. Log any issue you see. The resolution will benefit to the entire team.

Access the interface and login to the platform

Go to the following url: https://console.askdata.com

Create an account.

IMPORTANT: confirm your e-mail (check in the spam if you don’t find a message in few seconds)

From the screenshot above, you’ll see each agent in this view has 2 main options:

  1. on the top right of an Agent to share it publicly – provides a Web URL and an iFrame HTML code to embed the Agent or inviting as viewer/editor other customers 2. Click on the Agent icon to or the agent

You can always go back to this view by clicking the “My Agents” menu.

Create your own SmartBot Agent

Click to create your own Agent. It will be used for the entire workshop

You should be prompted for an assistant code. Just keep in mind that code will be displayed in the Web Bot URL when demoing to customers.

Then a new form should show up, fill it with the following information.

ield Name

Description

Example

DISPLAYED NAME Named of the Bot as end users will see it

Rocks LANGUAGES Language the bot will use to reply English LOGO URL Logo of the Bot, displayed in the Web Interface when engaging the discussion Find the funniest pic you can! (I personally like this one : https://i.giphy.com/media/mtB3xRrhj5Rcs/200w.webp) WELCOME MESSAGE Will be displayed to any end user at the time they engage the discussion with the Bot Welcome to KnoxBot HELP MESSAGE Help message displayed when clicking the Help chat button, or typing Help as a question Let me help This agent you have just created is just an empty nutshell. This is very similar to creating an empty Metadata in MicroStrategy which means you can’t ask it to get data yet. You can however confirm the configuration above has been successfully saved. Go to the Live Test tab to verify your setup – Logo, Welcome message and Help message Congratulations for creating your own Agent! Let’s now feed your empty nutshell it with Data to query When prompted for MicroStrategy Dataset information Make sure you use the following values Link to MicroStrategy Library: https://tutorial.microstrategy.com/MicroStrategyLibrary/ Username : INNAASDEMO Password : INNAASDEMO Click “Load Projects” Project : find SnappyMart Project Dataset : select Retail Data Cube Connect your Agent to a MicroStrategy Cube Open the Dataset tab of your Agent and click the button on the top of the screen. popup that appears, scroll down and select “MicroStrategy" You should see a Dataset Creation form. Before you fill it, make sure to read these 3 important notes: 1. Make sure to have the trailing “/” at the end of your Library URL. Not having it will make the import fail. 2. Drop down menus where implemented to select Project and Cube. They are currently unsorted, which is ok for small environments but can get painful with hundreds of cubes. These lists currently just show up as sorted by the API, which is by creation date. After expanding the dropdown menu, you can type in the name of the cube you're looking for and it should get selected easily 3. We want you to be able to use our Tutorial environment with this technology. Fill in the Dataset Creation form with the following information: 7. Link to MicroStrategy Library 8. Username 9. Password 10. Click “Load Projects” 11. Project : Select the project 12. Dataset : Select Data Cube Hit Save and wait for it to process. At this time, all the information related to attributes/metrics/entities is synchronized by Askdata platform through our APIs. Wait until you get the following message on the top right of the screen:

Test your Agent

Go to the Test Now tab to verify your setup by typing a few questions • List datasets • Show me revenue • ... you know the rest Do not expect synonyms to work, as you haven’t defined these yet :) Define data Synonyms - Entity extensions In the beginning of the training, we showed how you can use data label shortcuts to write queries, such as “show me revenue for ATL” instead of “show me revenue for Atlanta” This feature uses Synonyms. Synonyms are defined in the Smart Manager – Entity of your agents. Entities are metadata information that the Agent configures automatically when a Dataset is added. They are made of a Askdata Technical ID, MSTR Technical information and Synonyms. As a little reminder, here are the main Entity Types you’ll find • One global Entity Types Entity containing all the Attributes available in the Cube • One global Measure Entity containing all the Metrics available in the Cube • One Entity entry for each Attribute available in the Cube, named after each Attributes Adding metric synonyms Ask your Agent for the Revenue metric using the Sales keyword > “Show me Sales” As expected, it won’t work out of the box. We need to add a Synonym to ask for Revenue using the keyword Sales. Go to the Schema after click on the dataset icon In the new screen scroll down to (or search) and click on it to edit Synonyms All metrics from the Cube shall be displayed. Some basic synonyms have already been added during the synchronization (as per screenshot below). Scroll down to the Synonyms, type “Sales”, hit Enter and then save. Ask “Show me Sales” again, it should give you the Revenue Add Attribute and Attribute Element Synonyms Use a similar approach to support the following queries we used at the beginning of the workshop: • “Revenue ATL” • “Revenue SLC” • “Revenue DC” • “Sales by City” Feel free to add as many as you want!