This article explains PX’s Auto resolve feature and how you can use it.
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.
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.
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.
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.
- 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
The following table describes the various scenarios in which you can use the $px-auto-resolve feature.
The following usage scenarios are incorrect and must be avoided:
- Using https://$px-auto-resolve.com/users to replace https://app1.gainsight.com/users.
In the above example, an attempt is made to replace two parts of the domain (app1 and gainsight), with a single instance of the token. The right token is https://app1.gainsight.com/users.htt...s.com/accounts
- Using https://$px-auto-resolve.$px-auto-resolve.com/users to replace https://app-dev.gainsight.com/users
In the above example, the token is used as an expression, which is incorrect. Partial resolving is not allowed in any part of the URL.