Product Documentation Product Documentation
Developer Documentation (opens new window)
Developer Documentation (opens new window)
  • Knowledge Base

  • Task Workflow

    • Create Task Workflow
    • Message Card Configuration
      • LLM Task
    • Knowledge Usage Statistics

    • Knowledge Center
    • Task Workflow
    Sobot
    2025-05-26
    Menus

    Message Card Configuration

    # Message Card Configuration

    ——Learn about the message card configuration product we provide for you through this article.

    # The Function of Message Cards

    We hope that before you learn about the task workflow function, you can understand its scenarios and uses:

    ● Usage scenario: When a user asks the agent about products or logistics information, the agent can reply clearly by sending a message card.

    ● Purpose: In the task workflow, you can use the interface node to query all orders or logistics information under the user's name. The orders and logistics information will be sent to the customer in the form of a message card list. The customer can select the correct order or logistics card, or click on the card to jump to a specific website.

    # Feature Highlights

    1. Simple configuration: No need to modify the interface according to the Sobot developer documentation. Enterprises can fill in the JSONPath expression through backend configuration, and Sobot can extract parameter values based on JSONPath and fill them into specific slots on the card. Card slots support custom enabling or disabling, and buttons such as "Send Card" or "Jump to Link" can be added on the card.

    2. Interactive Intelligence: Users can select cards not only by clicking the "Send Card" button, but also by replying with Arabic numerals 1, 2, 3 or entering simple descriptions like "the first one" or "the second one".

    3. Card messages are supported on Android SDK for Android 4.2 (API 17) and above, and on iOS 10 and above (HarmonyOS is not supported currently); they are also supported on WhatsApp, Instagram, Facebook, and WeChat channels.

    # How to Use Message Cards

    The following will introduce you to the function and effect of each feature:

    # ● How to Use Message Cards
    1. Create the interface for the AI Agent to call in the [API Call - Select API- Create]. The [Output Parameters] will serve as the data source for the content in the card fields.

    Message Card Creation Interface Page01

    Figure 1:Message Card Creation Interface Page

    1. Fill in the JSONpath expression for the return parameters of the interface.

    Page for Entering JSONpath Expressions02

    Figure 2:Page for Entering JSONpath Expressions

    JSONPath Basic Syntax:

    A. Basic Selector

    Expression Function Example JSONPath Match Results
    $ Root node $ The entire JSON document
    . Or [] Child Node (Attribute Access) $.key or $['key'] Get the value of the key
    * Wildcard (matches all elements or attributes) $.* All attribute values of the first level
    .. Recursive descent (search all levels) $..key All levels of key values

    B. Array index

    Expression Function Example JSONPath Matching results
    [n] Select the n-th element of the array (starting from 0) $.array[1] The second element of the array
    [start:end] Slicing (Python style, inclusive of the start and exclusive of the end) $.array[0:2] The 1st and 2nd elements of the array
    [?(expr)] Filter expression (similar to SQL WHERE) $[?(@.price > 10)] All objects where price > 10

    C. Example

    Assume there is a JSON data:

    {
        "store": {
            "book": [
                { "title": "Book1", "price": 10 },
                { "title": "Book2", "price": 20 }, 
                { "title": "Book3", "price": 30 }
                ],
            "location": "Beijing"}
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9

    Example query:

    Requirement JSONPath Expression Result
    Get all book titles $.store.book[*].title ["Book1", "Book2", "Book3"]
    Get the price of the first book $.store.book[0].price 10
    Find books with prices greater than 10. $.store.book[?(@.price > 10)] [{"title": "Book2", "price": 20}, ...]
    Recursively search for all price fields $..price [10, 20, 30]
    1. Set up the robot action to perform the following steps:

     a. Variable assignment: Assign the parameter values returned by the interface to the robot variables, for use in subsequent conversations and branch judgments.

     b. Set the guiding words. The final guiding words will be polished by the large model before being sent out.

     c. Configure the message card fields. You can bind the interface output parameters to the card fields, so that different fields on the card display different data. Meanwhile, it supports adding custom fields.

     d. Set card actions. Support two custom actions: sending cards and jumping to external links.

    Set Robot Action Page03

    Figure 3:Set Robot Action Page

    1. Request Timeout: Set the timeout duration for API requests and actions to take after a timeout.
    # ● Message Card Effect
    1. The effect of the robot's actions after setting the interface output parameters in [Knowledge Center - Workflow Management - Main Workflow - API Call - Bot Actions].

     a. Send Card Action Effect: Send card style in own channels, and send plain text module cards in third-party channels.

    Card Style Page Sent via Own Channels04

    Figure 4:Card Style Page Sent via Own Channels

    Card Style Page Sent Via Three-party Channels05

    Figure 5:Card Style Page Sent Via Three-party Channels

     b. Message card jump link effect: After the card is configured with a send button, the customer can click "Send Card". The robot will recognize the card information and assign variables (for example, if the customer wants to check logistics, the robot finds three orders. The customer selects one order and clicks send. The robot will collect the order ID from the card sent by the user and use this order ID as input to query the order's logistics, then return the logistics information). For this send card action, in addition to clicking, C-end users can also say "the first", "the second", or reply with numbers "1", "2", "3" to achieve the same result.

    Variable Assignment Page06

    Figure 6:Variable Assignment Page

    Click The Card to Navigate to The Page07

    Figure 7:Click The Card to Navigate to The Page

    Reply With a Number to Jump to The Page08

    Figure 8:Reply With a Number to Jump to The Page

    Reply With a Number to Jump to The Page for Third-Party Channels09

    Figure 9:Reply With a Number to Jump to The Page for Third-Party Channels

     c. Click "View Details" to see the detailed information of the product.

    Self-owned Channel View Details Page10

    Figure 10:Self-owned Channel View Details Page

    View Details Page for Third-Party Channels11

    Figure 11:View Details Page for Third-Party Channels

    Last Updated: 6/9/2025, 10:47:54 AM

    ← Create Task Workflow LLM Task→

    Update Date
    01
    Multilingual Configuration
    08-19
    02
    AI Assistance
    08-18
    03
    WhatsApp Number Migration Guide
    06-23
    More Articles>
    Theme by Vdoing
    • Follow Sys
    • Line
    • Dark
    • Read