Teneo Developers

CLU x Teneo in 10 minutes

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 Studio and edit the 'User wants to order a coffee' flow, and the option to store the name in the first input while ordering coffee.

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

Now it's time to specify when the output should be skipped:

  1. Select the 'Ask for name' node. This will open the output configuration panel to the right.
  2. In the middle of the output configuration panel, you will find the 'Skip Conditions' field. Click on 'Add' to create a skip condition.
  3. Paste userNameForOrder into the 'Skip Conditions' field. This will be evaluated to true if the variable is set and to false if the variable is empty.
  4. Now use the drop-down menu beside 'Skip to' to determine how the flow processing should go on. In this case, it should be 'Get user name'.
  5. Hit 'Save'.

Next page
Republish and test
Was this page helpful?