All Products
Search
Document Center

Chat App Message Service:Configuration flow of WhatsApp AI assistant

Last Updated:Jun 17, 2025

With Alibaba Cloud Model Studio, You can create a large language model RAG application with no code to implement intelligent Q&A capabilities for your AI assistant. Through the flow editor of Chat App Message Service, you can orchestrate the integration between the WhatsApp message channel and the large language model application. Then users can chat with your official WhatsApp account.

Preparations

Prepare enterprise knowledge base files on-premises. These files serve as knowledge sources for the model. File types can be unstructured files like DOC, PDF, MD, and TXT, or structured files like XLSX and XLS.

Enterprise knowledge base files:

File type

Description

Example

Unstructured data files

Document-type files, suitable for systematic knowledge input.

They are complete documentation materials with systematic content. It can be product manuals, technical documents, operation guides, etc. The system can extract unstructured knowledge, allowing users to query detailed information from them. Supports uploading files in DOC, PDF, MD, TXT, and other formats.

image

Structured data files

Q&A-type knowledge files, suitable for single-point response knowledge.

They are knowledge points with questions and answers, suitable for direct answers. This format is more concise, easy for users to quickly obtain answers. The system can directly call these Q&A pairs to respond. Supports uploading XLSX or XLS files.

image

Procedure

  1. Log on to the Alibaba Cloud Model Studio console

    Log on to the Alibaba Cloud Model Studio console, then click Application to access the application feature page.

    image

  2. Upload knowledge base files to application data

    1. Go to the Application Data interface and click Import Data.

      image

    2. Drag a file or click to upload a file to import enterprise knowledge base files.

      image

  3. Create a knowledge base

    1. Go to the Knowledge Base interface and click Create Knowledge Base.

      image

    2. In Knowledge Base Information, fill in the Name, Description, Data Type (select by document type). For Configuration Mode, select Recommended. Click the Next Step button.

      image

    3. In Select File, choose the enterprise knowledge base files that you have imported. Then click Next Step.

      image

    4. In Data Processing, use the default Intelligent Splitting.

      image

    5. Click Import and wait for the status to change to Parsed. The knowledge base is now created.

      image

  4. Create an agent

    1. Go to the My Applications interface and click Create Application.

      image

    2. Select Agent Application, then click Create Now.

      image

    3. Select a suitable model in API Configuration. Qwen3, Qwen-Plus, and Qwen-Max are all acceptable.

      image

    4. Take Qwen-Plus as an example. Click Confirm.

      image

    5. Enter prompts. You can refer to the following prompt. Adjust or modify it as needed.

      Reference prompt:

      You are an expert in handling ChatFlow product inquiries, specifically responding to customer questions about the product's features. Do not answer questions from other domains.

      Please provide concise and efficient answers based on the provided knowledge base. Keep each response under 600 characters and insert emojis where appropriate to soften the tone.

      image

    6. In Knowledge, turn on the Knowledge Base switch. Then add a knowledge base.

      image

    7. The agent application has been successfully created. You can test whether its responses incorporate knowledge from the knowledge base. Use the Text Chat on the right.

      image

    8. Click Publish after test. The agent is ready to provide service now.

      image

  5. Record the application ID and API-Key

    1. Return to My Applications and record the application ID of the agent.

      image

    2. Click the Publish button to go to the Publish Channel interface.

      image

    3. Create an API-KEY and record it.

      image

  6. Go to Chat App Message Service or CPaaS platform to configure

    Note

    The CPaaS platform is suitable for service providers for management and distribution. For more information, see CPaaS platform.

    Chat App Message Service

    You can implement multi-turn dialogue with large language models through the flow editor in Chat App Message Service.

    Log on to the Chat App Message Service console. In the Chat Flow interface and under View Templates, select Multi-turn dialogue with Large Language Models (LLM).

    image

    CPaaS platform configuration

    Implement transitions between automatic intelligent responses and human agents through the flow editor in the CPaaS platform.

    Log on to the CPaaS console. In the Flow Editor interface under View Templates, select Customer Service Combining Large Language Models (LLM) With Human Agents to implement transitions between Chat Flow and human agents.

    image

    The following steps are the same in both Chat App Message Service and CPaaS:

    1. In flow editor canvas, find the Generate Reply from LLM by Previous User Input.

      image

    2. In the Generate Reply from LLM by Previous User Input configuration, on right-side pane, enter the API-KEY and application ID (application ID is the appId). Set the Implementation Type to Application. If you are using Alibaba Cloud Model Studio from the China site, set the protocol to Dashscope. If you are using from the international site, set the protocol to Dashscope(International). Then click the Create Flow button to create the WhatsApp AI assistant chat flow.

      image

  7. Publish Chat Flow

    1. Click Save and publish after creating the Chat Flow. Then click Bind and Launch.

      image

    2. In the Bind WABA interface, select your WhatsApp Business Account and phone number.

      image

    3. Your WhatsApp AI assistant is ready to provide service now.

      image