Bắt đầu (Dialogflow)
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Việc phát triển một Hành động sử dụng Canvas tương tác cũng tuân theo các bước chung
để xây dựng một Hành động có tính tương tác. Sau khi tạo dự án Actions,
tác nhân Dialogflow, phương thức thực hiện và ứng dụng web, bạn sẽ xác định hoạt động giao tiếp giữa
Action và Canvas tương tác.
Làm theo các bước phát triển sau đây để xây dựng Hành động tương tác trên Canvas:
Thiết lập: Thiết lập nhiều công cụ và nền tảng để phát triển một Hành động có sử dụng Canvas tương tác.
- Tạo dự án Hành động: Tạo dự án chứa siêu dữ liệu cần thiết để định cấu hình, quản lý và xuất bản Hành động của bạn.
- Tạo tác nhân Dialogflow: Sử dụng Dialogflow để tạo giao diện trò chuyện cho Tác vụ của bạn.
Tạo Hành động trò chuyện: Xác định logic webhook cho các ý định trong Hành động có chứa HtmlResponse
. Tài liệu về Canvas tương tác cho bạn biết cách xây dựng Hành động bằng thư viện ứng dụng Node.js, nhưng bạn cũng có thể tạo bằng thư viện ứng dụng Java.
Tạo ứng dụng web: Sử dụng công nghệ web hiện có để tạo ứng dụng web và ghi logic tuỳ chỉnh phía máy khách sử dụng API Canvas tương tác.
Triển khai cho máy chủ web bạn chọn.
Triển khai việc thực hiện đơn hàng: Sử dụng Giao diện dòng lệnh (CLI) của Firebase để triển khai mã thực hiện đơn hàng.
Thử nghiệm Hành động: Tìm hiểu cách sử dụng
trình mô phỏng để thử nghiệm Hành động của bạn.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-24 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-24 UTC."],[[["\u003cp\u003eInteractive Canvas Actions blend conversational interfaces with rich visual experiences using web technologies.\u003c/p\u003e\n"],["\u003cp\u003eDevelopment involves setting up an Actions project, creating a Dialogflow agent, building a conversational Action with webhook logic, developing a web app using the Interactive Canvas API, and deploying the fulfillment.\u003c/p\u003e\n"],["\u003cp\u003eYou can build your Action using either the Node.js or Java client library, providing flexibility in your development process.\u003c/p\u003e\n"],["\u003cp\u003eThorough testing is essential, and the simulator provides a robust environment for validating your Interactive Canvas Action.\u003c/p\u003e\n"]]],["Develop an Interactive Canvas Action by first setting up an Actions project and Dialogflow agent. Next, build the conversational Action, defining webhook logic for intents. Subsequently, create the web app using web technologies and the Interactive Canvas API, and deploy it. Deploy the fulfillment code using the Firebase CLI. Finally, test the Action using the simulator to ensure it works correctly. These steps outline the core process.\n"],null,["# Get started (Dialogflow)\n\nDeveloping an Action that uses Interactive Canvas follows the same general steps\nfor building a conversational Action. Once you create your Actions project,\nDialogflow agent, fulfillment, and web app, you define the communication between\nyour Action and Interactive Canvas.\n\nFollow these development steps to build your Interactive Canvas Action:\n\n1. [Setup](/assistant/df-asdk/interactivecanvas/build/setup): Set up the various\n tools and platforms for developing an Action that uses Interactive Canvas.\n\n - Create an Actions project: Create the project that contains the metadata required to configure, manage, and publish your Action.\n - Create the Dialogflow agent: Use Dialogflow to build the conversational interface for your Action.\n2. [Build your conversational Action](/assistant/df-asdk/interactivecanvas/build/action): Define the\n webhook logic for the intents in your Action that include an\n `HtmlResponse`. The Interactive Canvas documentation shows you how to build\n your Action with the\n [Node.js client library](https://actions-on-google.github.io/actions-on-google-nodejs/2.10.0/classes/_service_actionssdk_conversation_response_html_.htmlresponse.html),\n but you can also build with the [Java client library](https://github.com/actions-on-google/actions-on-google-java).\n\n3. [Build your web app](/assistant/df-asdk/interactivecanvas/build/web-app): Use existing\n web technologies to create your web app and\n write the client-side custom logic that utilizes the\n [Interactive Canvas API](/assistant/df-asdk/interactivecanvas/reference/interactivecanvas).\n Deploy to your web server of choice.\n\n4. [Deploy your fulfillment](/assistant/df-asdk/deploy-fulfillment): Use\n the Firebase CLI to deploy your fulfillment code.\n\n5. [Test your Action](/assistant/df-asdk/interactivecanvas/build/test): Learn how to use\n the simulator to test your Action."]]