Virtual Agent provides pre-built topic blocks that topic authors or admins can use to perform specific platform-related functions or tasks in bot conversations. For example, certain topic blocks enable you to check agent availability or generate AI Search results.

Overview of pre-built topic blocks

Certain pre-built topic blocks are included automatically with the Glide Virtual Agent (com.glide.cs.chatbot) plugin and Virtual Agent Lite. If you're using Virtual Agent Lite, you have read access to the topic blocks but you can't create topic blocks or add them to calling topics.

You can duplicate pre-built topic blocks and modify the duplicates by using Virtual Agent Designer. For information about working with topic blocks and how to add them to calling topics, see Maximizing code reuse with topic blocks and Add a reusable topic block to a calling topic or topic block.

The following sections describe the input and output parameters for calling different types of platform topic blocks. The topic block input parameters are passed from the calling topic, and the output parameters are returned from the topic block to the calling topic.
Note: Upgrades to the default topic blocks are not applied to the duplicated topic blocks.

Agent Availability topic block

Use this topic block to get relevant live agent information for use in agent handoff conversations. This information includes agent availability, wait time (how long before an agent is available), and queue information. You can use the information returned, such as a long wait time for an agent, to initiate a case or customer callback.

This topic block requires the Agent Chat (com.glide.interaction.awa) plugin, which includes Advanced Work Assignment.

The following table lists the output parameters for this topic block.

Table 1. Agent Availability output parameters
Parameter Description
agentAvailable Agent availability. The value is true if an agent is available for this queue. Otherwise, the value is false.
supportQueue sys_id of the queue that is associated with the conversation. The value is null if an agent is not available or if there is no associated queue.
waitingTime Average numeric wait time for the queue. The value is null if an agent is not available.

Deflection topic block

Use the deflection topic block in Virtual Agent conversation topics to track the issues that Virtual Agent helped to resolve or actually resolved for a user.

For example, the pre-built Auto Resolution Virtual Agent topic uses a deflection topic block to track deflections. For more information, see Tracking deflections in Virtual Agent using the deflection topic block.

The following table lists the input parameters for this topic block.

FAQ Conversation Builder topic block

Use this topic block to build bot conversations that use your existing FAQ content. With this topic block, you can enable topic authors to build simple conversations by using existing knowledge articles that are published in the FAQ template or by using Q&A data that was imported from sources such as spreadsheets.

The FAQ Conversation Builder topic block uses contextual search to find an appropriate match in the FAQ content. FAQ content is access-controlled based on requester role, access rights, and context.

Activate the Knowledge Management Advanced plugin to use the FAQ Knowledge template.

Note: The default length of an FAQ snippet that is returned in the conversation is 400 characters. The snippet length includes the HTML tags and links that are used in the snippet. To change the snippet length, change the value in the com.glide.cs.faq.display_size system property. In addition to applying the specified length, the system applies word-wrap logic to prevent words and links in the snippet from being truncated arbitrarily.

The following tables list the input and output parameters for this topic block.

Table 3. FAQ Conversation Builder input parameters
Parameter Description
query Search term or phrase that is passed to the topic block. Select Input Variables or Script Variables.
portal Context for the search. Select Input Variables or Script Variables.
kb_knowledge Knowledge base for the search. Select Input Variables or Script Variables.
Table 4. FAQ Conversation Builder output parameters
Parameter Description
Results_Returned Boolean value that indicates whether any results were returned from the query.
Results_Helpful Boolean value that indicates whether the user found the results helpful.

Form Content Popup topic block

Use this topic block to open a form in a popup window from the web client. Once the user submits the required information, the record appears as a card in the Virtual Agent chat window. If a new record is created, the sys ID for that record is sent to the server so that the Virtual Agent topic has that information. For information about creating a pop-up window from a link, see Create a smart link preference.

Table 5. Form Content Popup topic block input parameters
Parameter Description
sysId Sys ID of the record you want to display from the table specified in the table parameter. If you don't want a specific record, enter -1to create a new record.
table Name of the table you want to query or create a record in.
view Name of a view that you created for the table. If not specified, the default view is used.

Geolocation topic block

Use this topic block to retrieve information about the location of users, if the users agree to that. Before the topic block is called in a conversation, the users are asked if they want their location to be known. For example, the users see a prompt similar to the following:
Figure 1. User permission prompt
Dialog box with block and allow buttons, and message from anonymized website requesting to know user's location.
Users can choose to block the request or allow their location to be known. If the users click Allow, they are later asked if they would like to share their location, as shown in the following example:
Figure 2. Use of Geolocation in a chat
In the chat window, Virtual Agent asks, "Would you likek to share your location?"

The following tables list the input and output parameters for this topic block.

Table 6. Geolocation input parameters
Parameter Description
permissionPrompt (String) Text asking permission to use the user's location. This text is shown to the user.
isGeoPermissionGrantedForNextUse Boolean value that determines if users have granted permission to retrieve their location coordinates if this request is asked more than once during the conversation. The variable can be set as follows:
  • True: Don't display permission prompt again because the user has granted permission on this device.
  • False: Display the permission prompt because the user has either denied permission or has allowed the coordinates to be retrieved one time only.

Pause topic block

Use this topic block to create a pause to control the pacing of a conversation. To end users, this feedback is seamless and is displayed as a typing indicator.

For example, if the chat generated a list of knowledge base links, you may want to add a delay before continuing the conversation to give your end user time to read the information.

The Pause topic block appears on the Utilities section of the palette for easier access.

The following table lists the input parameter for this topic block.

Table 8. Pause input parameter
Parameter Description
Seconds Number of seconds to wait before continuing the chat. The maximum value allowed is 60 seconds.

If the value entered is 30 seconds (the default value) or less, the block should unpause in near real time. If the value entered is greater than 30 seconds, expect the unpause to occur with a maximum latency of +30 seconds. For example, if you set the value to 31 seconds, it could take up to 61 seconds to unpause (at most).

Run AI Search topic block

Note: If you're upgrading from Rome or a prior release, you must replace the legacy AI Search topic block with the Run AI Search topic block in order for it to work.

Use this topic block to generate AI Search results in a conversation. This block doesn't require specific input parameters from a calling topic because it is controlled by the AI Search application in Virtual Agent. The default Virtual Agent Search Application and EVAM configuration set in the chat experience control how AI Search results are displayed in conversations.

For information about how Virtual Agent uses AI Search, see Improving the user experience with AI Search. To learn more about Virtual Agent chat experiences and how to configure them, see Setting up chat experiences for Virtual Agent users.

You can control certain aspects of the Run AI Search topic block:
  • Optionally customize the AI Search experience - You can customize the search experience by creating a custom Search Application Configuration to be used by the topic block, rather than the default Virtual Agent Search Application Configuration. The Search Application Configuration defines the search results returned in the conversation. For details on using a custom Search Application Configuration in the topic block, see Create a custom AI Search experience for Virtual Agent conversations.

    To use the default Virtual Agent configuration for AI Search, leave the Search Application Configuration field empty in the Topic Block Properties sheet when you're adding the Run AI Search topic block to a topic.

  • Specify an AI Search flow action timeout value - The AI Search flow action in the topic block automatically times out at 10 seconds. You can change the length of time before this flow action times out by adding the system property com.glide.cs.fdih.atlassearch.timeout and setting these fields to change the timeout value:

The following tables list the input and output parameters for this topic block. For the output parameters, you have the option to deactivate any of the variables returned by the topic block.

Table 10. Run AI Search input parameters
Parameter Description
search_term Phrase entered by a user during the conversation.
Table 11. Run AI Search output parameters
Parameter Description
genius_results Variable that identifies the Genius Results returned.
search_results Variable that identifies the regular search results (multi-list output) returned.
search_metadata Variable that identifies the search result metadata used for click metrics in Conversational Analytics, such as the search term used, query language, and more.

Runtime Language Detection topic block

Use this topic block to detect the user’s language during a conversation and switch to that language mid-conversation if the language is supported in the Now Platform.

For example, in conversations where guest users are interacting with the bot in a language different from the current conversation language, you can use this topic block to change the language accordingly. This topic block enables your bot to:
  • Detect the language in conversations across all supported Virtual Agent channels.
  • Determine if the language is supported in the Now Platform, and if so, ask the user whether to switch to the detected language.
  • Switch to the detected language during the conversation if the user agrees to the switch.

Activate the Virtual Agent Language Detection and Translation plugin [com.glide.cs.runtime_language_detection_translation] to use this topic block.

The following table lists the input parameters for this topic block.

Table 12. Runtime Language Detection input parameters
Parameter Description
utterance (String) Text entered by the user.
Change language (Boolean) Option that displays a message to the user that does the following:
  • Indicates the bot has detected that the user is typing in a different language.
  • Asks whether to continue the conversation in the supported language. If the user responds yes, the conversation changes to the supported language.