Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Saat intent dicocokkan saat runtime,
agen Dialogflow akan terus mengumpulkan informasi dari pengguna akhir
hingga pengguna akhir memberikan data untuk setiap parameter yang diperlukan.
Proses ini disebut
pengisian slot.
Secara default, Dialogflow tidak mengirim permintaan webhook fulfillment hingga telah mengumpulkan semua data yang diperlukan dari pengguna akhir.
Jika webhook untuk pengisian slot diaktifkan, Dialogflow akan mengirim permintaan webhook fulfillment untuk setiap giliran percakapan selama pengisian slot.
Meskipun pada umumnya, perintah parameter sudah cukup untuk mengumpulkan semua parameter
yang diperlukan, webhook untuk pengisian slot memungkinkan Anda menentukan logika agen
yang lebih spesifik selama pengumpulan parameter.
Misalnya, webhook Anda dapat menangani penyesuaian pertanyaan lanjutan
atau menetapkan slot parameter yang tidak dapat diambil dari respons pengguna akhir,
seperti dari database.
Mengaktifkan webhook untuk pengisian slot
Untuk mengaktifkan webhook untuk pengisian slot pada waktu desain:
Aktifkan Aktifkan panggilan webhook untuk pengisian slot.
Klik Simpan.
Menangani webhook untuk panggilan pengisian slot saat runtime
Pesan permintaan webhook yang diterima oleh layanan webhook Anda
memiliki kolom queryResult.parameters.
Kolom ini berisi kumpulan parameter saat ini yang disediakan
oleh pengguna akhir.
Nilai yang belum dikumpulkan akan ditetapkan ke string kosong.
Contoh pesan respons webhook untuk menetapkan parameter dapat ditemukan di
Contoh Respons Webhook.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-09-03 UTC."],[[["\u003cp\u003eDialogflow collects required data from users through a process called slot filling, continuing until all parameters are filled.\u003c/p\u003e\n"],["\u003cp\u003eBy default, Dialogflow only sends a fulfillment webhook request after all required data is collected, but it can be configured to send a request for each conversational turn.\u003c/p\u003e\n"],["\u003cp\u003eEnabling the webhook for slot filling provides more specific agent logic during parameter collection, such as customizing follow-up questions or setting parameters from a database.\u003c/p\u003e\n"],["\u003cp\u003eTo enable webhook calls during slot filling, toggle the "Enable webhook call for slot filling" option in the Fulfillment section of an intent within the Dialogflow ES console.\u003c/p\u003e\n"],["\u003cp\u003eWhen a webhook for slot filling is enabled, each request to the webhook contains a \u003ccode\u003equeryResult.parameters\u003c/code\u003e field showing the current parameters with uncollected values being empty strings.\u003c/p\u003e\n"]]],[],null,["# Webhook for slot filling\n\nWhen an intent is matched at runtime,\nthe Dialogflow agent continues collecting information from the end-user\nuntil the end-user has provided data for each of the required parameters.\nThis process is called\n[slot filling](/dialogflow/docs/intents-actions-parameters#required).\n\nBy default,\nDialogflow does not send a fulfillment webhook request\nuntil it has collected all required data from the end-user.\n\nIf *webhook for slot filling* is enabled,\nDialogflow sends a fulfillment webhook request for each\nconversational turn during slot filling.\n\nWhile in most cases, the parameter prompts are enough to collect all required\nparameters, a webhook for slot-filling allows you to define more specific agent\nlogic during collection of the parameters.\nFor example, your webhook could handle the customization of follow-up questions\nor setting parameter slots that cannot be retrieved from the end-user response,\nlike from a database.\n\nEnable webhook for slot filling\n-------------------------------\n\nTo enable webhook for slot filling at design-time:\n\n1. Go to the [Dialogflow ES console](https://dialogflow.cloud.google.com).\n2. Select an agent.\n3. Select **Intents** in the left sidebar menu.\n4. Select an intent.\n5. Scroll down to the **Fulfillment** section.\n6. Toggle **Enable webhook call for slot filling** on.\n7. Click **Save**.\n\nHandle webhook for slot filling calls at runtime\n------------------------------------------------\n\nThe webhook request message received by your webhook service\nhas a `queryResult.parameters` field.\nThis field contains the current set of parameters provided\nby the end-user.\nValues that have not been collected yet\nare set to empty strings.\n\nAn example of the webhook response message for setting parameters can be found in\n[Webhook Response examples](/dialogflow/docs/fulfillment-webhook#session_entity)."]]