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.

1..GIF

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 

PX Auto resolve feature allows you to use dynamic URLs when the target URL is dynamic in nature or has multiple URLs. PX auto-resolve feature provides you with a token that can be used in parts of your URL.

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 are using $px-auto-resolve multiple items in a section, you must also use the token the same number of times. A single token cannot be used to replace areas of a section.
  • You cannot use $px-auto-resolve as an expression

Usage Table

The following table describes the various scenarios in which 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/accounts
Domain Resolve the whole Domain https://app1.gainsight.com/users https://$px-auto-resolve/accounts
Domain Resolve multiple parts of the domain https://app1.gainsight.com/users https://$px-auto-resolve.$px-auto-re...e.com/accounts
Path Resolve part of the path https://app.gainsight.com/users/1233456 https://app.gainsight.com/users/$px-...solve/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-r...esolve/details
Query Parameter Resolve part of the query parameters https://app.gainsight.com/accounts?q=123456 https://app.gainsight.com/users?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/users?q=$p...x-auto-resolve
Query Parameter Resolve the whole query parameters section https://app.gainsight.com/accounts?q=123456&p=654321 https://app.gainsight.com/users?$px-auto-resolve
Hash Resolve whole hash https://app.gainsight.com/account#someHash https://app.gainsight.com/users#$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.c...solve/overview

The following usage scenarios are incorrect and must be avoided:

  • Was this article helpful?