ในสถานการณ์การโต้ตอบปกติของ Actions on Google ผู้ใช้จะพูดวลีเพื่อเรียกให้เกิดการดําเนินการ Actions on Google จะค้นหาการตอบสนองที่ตรงกับการดำเนินการของผู้ใช้และส่งคำขอไปยังการดำเนินการดังกล่าวเพื่อให้การตอบสนอง
เมื่อ Actions on Google พบว่า Fulfillment ของคุณตรงกับคำขอของผู้ใช้แล้ว ก็จะเป็นการเริ่มเซสชันการสนทนาโดยส่งคำขอ HTTP ที่มีเพย์โหลด JSON ที่มีข้อมูลคำขอของผู้ใช้ไปยังปลายทาง Fulfillment ของคุณ Fulfillment ของคุณแยกวิเคราะห์คำขอและแสดงผลการตอบกลับที่มีเพย์โหลด JSON จากนั้น Actions on Google จะแปลงเพย์โหลดเป็นเอาต์พุตเสียงพูดและมัลติมีเดียที่แสดงผลให้ผู้ใช้
รูปที่ 1 Actions on Google ที่เรียกใช้ Fulfillment ผ่าน Actions SDK
ดูข้อมูลเพิ่มเติมเกี่ยวกับรูปแบบเพย์โหลด JSON เมื่อ Actions on Google เรียกใช้ Fulfillment ผ่าน Actions SDK ได้ที่รูปแบบเว็บฮุคของการสนทนา
คำขอและการตอบกลับของ Dialogflow
เมื่อสร้างการดำเนินการ คุณสามารถเลือกใช้ Dialogflow เพื่อทำให้การสร้างอินเทอร์เฟซการสนทนาง่ายขึ้นได้ ในสถานการณ์นี้ Dialogflow จะทำหน้าที่เป็น
พร็อกซีระหว่าง Actions on Google กับ Fulfillment ของคุณ Actions on Google จะส่ง URL นั้นไปยัง Dialogflow แทนการส่งคำขอ HTTP/JSON ไปยังปลายทาง Fulfillment ของคุณโดยตรง
[[["เข้าใจง่าย","easyToUnderstand","thumb-up"],["แก้ปัญหาของฉันได้","solvedMyProblem","thumb-up"],["อื่นๆ","otherUp","thumb-up"]],[["ไม่มีข้อมูลที่ฉันต้องการ","missingTheInformationINeed","thumb-down"],["ซับซ้อนเกินไป/มีหลายขั้นตอนมากเกินไป","tooComplicatedTooManySteps","thumb-down"],["ล้าสมัย","outOfDate","thumb-down"],["ปัญหาเกี่ยวกับการแปล","translationIssue","thumb-down"],["ตัวอย่าง/ปัญหาเกี่ยวกับโค้ด","samplesCodeIssue","thumb-down"],["อื่นๆ","otherDown","thumb-down"]],["อัปเดตล่าสุด 2025-07-28 UTC"],[[["\u003cp\u003eActions on Google communicates with your fulfillment service through webhooks, sending JSON payloads that describe user requests.\u003c/p\u003e\n"],["\u003cp\u003eYour fulfillment service needs to process these requests, generate appropriate JSON responses, and send them back to the Assistant.\u003c/p\u003e\n"],["\u003cp\u003eThere are two main webhook formats: Dialogflow webhook format and Conversation webhook format, depending on whether you use Dialogflow or Actions SDK.\u003c/p\u003e\n"],["\u003cp\u003eWebhooks can handle different request types like invocation requests, conversation requests, and helper results, each with specific JSON structures.\u003c/p\u003e\n"],["\u003cp\u003eDialogflow can act as a proxy between Actions on Google and your fulfillment, handling the communication and format conversions.\u003c/p\u003e\n"]]],["Actions on Google uses webhooks to communicate with fulfillment services, sending HTTP POST requests with JSON payloads. Fulfillment services must parse these requests and respond with appropriately formatted JSON. There are two main webhook formats: Dialogflow and Conversation, corresponding to whether Dialogflow acts as a proxy. Webhook requests can be invocations, conversation turns, or helper results. The fulfillment reads parameters from the request payload and sends a reply back to the Assistant.\n"],null,[]]