Navigation (Custom Pages)
In this section, you can add pages that appear on the left navigation bar. You specify a navigation icon and a unique URL for the widget to appear on the navigation bar. We recommend using a specific prefix for the URL to avoid conflicts. For more details, see the nav property section.
You can also have a collection of widgets that can display on this page. The page can have a single widget that appears on the screen or a collection of widgets in a grid. For more details on grid arrangement, see the layout property section.
Note | You do not need to add a dynamic-area wrapper to the widget tree. This means that you can drag and drop and resize widgets on custom pages when you enable this option. |
Example:
{
"nav": {
"label": “Custom Page”,
"icon": "stored-info",
"iconType": "momentum",
"navigateTo": "dynamic-tabs",
"align": "top",
"isDefaultLandingPage": true
},
"page": {
"id": “my - custom - page“,
"widgets": {
“
comp1”: {
"comp": "md-tabs",
"children": [{
"comp": "md-tab",
"textContent": "Shift Timer",
"attributes": {
"slot": "tab"
}
},
{
"comp": "md-tab-panel",
"attributes": {
"slot": "panel"
},
"children": [{
"comp": “my - custom - timer”,
“source”: http: //my-cdn.com/my-custom-timer.js
"wrapper": {
"title": "Shift Timer",
"maximizeAreaName": "app-maximize-area"
}
}]
},
{
"comp": "md-tab",
"textContent": "Stock Market",
"responsive": "false"
"attributes": {
"slot": "tab"
},
},
{
"comp": "md-tab-panel",
"attributes": {
"slot": "panel"
},
"children": [{
"comp": "agentx-wc-iframe",
"responsive": "false"
"attributes": {
"src": "https://widget-kad.s3.amazonaws.com/Trading.htm"
},
"wrapper": {
"title": "Stock Market",
"maximizeAreaName": "app-maximize-area"
}
}],
},
{
"comp": "md-tab",
"textContent": "Widget3",
"attributes": {
"slot": "tab"
}
},
{
"comp": "md-tab-panel",
"textContent": "Three Content",
"attributes": {
"slot": "panel"
}
}
]
},
“comp2”: {
"comp": “my - google - maps - component“,
“source”: "https://my-cdn.com/my-google.maps.js
"wrapper": {
"title": "Google Map",
"maximizeAreaName": "app-maximize-area"
}
}
},
"layout": {
"areas": [
["left", "right"]
],
"size": {
"cols": [1, 1],
"rows": [1]
}
}
}
},
The following table describes nav and page properties along with their child properties:
Property |
Description and Code |
||
---|---|---|---|
nav > label |
This property indicates the page navigation identifier. The screen reader reads this property and it appears in the tooltip. These parameters are necessary to display your custom page on the navigation bar.
The |
||
nav > iconType |
This property represents the type of icon that displays in the navigation bar for the custom page. The following types of icons are available:
|
||
nav > icon |
This property represents the name of the icon in the Momentum library or the CDN URL.
|
||
nav > align |
This property helps you align the icon to the top or bottom of the navigation bar.
|
||
nav > isDefaultLandingPage |
This property specifies the default landing page for the agents in Agent Desktop. Set this property to true to make the navigation bar page the default Landing page that appears for the agents after signing in to the Agent Desktop. If more than one navigation bar page has this property set to true, the system considers the first navigation bar page to become the default Landing page. If no navigation bar page has this property set to true, the Home page acts as the default Landing page. |
||
nav > navigateTo |
This property specifies the name of the custom page. This name appears in the address bar when the agent navigates.
|
Property |
Description and Code |
||
---|---|---|---|
page > id |
In "page" property, you specify the custom page (dynamic widget) object. The "id" property represents a unique page identifier. For example, my-custom-page-1. Agent can’t see this identifier on the Desktop.
|
||
page > widgets page > comp |
Helps you define your custom widgets. To place multiple widgets, specify widget options in sequence. Ensure that you give each widget a unique area name. Use it in the layout section later.
This property represents the name of the custom HTML element (known as a Web Component or any other element - if you want to use it as a wrapper). For more information, see Sample Use Case Examples. Enter your custom element name here without angular brackets (“<” or “>”). For example, “my-custom-element.” Each entry under the widgets section supports the following format:
|
||
page > script |
(Optional) This property is required only when you load the widget or component from a remote location such as a CDN.
|
||
page > properties |
You can specify properties that you must pass for the Web component.
|
||
page > responsive |
Determines whether a web component or an iFrame based widget that is added in the custom layout at the Configure this property with one of the following values:
|
||
page > attributes |
You can specify the Web component attributes in this section.
|
||
page > visibility |
Specifies whether the Cisco-offered widgets added in the custom layout at the Cisco-offered widgets are Contact History, Cisco Webex Experience Management, IVR Transcript, Preview Campaign Call Guide, and Screen Pop.
|
||
page > children |
This property is the core part of the layout. In the "children" section, you can nest as many levels as required if the Web Component-based widget allows you to pass children. To make that possible, the developer must programmatically handle the "slotted" content. For more information, see Cisco Webex Contact Center Desktop Developer Guide. To know about passing STORE values as properties, see Share Data from Desktop to Widgets.
The advantage of the “children” array section is that you can use existing Web Components in your layout specification, which is already part of the Desktop bundle. A few of the Desktop bundle Web Components include:
For more information on the attributes for the persistent tab, see Attributes for Persistent Tabs. |
||
page > textContent |
Helps you to add your text content.
|
||
page > style |
Helps you to assign a particular CSS style to your component.
|
||
page > wrapper |
Widget wrapper allows you to add a toolbar on top of your widget. The toolbar can contain a title and the (Maximize) icon on top of the widget. When the widget has occupied a small space on the page, the maximize icon allows the agent to see the widget in full workspace. Ensure that you use the default value as "app-maximize-area". Currently, only the default value is available.
|
||
page > wrapper> id |
(Optional) The web component widget wrapper allows you to update the dynamic widget title using a unique identifier. Enter the widget wrapper
To update the iFrame-based widget title, use the iFrame content from the same domain. The following is a sample example:
|
||
page > agentx-wc-iframe |
Allows you to embed a web page in an iFrame that appears as a widget on the Desktop. You can use the iFrame widget called “agentx-wc-iframe”.
|
||
page > layout |
Allows you to arrange the widgets on a page. The following format represents a grid layout:
Here you can define the grid with the area names that you defined in the widgets section. The following example shows how the layout of three rows and three columns is specified:
In the size section, numbers represent the fraction of space that a widget can occupy, relative to the other widgets. All three columns occupy equal 1 fraction of space. With 100% as available width, each widget occupies 33.33% of horizontal space. Another use case example, if you set as "cols": [1, 2, 2], it means that overall space is divided by 5 (1+2+2) and the first widget occupies 20% of horizontal space. The second and third widgets take 40% each. For more information, see Basic Concepts of Grid Layout. |
||
page > ROOT |
Nesting of layouts is called a sublayout. In case you have nested layouts in your layout configuration, you must have a single "ROOT" object as a parent for sublayouts. Otherwise, your layout configuration can be flat if no nesting is required. This sublayout provides more control over the layout resize behavior. The page layout property must be of type Record<string, Layout>. The layout property allows you to arrange the widgets on a page.
This setup creates a grid in the ROOT layout with two subgrids that you can resize independently. Resizing a component affects the components within that sublayout.
Infinite loop: If you include ROOT layout as a sublayout of ROOT, it causes a "call stack exceeded" error and runs into an infinite loop.
Same Sub-Layout (N) times: If you include the sublayout into your grid more than once with the same name, and if you resize one of them, all the sublayouts get resized automatically. If this is not the desired behavior, rename each of the sublayouts with a unique name.
|
Attributes for Persistent Tabs
To set the tabs in the custom pages and custom widgets as persistent, enter the attributes for md-tabs
in the custom layout.
Example: Set Tabs as Persistent
{
"comp": "md-tabs",
"attributes": {
"persist-selection": true,
"tabs-id": "unique-id for all the tabs together in the container"
},
}
Property |
Description |
---|---|
persist-selection |
To set |
tabs-id |
Unique identification for all the tabs together in the container. |
When you set md-tabs
to be persistent (persist-selection: true
), Agent Desktop retains the tab selection even if an agent switches between pages or widgets in the Desktop.
Note |
|