Skip to main content
Gainsight Inc.

Handle Dynamic URLs with Auto Resolve Feature

This article explains PX’s Auto resolve feature and how you can use it.

Overview

While creating a multi-page Guide engagement or a KC bot which redirects users to other URL’s, the redirected URL can be dynamic in nature. In such cases, you cannot insert a static URL in the redirect URL field. 

In the following image, you can see that the Guide engagement has two steps; a Dialog and a tooltip. While redirecting from the Dialog step to the tooltip step, you can select another page of your application by giving the URL of the page as shown below.

Guide Mapper Step Settings.png

If the URL of the target page is not constant and keeps changing or if the target page has multiple URLs, you cannot use a static URL (something like www.example.com).     

To resolve these kinds of issues, related to dynamic redirect URLs, PX offers the Auto Resolve feature. 

Use Cases

If you are using multiple URLs for each location of your application, like us.gainsight.com, india.gainsight.com, you can use the PX auto-resolve feature. 

Sections of a URL

It is important to understand the various sections of a URL before understanding the PX auto-resolve feature. This subsection explains the various parts of a URL. URL stands for Universal Resource Locator and has the following sections: 

  • Protocol is the technology used to transfer the data. This field is generally set to either http or https, based on the level of security.
  • Domain is the most important part of your URL which represents the IP address of your website or web app. For example, the gainsight.com domain.
  • Path represents a specific section or page of your application or website. 
  • Hash represents a specific subsection of the webpage.
  • Query Parameter represents the data that is sent to the website.

The following URL identifies all the sections of a URL. The color of each part maps with the definitions above.

https://app.gainsight.com/accounts#abcd?q=12345

 Protocol    Domain           Path          hash     Query Parameter

Using Auto Resolve 

The PX Auto-Resolve feature enables the use of dynamic URLs, accommodating situations where the target URL changes or multiple URLs are involved. This feature supplies a token that can be integrated into portions of your URL.

Note: The Auto-Resolve functionality is exclusively available for in-app engagements.

The $px-auto-resolve token automatically replaces the equivalent part of the current URL of the page which a user is currently viewing. You can use the $px-auto-resolve token in the following sections of your URL:

  • Domain: Any part of the domain which is delimited by a period (.), or in the entire domain. 
  • Path: Any part of the path which is delimited by a slash (/), or the entire path.
  • Query Parameter: Any query parameter value which is to the right of the = operator.
  • Hash: The whole part of the hash.

Usage Rules

  • You can use the $px-auto-resolve token to replace a single section or multiple sections of your URL.
  • You can also use the token multiple times within a single section of your URL. 
  • If you want to replace multiple parts of a section, you must add the $px-auto-resolve token for each part in the section. For example, you could replace multiple parts in domain of the URL: https://app1.gainsight.com/users using $px-auto-resolve token as https://$px-auto-resolve.$px-auto-resolve.com/accounts.
  • Gainsight PX does not support using the $px-auto-resolve token as an expression.

Usage Table

The following table describes the various scenarios where you can use the $px-auto-resolve feature.

URL Section Scenario Current URL Auto Resolve URL
Domain Resolve part of the domain https://app1.gainsight.com/users https://$px-auto-resolve.gainsight.com/users
Domain Resolve the whole Domain https://app1.gainsight.com/users https://$px-auto-resolve/users
Domain Resolve multiple parts of the domain https://app1.gainsight.com/users https://$px-auto-resolve.$px-auto-resolve.com/users
Path Resolve part of the path https://app.gainsight.com/users/1233456 https://app.gainsight.com/users/$px-auto-resolve/activity
Path Resolve the whole path https://app.gainsight.com/account/user/create https://app.gainsight.com/$px-auto-resolve?new=1
Path Resolve multiple parts of the path https://app.gainsight.com/users/123456/overview https://app.gainsight.com/$px-auto-resolve/$px-auto-resolve/details
Query Parameter Resolve part of the query parameters https://app.gainsight.com/accounts?q=123456 https://app.gainsight.com/accounts?q=$px-auto-resolve
Query Parameter Resolve multiple values of query parameters https://app.gainsight.com/accounts?q=123456&p=654321 https://app.gainsight.com/accounts?q=$px-auto-resolve&p=$px-auto-resolve
Query Parameter Resolve the whole query parameters section https://app.gainsight.com/accounts?q=123456&p=654321 https://app.gainsight.com/accounts?$px-auto-resolve
Hash Resolve whole hash https://app.gainsight.com/account#someHash https://app.gainsight.com/account#$px-auto-resolve
Multiple sections Resolving place holder in different parts of the URL https://app1.gainsight.com/account/12345 https://$px-auto-resolve.gainsight.com/accounts/$px-auto-resolve/overview

The following usage scenarios are incorrect and must be avoided:

  • Was this article helpful?