2

I want my chatbot to review the session parameters it knows so far. However, some are optional. So while I can state most of them simply in the entry dialogue, some of them I would like to state only if they have been filled in already. After it has done so, I want to move on to the next page. My plan of doing this is as follows:

  • Entry dialogue: "So far I know that $session.params.something and $session.params.something-else".
  • Parameter: $session.params.optional, fulfillment: Agent says: "I also know that $session.params.something-optional."
  • Conditional transition route: true. -> goes to next page.

However, I don't really know how I can tell the parameter to check for a previously filled in session parameter. Simply naming the parameter after the session parameter does not do the trick.

ThrowsError
  • 1,169
  • 1
  • 11
  • 43
Teresa
  • 353
  • 1
  • 5
  • 27

1 Answers1

4

I don't know if I fully grasped your question: this is what I understood.

  1. You have some session.params which are always present -> you state them in the entry dialogue.
  2. You also have session.params which are sometimes present -> you want to know how to state them in dialogue only when they're filled.

If this is the case I would probably come up with two solutions:

OPTION 1 Let's say the page is named Recap. As an entry dialogue to Recap you can add what you wrote in the first bullet: "So far I know that $session.params.something and $session.params.something-else".

Then I'd add two separate conditional routes:

  1. The first checks whether the optional parameters have all been filled. If some optional params have been filled you can add a fulfillment here stating this optionals before going to the next page. route

  2. The second just goes to the next page, because the $session.params.optional will be null: pay attention to put them in this order!

OPTION 2 A second option could be to build your own conditional response: so go to Entry dialogue, then add dialogue option, then conditional response. This block allows you to write your own conditions, for example:

if $session.params.optional != null
  So far I know that $session.params.something and $session.params.something-else. I also know that $session.params.optional
else
  So far I know that $session.params.something and $session.params.something-else.
endif
fcagnola
  • 640
  • 7
  • 17