---
sourceDocument: Brazil Conversational Interfaces
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/conversational-interfaces

 Release :

    - brazil

ft:locale :

    - en-US

ft:publication_title :

    - Brazil Conversational Interfaces

ft:clusterId :

    - convint

bundleId :

    - convint

workflow :

    - Platform


---

# Maximizing code reuse with topic blocks

# Maximizing code reuse with topic blocks {#ariaid-title1}

Release version: Brazil  
Updated September 10, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 2 minutes to read
Summarize  
![AI sparkle icon](https://servicenow.com/docs/portal-asset/ai-sparkle-icon) Summarized using AI  
This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.  

## Summary of Maximizing code reuse with topic blocks

Topic blocks in ServiceNow Virtual Agent are reusable subflows designed to perform common tasks or conversational elements within conversations.
They enable you to simplify and streamline topic authoring by reusing standard procedures or actions across multiple conversation topics, enhancing maintainability and efficiency.
Show full answer Show less  

## Key Features

* **Creation and Management:** Topic blocks are created and managed through Assistant Designer, where you set properties, define controls (nodes), test, preview, and publish the blocks for reuse.
* **Reusability:** Once published, topic blocks appear in the Asset library as utilities that can be included in calling topics or other topic blocks, supporting nested calls but preventing self-calls to avoid infinite loops.
* **Prebuilt Topic Blocks:** The platform provides prebuilt topic blocks for common functions such as transferring to Live Agent, collecting survey feedback, and stopping AI agent execution. These can be duplicated and customized in the appropriate application scope.
* **Integration:** Topic blocks are not discoverable by large language models directly and are accessed only via calling topics, allowing modular conversation design.

## Practical Use and Maintenance

* **Implementing Topic Blocks:** To utilize topic blocks, create reusable components that perform specific functions and add them to calling topics or other topic blocks, specifying input parameters and managing outputs.
* **Updates and Impact:** When you update a published topic block, Assistant Designer checks for potential impacts and notifies you about necessary changes to calling topics to maintain conversation integrity.
* **Infinite Loop Prevention:** The system detects infinite loops caused by topic block nesting and terminates conversations to ensure stability.

## Benefits for ServiceNow Customers

Using topic blocks allows ServiceNow customers to maximize code reuse in Virtual Agent conversations, reducing repetitive work, improving consistency, and enabling easier updates across multiple conversation topics. This modular approach facilitates efficient conversation design, maintenance, and scalability within the Virtual Agent framework.  
Topic blocks are reusable components that you can create to run common tasks and
conversational elements in Virtual Agent conversations. Topic
blocks simplify the topic authoring and maintenance process by enabling you to reuse standard
procedures or actions across conversation topics.

## How reusable topic blocks work {#topic-blocks-overview__section_ayr_x4g_1kb}

A topic block is basically a subflow that performs certain actions or conversational tasks in a topic. For example, you can build a topic block that creates or retrieves certain types of records. You create topic blocks with Assistant Designer, similar to the way that you build conversation topics. In the Assistant Designer Asset library, you can do the following:

* Set topic block properties.
* Define the controls (nodes) used in the block.
* Test or preview the block.
* Publish the block to make it available for use in topics or other topic blocks.
{#topic-blocks-overview__ul_bzp_vwv_1pb}

Unlike topics, topic blocks are not discoverable by a large language model (LLM). The topic block's functionality can only be accessed by a topic.

A conversation that uses (consumes) a topic block is referred to as the calling topic. A topic block can call another topic block, but it cannot call itself. You can "nest" topic blocks in this manner, even if the
flow returns to the initial topic, as in this example:  
Figure 1. Chain of nested topic blocks  
Note:  
If Virtual Agent detects an infinite loop, the conversation ends.

The Virtual Agent platform and applications provide prebuilt topic blocks for common tasks or subflows. You can use these prebuilt topic blocks in your conversation topics "as is" in the appropriate application
scope by duplicating them. You can then customize these prebuilt topic blocks as needed. Some of the common topic blocks include the following.  
{#topic-blocks-overview__table_dxm_wkw_jkb__entry__2}

| Prebuilt topic blocks | Application scope |
|-|-|
| * Live Agent: Transfers a bot conversation to a live agent. * Survey-LLM: Presents a survey for collecting feedback for an agent. * AIA Interrupt Handler: Stop AI agent execution. {#topic-blocks-overview__ul_nty_d5y_jkb} | Global. Provided with the Glide Virtual Agent plugin (com.glide.cs.chatbot). |
[Table 1. Examples of prebuilt topic blocks]

{#topic-blocks-overview__table_dxm_wkw_jkb}

On the home page, you can use the filter icon ![Filter icon.]() to filter and view only the topic blocks.

After you create and publish a topic block, the block is available for use as a Topic Block utility in the Asset library. You can add the topic block to a calling topic or to another topic block. In the following example, the
calling topic uses the Contextual Search topic block. When a topic calls the Contextual Search topic block, the conversation flow contained in the topic block executes.

## What to do next {#topic-blocks-overview__section_nk4_43h_1kb}

Working with topic blocks involves the following steps:

1. [Create a reusable topic
   block.](https://servicenow-prod.fluidtopics.net/k6pzIGSQ_xsw8mBhD~cAmw "Build a reusable component that performs a specific subflow of tasks and conversational elements in Virtual Agent conversations.")

   Build a conversation component that performs a common function that
   can be reused in Virtual Agent conversations.
2. [Add a reusable topic block to a
   calling topic or topic block.](https://servicenow-prod.fluidtopics.net/vF4UydsXfrtC0RozFOLx3Q "Add a reusable topic block to a calling (parent) topic or topic block to run a specific function or task in the calling topic. You specify input parameters used in the topic block, and you specify output parameters that are used by the calling topic.")

   To run a specific subflow, add a reusable topic
   block to a calling (parent) topic or topic block. Specify the inputs that are used in
   the topic block and review outputs that are returned from the topic block.
3. [Maintain topic blocks and associated calling topics (as needed).](https://servicenow-prod.fluidtopics.net/uNsy5t~cN89eg4KdJEJoQg "When you update topic blocks, Assistant Designer provides built-in checks to help you identify changes to topic blocks that affect the calling topics that use them. Updates include changing input and output parameters, deleting topic blocks, and publishing inactive and active topic blocks and calling topics.")

   When you update a published topic block, Assistant Designer performs certain checks. Displayed messages inform you of changes that you may want to make to calling topics that use the updated block.
{#topic-blocks-overview__ol_gpj_m1p_fpb}

