Using Knowi's Search Analytics empowers your end-users the ability to ask questions of their data in English. Think of this as a Google search on your datasets. This functionality can be embedded in your application through Single Sign-On. Try it out.
Similar to embedding with SSO and the Javascript API, the steps to embedding Search Analytics is almost identical and can be achieved in three steps:
1. User Token: Create a Knowi user token for a new or existing user
curl -i -X POST -d "user=email@domain.com&ssoCustomerToken=<SSO_TOKEN>" https://knowi.com/sso/user/create
2. Session Token: Create a Knowi session token with the user token from step 1
curl -i -X POST -d "user=email@domain.com&userToken=<USER_TOKEN>" https://knowi.com/sso/session/create
3. Embed: Write a Javascript file with the session token returned from step 2
function loadSearchAnalytics() {
Knowi.render('#knowi-div', {
type: 'nlp',
token: "BYhXXCeu0Ego8zA1FqtLOOM4BDWot5AYBLI7PWrQTbsie",
url: 'https://www.knowi.com',
view: {
nlpOptions: {
icon: "off",
css: {
background: 'transparent'
},
placeholder: "Try: total sales for canada this week",
}
}
}, function () {
});
}
Note: For embedding Search Analytics, type
must be nlp