Skip to main content
MindTouch Success Center

Gain insight into customer activity

Integrate a Customer Insights panel into your SAP CRM to see a full history of customer page views and search activity.

Key features include:

  • Instant access to customer history, which is loaded when the case is opened
  • Quick access to the exact searches and pages performed by clicking the link
  • Detailed information about the exact date (and time) a customer performed the request

Prerequisites

  • A CRM that can run HTML code
  • Basic familiarity with Javascript
  • Basic familiarity with CSS (if styling customization is desired)

Integration setup

  1. Download the sample file to your computer.
  2. Set configuration variables. The sample code here is configured to use the MindTouch Success Center at success.mindtouch.com. In the top of the file, modify the following settings:
    • SITE_URL - the MindTouch site to connect to (connect to the HTTPS version of the site, since most CRM systems are HTTPS themselves)
    • CUSTOMER_ID - the username (or anonymous session ID) of the customer. The customer username is a more reliable way to track activity between sessions.
    var MindTouch = {};
    MindTouch.SITE_URL = "https://success.mindtouch.com";
    MindTouch.CUSTOMER_ID = '';
    
  3. Step 3: Enable customer history tracking. Ensure you are logged-in with a pro member with the USERHISTORY permission enabled for the site. This can be enabled via the API or you can contact MindTouch support to configure a specific pro member role with USERHISTORY enabled. You can then add users with that role to a group. When enabled, verify that you can visit the User Activity Report and lookup the history for a customer.
  4. Ensure the CUSTOMER_ID is available in your case management system. Although MindTouch provides anonymous session IDs as part of the integration workflow, it's best to provide the username of the customer. (Using SSO, your customers can automatically log into MindTouch). Using the customer username provides better tracking and avoids the risk of losing information if the customer changes browsers or clears browser cookies, which would clear the anonymous session. Learn more about the customer activity API
  5. Integrate the code with your CRM software. 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.
    • 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.
      <head>
          <!-- PREREQUISITE: jQuery -->
          <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
      </head>
      
    • API Requests: The widget makes direct API calls using jQuery's $.ajax() function. If the CRM provides its own AJAX library, this can be used instead.
      code
      var url = MindTouch.SITE_URL + '/@api/deki/events/support-agent/=' + customerId + '?dream.out.format=jsonp&dream.out.pre=?';
      var params = {
         limit: 50,
         include: "page,file",
         origin: MindTouch.WIDGET_NAME
      };
      
    • Custom Behavior: The code was written to be modular. The rendering of the activity interface can be easily modified to support a different look and feel.
       
    • Accessing the Customer ID: When SSO is setup, the customer username is often the customer's email address. If a different system is in place, ensure the CRM has this as a variable that can be passed to the Insights widget.
       
    • Custom Styling: The CSS at the bottom of the widget can be modified to restyle the widget. This code sample references the Font Awesome icon font for the page and search icons. 
  • Was this article helpful?