Create smart links to specify where a URL should open. For example, the URL could
open in a new browser window, in a new browser tab, in the chat window, or in a pop-up
window.
Avant de commencer
Role required: virtual_agent_admin or admin
Pourquoi et quand exécuter cette tâche
If you (as an admin) have enabled URL navigation on the page, you can
specify patterns for where and how the links open in the chat windows. End users see
the URL links based on the patterns you've specified.
For example, you can set these URL "smart links" to open in a new browser window, in
a new browser tab, in the chat window, or in a pop-up window. If you specify a
pop-up window, you can set the size of the window your end users see.
Smart links can be used in chats with live agents.
Error messages display for channels that don't support smart links.
Procédure
-
Navigate to .
-
Under the System actions section, select View All next to URL navigation.
-
Select the Target Location tab.
-
Select New.
-
On the form, fill in the fields.
| Field |
Description |
| Description |
The purpose of the smart link. |
| Where to open |
Where to open the link. Choose one of the following options:
- New Browser Tab: Opens the link in a new browser tab.
- Load in Place:: Opens the link in the current location.
- Parent: Opens the link at the highest or parent level.
- Popup: Opens the link in a pop-up window and lets you specify the pop-up window size.
- Raise Event: In the chat widget only, prevents the default select behavior, avoiding a page navigation (the chat is kept open).
|
| Order |
Number that indicates the order in which smart link
preferences run. If there are multiple preferences, the
system runs the first smart link preference found, from
lowest to highest order. |
| URL Pattern |
URL pattern that uses regular expression
quantifiers. If the regular expression is invalid, an
error message is shown.

|
| Condition mode |
Expression logic to specify a condition for applying the
smart link preference. |
Set conditions Remarque : Applies only if you select the
Simple condition mode. |
If you select the Simple condition mode, use the condition builder to add or edit the condition. The condition builder specifies that the smart link is only applicable to links in
the Service Portal when they're accessed on the chat widget.

- devicetype: Refers to the channel. In the Australia release, only the chat widget (mweb) is supported. The mobile chat widget isn't supported currently.
- portal: Represents a specific portal. Specify the portal URL suffix in the condition. Navigate to to view portals and their suffixes
- Select Set.
|
ScriptRemarque : Applies only if you select the Advanced
condition mode. |
If you select the Advanced
condition mode, use the script editor to create or edit a
JavaScript condition statement. When the end user selects
the link, the component triggers a Window: message
event. As a developer, if you see the Window: message
event, you can decide how to handle the
navigation. For example:
window.addEventListener('message', e => {
if (e.data.type === 'SMART_LINK_CLICKED') {
console.log(e.data);
/**
{
type: 'SMART_LINK_CLICKED',
src: 'https://domain.com/link/src'
}
*/
}
});
|
-
Select Save.
Que faire ensuite
If you would like to enable smart link preference for Microsoft Teams,
you must first Configure link
authentication and opening experience in Microsoft Teams and then Configure smart links in Microsoft Teams