- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
In this blog post, we'll guide you through navigating and managing virtual agent topics using GML (Graph Modeling Language). We'll cover how to navigate to a virtual agent, the challenges of managing large topics, and how GML can help address these challenges. We'll also explain the graph column on topic helps us see json version of topic, scoped app code, and more. Let's dive in!
How to Navigate to Virtual Agent and See a Virtual Agent Topic
To get started, you'll need to log into ServiceNow platform. Once logged in, navigate to virtual agent designer
Here, you can see the various topics search for a topic (Download Payslip) and click on a topic to view its details.
Challenges in Seeing a Large Topic in Virtual Agent Designer
One of the challenges in the virtual agent designer is managing large topics. When a topic becomes too large, it can be difficult to visualize and manage, while there is an option to see in tabular view it still can become challenging to see entire topic block on a page and understanding it. This is where this solution comes in.
How GML Can Help in Addressing This Challenge
GML, or Graph Modeling Language, can help by providing a visual representation of the topic. This makes it easier to understand the structure and flow of the topic.
Explanation of Graph Column on Topic
The graph column on the topic contains the definition of the virtual agent topic in JSON format. This JSON data can be exported and visualized using GML. To view the json format of topic, open the topic in platform view by navigating to sys_cb_topic table. Search for the topic using name Download Payslip Request. Open the topic.
Update form layout to see Graph field on the form, below is json format of the topic. Attached is complete file json file, change the extension to .json before opening it.
{
"graph_api_version": "1.0.39",
"goals": {
"primary": {
"id": "primary",
"trigger": {
"type": "primary"
},
"name": "primary",
"applicability": "",
"description": "",
"nodes": {
"85d79000768240bba64228e5fbdcbabe": {
"id": "85d79000768240bba64228e5fbdcbabe",
"stepType": "Start",
"name": "Start",
"greetingResponse": {
"mode": "simple",
"value": ""
}
...........................
},
"edges": [
{
"id": "9aec71fc23b2482683d10fcdd03aa7e6",
"edgeType": "Edge",
"source": "6ba464788a534289a03091c4c0bfb2d5",
"target": "1f7ff2fc87004e049070c7038bf0e447",
"sourcePort": "",
"targetPort": ""
},
.................
}
]
}
},
"variables": {
"11eb06f0235e4810984f24bb744e4718": {
"id": "11eb06f0235e4810984f24bb744e4718",
"name": "LiveAgent_hr_topic_id",
"value": {
"mode": "simple",
"value": "586c0d09775101104c99aa9ccd5a9912"
},
"varType": "script",
"category": "vaVars",
"label": "LiveAgent_hr_topic_id"
}
................
}
}
Demonstrating How to Generate Open and Download a GML File for a Topic
To generate GML file click on Analyze Topic GML button
File gets attached to the topic record
Download it to your local machine, a sample gml file can be accessed here jsonToGmlConverter/Download Payslip Request(Template)-2025-03-02 (1).gml at master · anilvaranasi/js...
Showing the Exported GML in Desktop Version of yEd
Open YED editor and open the downloaded gml file, as soon as it opens it would appear in below layout.
Navigate to layout and change the layout to Hierarchical
Leave default settings on popup
Zoom in to see the content more clearly
You can also see reusable topics, their topic flows and which step in the existing topic flow is calling these reusable topics
Showing the Exported GML in Online Version of yEd
Now, let's open the exported GML file in yEd. You can use the online version of yEd
Open yEd Live and open the diagram that we have downloaded from topic by selecting open file
Update layout to hierarchical after opening the file
Topic flow would look like below
Zoom to see the topic flow more clearly, you can also download to PDF PF PDF export Download Payslip Request(Template)-2025-03-02.pdf
Here, you can see the visual representation of the topic. This makes it much easier to understand and manage.
How to Install Scoped App and Prerequisites
Scoped app for this solution is available on github anilvaranasi/jsonToGmlConverter. There is also an updateset jsonToGmlConverter/AVGlobalUpdatesetPreRequisite.xml at master · anilvaranasi/jsonToGmlConverter that needs to be deployed in global scope to update a system property to allow mime extension for gml file uploads.
How to Clean Up Attachments
Cleaning up attachments on topic can be done if needed by directly opening the attachments in sys_attachment table.
Show How to Find Out Largest Virtual Agent Topic and the Fix Script
To find the largest virtual agent topic, you can use a script that analyzes the size of each topic. Once you've identified the largest topic, you can use a fix script to optimize it.
Feedback and Any Improvement Ideas
We hope you found this tutorial helpful. We'd love to hear your feedback and any ideas for improvement. Please leave your comments below.
This Solution Is Not a replacement to virtual agent designer
Finally, it's important to note that this solution is not meant to replace the virtual agent designer. It's a complementary tool to help manage large and complex topics.
Thank you for reading! Stay tuned for more tutorials and guides on managing virtual agents.
References
Virtual Agent Topic Block: Retrieve Choice List - ServiceNow Community
- 871 Views
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.