Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Excerpt

How recommendations can be visualised in your projects

Items and Entities

Given a project with entities, the appropriate call can be made to the Squirro API to fetch a list of recommendations and related items.

Entity Based Recommendations

It is possible to retrieve recommended content based on entities and machine learning. For example, if you were interested in "job opportunities", you might be able to build visualisations like the "Job Recommendation App" below.

Job Recommendation App - Example

The small application below was built using the following widgets: Search Bar, Entities, Recommendations and the Entities List.

Image Removed

Job Recommendation App - How-to Video Tutorial

The video below will show you how to quickly set up a "Job Recommendation App" using the Dashboard Editor.

Multimedia
nameRecommendations-Tutorial.mp4
width550

Using pre-configured Input Features

It is possible to create dashboards which will show the REC Results widget pre-selected and does not need the user to use the REC Input dropdown to select options first. This will also pre-select items in the REC Input dropdown and will be used by the REC Explanations widget.

To do this you can pass the input_features JSON object to the Dashboard Store. Below is an example where "Catalyst" is an entity type and "Expansion" and "Earnings" are the entity values. To understand how input_features affect results see SquirroClient Entities Recommend Endpoint.

Note: We pass the value _inputFeatures on the Dashboard Store which is later converted to input_features when passed to the API.

Code Block
languagejs
titleInput Features Example
linenumberstrue
{
	"_inputFeatures": {
		"Catalyst": [ "Expansion", "Earnings" ]
	}
}

Image Removed

Adding Actions - Integrating with 3rd parties (Salesforce etc) - Included in Squirro 2.6.4

Extend Recommendations to allow seamless integration into third parties like Salesforce and ServiceNow by adding Actions to the top right hand corner of the Recommendations card. In a Custom Widget you can do the following:

Code Block
languagejs
titleAdding Custom Actions
return Widgets.Recommendations.extend({
    customCardActions: [
        {
            iconName: 'business',
            action: function(ev, model, widgetModel) {
				// add your own logic for the action 'click' event.
                var $cardElem = $(ev.currentTarget).closest('.vRecommendationRowContent');
                var selectedRecId = $cardElem.data('rec-target-value');
                Materialize.toast('Opportunity for ' +  selectedRecId + ' has been created!', 4000);
				$(ev.currentTarget).closest('.card').remove();
            },
        },
        {
            iconName: 'close',
            action: function(ev, model, widgetModel) {
				// How to get additionalReturnedFeatures from the API
				// 'model' is the recommendation model
				// 'Sector' and 'Industry' are fetched below by passing them into the additionalReturnedFeatures property.
				// Now they exist on our model
             	console.log(model.get('return_features').Sector);
             	console.log(model.get('return_features').Industry);
            },
        },
     	{
        	iconName: 'search',
        	action: (ev, model, widgetModel) => {
            	// widgetModel is the widget model as a JSON object.
             	// You can get your widget properties or custom widget properties
				// which you define in your config.json in a custom widget
            	console.log(widgetModel.customName);
         },
     },
    ],

	additionalReturnedFeatures: ['Sector', 'Industry']
});

...

This page can now be found at Recommendations on the Squirro Docs site.