Beberapa produk dan fitur sedang dalam proses penggantian nama. Fitur playbook dan alur generatif juga dimigrasikan ke satu konsol gabungan. Lihat detailnya.
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Secara default,
playbook menggunakan LLM untuk mengontrol percakapan,
melakukan tindakan, dan merespons pengguna akhir.
Jika Anda memerlukan kontrol yang lebih eksplisit atas perilaku agen,
Anda dapat menggunakan
alur
atau tindakan bersyarat, yang dijelaskan dalam panduan ini.
Tindakan bersyarat adalah konfigurasi opsional untuk playbook.
Anda dapat menetapkan pemicu dan kondisi percakapan yang memanggil tindakan tertentu
seperti merespons dengan pesan tertentu,
memanggil alat eksternal,
memanggil playbook lain,
atau melakukan tindakan lain yang ditentukan.
Pemicu
Anda dapat menentukan pemicu yang merupakan langkah pertama
dalam menentukan apakah tindakan bersyarat dapat diterapkan.
Berikut ini menjelaskan jenis pemicu dan pemicu spesifik untuk setiap jenis:
Tahap siklus proses
Mulai playbook:
Dipicu saat playbook dimulai untuk pertama kalinya.
Sebelum LLM memutuskan tindakan berikutnya:
Dipicu setiap kali sebelum LLM memprediksi tindakan berikutnya.
Sebelum LLM menjalankan tindakan berikutnya:
Dipicu setiap kali sebelum LLM menjalankan tindakan.
Acara
Peristiwa kustom
Tidak ada input dari pengguna
Kondisi
Setelah pemicu terjadi,
langkah kedua adalah mengevaluasi kondisi yang diberikan secara opsional.
Kondisi diberikan menggunakan
sintaksis kondisi
yang sama dengan yang digunakan oleh rute alur.
Jika tidak ada kondisi yang diberikan,
pemicu saja akan digunakan untuk memulai tindakan.
Anda dapat menggunakan sintaksis berikut untuk mereferensikan parameter dan tindakan terakhir/berikutnya:
Parameter sesi
$session.params.PARAMETER_NAME
Parameter input playbook
$playbook.input.INPUT_FIELD_NAME
Tindakan terakhir (tindakan yang sebelumnya dieksekusi)
$last-action.name
$last-action.input.INPUT_FIELD_NAME
$last-action.output.OUTPUT_FIELD_NAME
$last-action.status
Tindakan berikutnya (tindakan berikutnya yang diprediksi LLM)
$last-action.name = "query_order" AND $last-action.status != SUCCESS
$last-action.name = "query_order" AND $last-action.output.orders = null
Tindakan
Setelah pemicu dan evaluasi kondisi opsional terjadi,
Anda dapat mengonfigurasi tindakan berikut yang akan dilakukan:
Memberikan respons kepada pengguna akhir:
teks, respons bersyarat, payload kustom, dan
audio yang direkam sebelumnya.
Saat memberikan teks, Anda dapat menyisipkan [pause], [pauseShort],
atau [pause long] untuk menyisipkan jeda dalam ucapan agen.
Contoh: How can I help you today? [pause long] I can help with....
Mengganti tindakan LLM berikutnya:
penggunaan alat, pemanggilan playbook, penyelesaian playbook, pemanggilan alur,
transisi playbook, transisi alur.
Mengubah setelan ucapan:
nama model, tidak ada waktu tunggu ucapan, sensitivitas endpointer, adaptasi.
[[["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-04 UTC."],[[["\u003cp\u003eThis page explains conditional actions, an optional feature for playbooks that allows for more control over agent behavior beyond default LLM-driven interactions.\u003c/p\u003e\n"],["\u003cp\u003eConditional actions are activated by triggers, such as lifecycle stages (like playbook start or before an LLM action) or events (like custom events or no user input).\u003c/p\u003e\n"],["\u003cp\u003eAfter a trigger, optional conditions can be evaluated using a specific syntax to determine if an action should be initiated, similar to how flow routes operate, with no conditions causing the trigger to initiate actions.\u003c/p\u003e\n"],["\u003cp\u003eConditions can reference session parameters, playbook input parameters, and details about the last or next action, including their name, input, output, and status.\u003c/p\u003e\n"],["\u003cp\u003eUpon trigger and condition evaluation, a variety of actions can be configured, including responding to the user, overriding LLM actions, modifying speech settings, and enabling features like barge-in or DTMF.\u003c/p\u003e\n"]]],[],null,["# Conditional actions\n\nBy default,\nplaybooks use LLMs to control the conversation,\ntake actions, and respond to end-users.\nIf you need more explicit control over the agent's behavior,\nyou can use\n[flows](/dialogflow/cx/docs/concept/flow)\nor *conditional actions*, which are described in this guide.\n\nConditional actions are an optional configuration for playbooks.\nYou can set conversation triggers and conditions that invoke specific actions\nlike responding with a specific message,\ncalling an external tool,\ninvoking another playbook,\nor performing any other specified action.\n\nTriggers\n--------\n\nYou can define triggers that are the first step\nin determining whether a conditional action is applicable.\nThe following describes trigger types\nand the specific triggers for each type:\n\n- **Lifecycle stage**\n - **Playbook start**: Triggered the first time a playbook is started.\n - **Before the LLM decides its next action**: Triggered every time before the LLM predicts the next action.\n - **Before the LLM executes its next action**: Triggered every time before the LLM executes an action.\n- **Event**\n - **Custom event**\n - **No input from user**\n\nConditions\n----------\n\nOnce a trigger occurs,\nthe second step is to evaluate any optionally supplied conditions.\nConditions are supplied using the same\n[condition syntax](/dialogflow/cx/docs/reference/condition)\nused by flow routes.\n\nIf no conditions are supplied,\nthe trigger alone will be used to initiate actions.\n\nYou can use the following syntax to reference parameters\nand last/next actions:\n\n- Session parameters\n - `$session.params.PARAMETER_NAME`\n- Playbook input parameters\n - `$playbook.input.INPUT_FIELD_NAME`\n- Last action (previously executed action)\n - `$last-action.name`\n - `$last-action.input.INPUT_FIELD_NAME`\n - `$last-action.output.OUTPUT_FIELD_NAME`\n - `$last-action.status`\n- Next action (LLM predicted next action)\n - `$next-action.name`\n - `$next-action.input.INPUT_FIELD_NAME`\n\nYou can also use\n[system functions](/dialogflow/cx/docs/reference/system-functions).\n\nExamples:\n\n- `$session.params.current_user = null`\n- `$last-action.name = \"query_order\"`\n- `$last-action.name = \"query_order\" AND $last-action.status != SUCCESS`\n- `$last-action.name = \"query_order\" AND $last-action.output.orders = null`\n\nActions\n-------\n\nOnce a trigger and optional condition evaluation have occurred,\nyou can configure the following actions to take place:\n\n- **Provide a response to the end-user** : text, conditional response, custom payload, and [pre-recorded audio](#pre-recorded-audio). When supplying text, you can insert `[pause]`, `[pauseShort]`, or `[pause long]` to inject pauses in agent speech. Sample: `How can I help you today? [pause long] I can help with...`.\n- **Override the next LLM action**: tool use, playbook invocation, playbook completion, flow invocation, playbook transition, flow transition.\n- **Change speech settings**: model name, no speech timeout, endpointer sensitivity, adaptation.\n- **Enable barge-in**\n- **Allow cancellation of partial response playback**\n- **Send Call Companion SMS**\n- **Enable DTMF** : see [DTMF for telephony integrations](/dialogflow/cx/docs/concept/dtmf)"]]