Skip to main content
MindTouch Success Center

Integrate search into your CRM

Applies to:
MindTouch (current)
Role required:

This article explains how to integrate a powerful, user-friendly MindTouch search experience into your existing SAP CRM. With integrated MindTouch search, agents move beyond the knowledge base and can pull up help content from across the organization. They can quickly pull up any article and send a link by email, ensuring customers get branded, authoritative content quickly.


The primary benefits for the organization are:

  • Agent enablement: Agents can quickly find and recommend the most relevant content 
  • Standardized agent messaging: Agents provide customers with branded, authoritative links instead of 1-off replies which may be off-message
  • Drives self-services: Customers are shown how to find knowledge in the help center
  • Improves quality of support: Customers are sent to the official content with the most up-to-date information
  • Lowers costs: Agents improve their Mean Time To Resolution by quickly linking to content instead of writing a new response


After completing this how-to you will have a MindTouch search integration similar to the following, running inside your existing application:


This sample code brings the power of full MindTouch search experience into your CRM. The key features for agents include:

  • Instant access to knowledge, as search results appear while you type
  • Results are identical to the main search experience, including search recommendations
  • Fast search refinements, with dynamic drop-down lists to filter results to a category
  • Quick access to more results, with a single button to load additional results


In order to set up this integration, you should have the following:

  • Admin access to MindTouch
  • A CRM which can run HTML code
  • Basic familiarity with Javascript
  • Basic familiarity with CSS (if styling customization is desired)

How to set integrate search

Step 1: Download the sample code

Download the sample file to your computer. Open the file and verify you can perform searches. For example, search for "SSO" and verify results load.

Step 2: Set configuration variables

The sample code is configured to use the MindTouch Success Center at In the top of the file, modify the following settings:

var MindTouch = {};
MindTouch.SITE_URL = "";
MindTouch.WIDGET_SOURCE = 'MT-custom-search';
MindTouch.DEFAULT_SEARCH = "";
  • SITE_URL - the MindTouch site to connect to (connect to the HTTPS version of the site, since most CRMsystems are HTTPS themselves)
  • WIDGET_SOURCE - the name that should appear in your site usage report
  • DEFAULT_SEARCH - the string that should be auto-searched when the widget is opened. This is often populated with the ticket subject, if available.

After modifying the variables, verify the search interface works and results load.

Step 3: Integrate The Code With Your CRM Software

The last step is to integrate the code into your CRM. Using the HTML widget functionality, copy the widget HTML code into the appropriate location. A few caveats:

  • Single Sign-On (SSO): The search widget uses the API and no SSO is performed. If the user has an existing session with MindTouch, it will be re-used by these API requests (more on setting up SSO with MindTouch).
  • jQuery: The widget code uses a version of jQuery hosted by Google, and is stored as $j in noConflict mode. If the CRM has an existing jQuery library, this can be used instead.
        <!-- PREREQUISITE: jQuery -->
        <script src=""></script>
  • API Requests: The widget makes direct API calls using jQuery's $.ajax() function. If the CRM/CEM provides its own AJAX library, this can be used instead.
    var url = self.siteUrl + '@api/deki/site/query?dream.out.format=jsonp&dream.out.pre=?';
        url: url,
        data: params,
        dataType: 'jsonp'
  • Custom Behavior: The code was written to be modular. The site/query API has several parameters which can be adjusted. Advanced content searches can be performed as well. 
    var params = {
        q: query,
        limit: 10,
        sortby: '-date,-rank',
        constraint: constraint,
        summarypath: encodeURI(self.searchPath),
        offset: offset,
        origin: MindTouch.WIDGET_SOURCE
  • Custom Styling: The CSS at the bottom of the widget can be modified to restyle the widget.
  • Was this article helpful?