Sub-process node

Updated at:

This document describes how to configure and use the sub-process node in process management, including application examples.

Overview

If multiple business processes share common steps, such as identity verification, address collection, or satisfaction surveys, you can encapsulate them into a sub-process. You can then reference this sub-process in your main processes to avoid building the same logic repeatedly.

Core Benefits:

Challenge

Without sub-processes

With sub-processes

Repetitive work

Build the information collection flow once for the exchange process and again for the delivery process.

Build it once and reuse it in multiple main processes.

High maintenance cost

If the collection logic changes, you must update multiple main processes.

Update one sub-process, and the changes apply automatically to all main processes.

Difficulty ensuring consistency

Maintaining each process separately can lead to version drift.

Centralized maintenance ensures consistency by design.

Use case

Consider an e-commerce platform with exchange/return and delivery service processes:

  1. Exchange/Return Process

Exchange/After-sales task → [Information Collection] (sub-process: Name, Phone, order ID, Tracking Number)

↓

Information collection successful?

├── Success → Proceed with exchange/after-sales

└── Failure → Do not proceed with exchange/after-sales

  1. Delivery Service

Delivery service → Select item for delivery → [Information Collection] (sub-process: Name, Phone, order ID, Tracking Number)

↓

Information collection successful?

├── Success → Proceed with delivery

└── Failure → Do not proceed with delivery

Both of these processes require "Information Collection." This shared flow can be encapsulated as a sub-process to avoid redundant work.

Procedure

(1) Create a sub-process

Create a sub-process by configuring its nodes, similar to how you build a main process. For detailed steps on configuring each node, see process management.

  1. Navigate to process management >> sub-process and click New sub-process to create the "Information Collection" sub-process.

  2. Build the process as required. The key differences between a main process and a sub-process are detailed in the following table:

    Difference

    Main process

    Sub-process

    Intent edge of start node

    Displays a specific intent name (e.g., "return," "exchange"). The process starts when the user's input matches the intent.

    Displays "Default." It is not triggered by intent matching; instead, it is called by a sub-process node in a main process.

    End node

    No direct end node. The process ends via a bot response node, knowledge reply node, process redirection node, or sub-process node.

    Has a direct end node, the "return to main process node." A sub-process can end in the following ways:

    • A bot response node or knowledge reply node acts as the end node. This terminates the entire conversation without returning to the main process.image

    • A parameter collection node, plugin invocation node, logic node, or A/B testing node connects directly to the return to main process node. This returns control to the main process to continue execution.image

    Sub-process node

    You can add a sub-process node to the canvas to reference a published sub-process.

    The sub-process node is not available on the sub-process canvas.

    Proactive retrieval

    You can configure it to guide the user back to the current process if they deviate.

    Cannot be configured separately. It inherits the proactive retrieval setting from the main process.

    Triggering method

    The process triggers directly when user input matches an intent.

    It cannot be triggered independently and can only be called by a main process.

    image

  3. After creating the sub-process, click Test and then Publish. A main process can only select and use published sub-processes.

(2) Reference a sub-process

In the main process, add a sub-process node at the desired location and select the target sub-process:

  • If the sub-process ends with a return to main process node, its subsequent edge can be an intent edge or a conditional edge.

  • If the sub-process ends with a bot response node/knowledge reply node, the main process has no subsequent edge, and the conversation terminates.

image

(3) Verify the results

  1. Verify the delivery service process. The following figure shows the result:

    image

  2. Verify the return/exchange task process. The following figure shows the result:image