Teneo Developers

Studio web in 10 min

Your first step into a flow

Currently, the 'User wants to order a coffee' flow grabs the coffee type when we mention it in the first input. Unfortunately, this is not currently the case with names. Our goal with the next few steps is to fix that.

Before:

User: I want to order one flat white, my name is John.
Bot: Ok, what name shall I note for the order?

User: I just told you, my name is John!
Bot: Thanks for your order, John. Your flat white will be ready for pickup in 5 minutes.

After:

User: I want to order one flat white, my name is John.
Bot: Thanks for your order, John. Your flat white will be ready for pickup in 5 minutes.

Now let us explore how these conversations are possible!

Start with going back to Teneo and edit that flow, and the option to store the name in the first input while ordering coffee.

  1. Navigate to 'Solution Structure'.
  2. Open the flow 'User wants to order a coffee'. This is located inside the 'Flows' folder.
  3. Click on 'Edit' in the top left corner in the flow window. This will bring you into the edit mode of the flow.
  4. Select the Plus icon below 'Order a coffee', followed by 'After Match' and 'Entity'.
  5. In the panel on the right, scroll down to 'After Match', and paste in the following entity: PERSON.
  6. Click on 'Add Mapping' below the entity name.
  7. Now use the drop-down menu below to determine the source 'sPerson' and the target 'userNameForOrder'. This transfers the value from the source and merges it to the target.

Now it's time to create an additional path when the user name is mentioned, to specify when the output should be skipped:

  1. Navigate to the Plus icon located under the 'User responds with coffee type' node.
  2. Hover over the Plus icon and drag it to the last node, 'Summarize order'. This will create an additional path to be taken when the user name is mentioned together with an Junction.
  3. Click on the Plus icon above 'Ask for name' followed by 'Match' and 'TLML Syntax'.
  4. Paste in the following condition !{userNameForOrder} into the Syntax Condition editor. This will be evaluated to true if the variable is set and to false if the variable is empty.
  5. Hit 'Save'.

Next page
Test your flow again
Was this page helpful?