From 3d502ca0d67448c941f203c1442e8b99edd1914c Mon Sep 17 00:00:00 2001 From: Varun Shankar S Date: Mon, 19 Jun 2023 18:06:21 +0200 Subject: [PATCH] Update flows.mdx --- docs/docs/flows.mdx | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/docs/docs/flows.mdx b/docs/docs/flows.mdx index 7585fe6d9a1b..b5fc138a1f14 100644 --- a/docs/docs/flows.mdx +++ b/docs/docs/flows.mdx @@ -185,15 +185,14 @@ The `next` field in steps allows for branching logic. For instance: ```yaml - id: "2" - question: Do you have any other questions? + question: age next: - - intent: affirm - id: "3" - - intent: deny - id: "4" + - if: age < 18 + then: "3" + - else: "4" ``` -In this example, depending on whether the user's intent is "affirm" or "deny", +In this example, depending on the user's input value for age, the flow will proceed to step "3" or "4", respectively. This allows you to create complex and dynamic conversational flows that adapt to user inputs. @@ -288,7 +287,7 @@ flows: action: utter_something_specific_to_credit_card next: "11" - id: "11" - action: action_open_account + action: action_open_account ``` ### Multiple Flows with links