Service node

Updated at:

This topic describes how to configure a service node in a conversation flow and explains the meaning of each parameter.

Function overview

A service node enables you to invoke global services, Function Compute, and third-party API operations. By calling a global service or a third-party API, you can retrieve data from external interfaces. Depending on your business needs, you can either use this data directly as the bot's response—for example, by calling a weather query API and using its response to answer a user's weather inquiry—or assign the data to a variable to use as a condition for branching in the conversation flow. Invoking these interfaces significantly enhances the bot's conversational capabilities and better supports real-world business scenarios.

Note

Create a node

Go to the conversation flow canvas and drag the service node from the left into the canvas to create a new service node.

image

Configure node content

The main configuration sections for a service node include service information, assignment information, and node branches.

image

Service information configuration

Digital employees support three service types: global service, Function Compute, and third-party API.

  • Global service: Invokes a service already defined in AI Platform > Global Service. When the conversation reaches the service node, it accesses the service and retrieves the result.

    Note

    After selecting Global service, choose a specific service. For more information, see Global service.image.png

  • Function Compute: Configure or reference an Alibaba Cloud Function Compute service to perform logical processing.

    Note

    You must activate Alibaba Cloud Function Compute before selecting this option. After choosing Function Compute, select the specific function to use.

    image.png

  • Third-party API: Directly calls a third-party API to obtain its return value.

    Note

    After selecting Third-party API, specify the invocation method, API endpoint URL, and request parameters.

    • Invocation method: Supports GET and POST.

      • GET: Requests data from a specific resource (retrieves page information and returns the entity body).

      • POST: Submits data to a specified resource for processing (such as submitting a form or uploading a file), which may create a new resource or modify an existing one.

    • Endpoint URL: The URL used to call the API.

    • Request parameters: The input parameters required by the API.

Assignment information

After invoking a service, you can assign the returned data to variables.

  1. Select the variable to assign.

  2. Enter the value to assign. Type "$" to see a list of available service return parameters.

  3. Choose whether to output the variable’s value to a report.

image

Note

Create variables before assigning values. Manage variables in AI Platform > Multi-turn Conversation > Variable Management.

image

Node branches

The system includes a default branch in every service node. If the service call succeeds, the conversation follows this branch. If the call fails, the system returns an API invocation failure message.

Note

If multiple branches are configured under a service node, the default branch has the lowest priority. When both a custom branch condition and the default condition are met, the conversation follows the custom branch.

image