Skip to main content
MindTouch Success Center

Configure Support Ticketing Form for Customer Insights

Prerequisites

  • One (1) available Touchpoint license
  • Access to modify the support ticketing form HTML

Support Ticketing Forms Hosted on a MindTouch Site

If the support ticketing form is hosted as MindTouch content, JavaScript can be added to the page to insert a Customer Insights Token into the support ticket form when it is submitted.

DekiScript

<!-- Example Support Ticketing Form -->
<form>
    <input name="mindtouch-user-activity-token" hidden="true" value="" />
    <input name="submit" value="Submit Case"/>
</>

JavaScript

document.addEventListener('mindtouch-web:loaded', function(ev) {
    var analytics = ev.data.analytics;
    
    // insert the customer insights token into the support ticketing form
    document.querySelector('input[name="mindtouch-user-activity-token"]').val(analytics.userActivityToken);     
});

Support Ticketing Forms Hosted in a Third-Party Environment

A support ticketing form in a third-party environment, such as a CRM or website, can include a Customer Insights Token.

Get the Analytics Connector Embed Code

The Analytics Connector embed code can be located (or created) in the Touchpoints management dashboard. A single Analytics Connector can be reused for different support ticketing forms, across different website domains, if the domains are configured in the Analytics Connector Host Name field.

Hook Analytics Connector to Form

HTML

<!-- Analytics Connector embed code -->
<script async="async" src="https://{hostname}/@embed/a3cb91f5e06f30bf7ea825aedfda6cb7cf9283a08733e0d09f6c957e31801fad.js"></script>
<script type="mindtouch/embed" id="mindtouch-embed-a3cb91f5e06f30bf7ea825aedfda6cb7cf9283a08733e0d09f6c957e31801fad"></script>

<!-- Example Support Ticketing Form -->
<form>
    <input name="mindtouch-user-activity-token" hidden="true" value="" />
    <input name="submit">Submit Case</input>
</form>

JavaScript

document.addEventListener('mindtouch-web-widget:environment-info:user-activity-token-changed', function(ev) {
    
    // insert the customer insights token into the support ticketing form
    document.querySelector('input[name="mindtouch-user-activity-token"]').val(ev.data.userActivityToken);     
});

For further details, consult the Advanced Integration Programming with Touchpoints reference, Analytics Connector Events.

Integrate With Customer Insights

The Customer Insights Token is a field in the support ticketing form. Depending on the needs of the CRM or support ticketing system, this field may need to be whitelisted or require further configuration. A JavaScript DOM event can be hooked in order to pass the token to the Customer Insights Touchpoint or MindTouch CRM integration.

// include wherever custom JavaScript is allowed in the CRM or support ticket system agent experience
document.addEventListener('mindtouch-web-widget:user-activity:loaded', ({ data }) => {
    const widget = data.widget;
    
    // consult any documentation or guides for the CRM or support ticketing system regarding how custom support ticketing form field values can be exposed in custom JavaScript.
    widget.userActivityToken = '{token}';
});
  • Was this article helpful?