Hotspot mapping

Hotspot mapping

If a hotspot is saved, GRAVITY takes the URL and applies rules to it who defines when that hotspot should be displayed. How hotspots interact with the site is not always the same for each application. Therefore, GRAVITY can be configured to fit a wide range of use cases. At the tab ‘Hotspot mapping’ the configuration can be defined, and rules can be built for such use cases. There are multiple configurations, so called ‘Expressions’ allowed, and GRAVITY will try to apply them from the top to bottom.

Once a user saves a hotspot, GRAVITY uses the first expression who matches the combination of URL, template settings and regular expression. The value determined will be stored as ‘Calculated mapping’ and used to display to the user in case he has the combination of URL and configuration in his web application.

Figure 1

If you have multiple expressions, you can review which expression was assigned to a certain URL through the ‘Test’ at the bottom of the tab ‘Hotspot mapping’ (Figure 1). Expression ‘0’ would be the first/top expression on the configuration list going downward.

Figure 2

The first expression in Figure 2 is of type ‘PATH’ and only applied to hotspots which are NOT (false) marked as templates. A hotspot can be marked as template in edit mode step 2.

The type ‘PATH’ saves everything except the domain of the URL.

The effect of this ‘hotspot mapping’ configuration on each hotspot can be monitored under the ‘Hotspots’ (Figure 3). In the screen shot Figure 3, the callout “Home-Assistant” is NOT marked as Template therefore the ‘Mapping’ is bound to the URL “/lightning/page/home”.

Figure 3

If the template option IS check in edit mode, the callout should be visible everywhere where the ‘PATH’ occurs. In that case the ‘Mapping’ would be ‘GLOBAL’ for that PATH (Figure 4)

Figure 4

The second expression in the example (Figure 2) is of type ‘REGEX’ (Regular Expression) and contains the expression:

(.[^/]+)/lightning/r/(.[^/]+)/(.[^/]+)/view  and template is ‘true

That expression is be used to display template hotspots in a special occasion. What the regular expression express means is that, if an URL contains “/lightning/r/” and “/view” save the hotspot’s URL but ignoring the part in between. In that case GRAVITY replaces these parts with place holders.

Figure 5 shows the such a use case. A hotspot should be placed on the tab ‘Activity’ and should be showed only when back in “/lightning/r/” and “/view” state.

Figure 5

Otherwise that hotspot would be shown only on the particular opportunity it was originally created. You might see the difference in Figure 6.

Figure 6

The third and last expression in the example (Figure 2) is of type ‘CONST’ and contains the expression:

.*  and template is ‘true

That expression is fetching all cases in which the first two expression where not applied and assign ‘Global’ mapping to it (Figure 7).

Figure 7

In summary what happened in that ‘Hotspot mapping’ in Figure 2:

Expression

Case

Result

0

The hotspot is not marked as template

Save the precise URL and display the hotspot only when that exact URL is displayed.

1

The hotspot is marked as template and the URL contains “/lightning/r/” and “/view”

Save the URL with placeholder between “/lightning/r/” and “/view” and display the hotspot wehen “/lightning/r/” and “/view” are in the URL

2

The hotspot is marked as template

Save the hotspot with the value ‘GLOBAL’ and display it in all occasions where defined in ‘Site mapping’.