Work with Version Flags
Congratulations, you have now created a working Longberry Baristas solution identical to the one we worked on when we first started the tutorials! Next up, you may want to expand your solution to include Longberry Bakers. However, let's say Longberry Bakers will not be set to deploy for a few more months; this would mean that you need a way to keep the features you add for the expansion separate from the current working solution in some way.
For cases like this, we can use Version Flags. In this section, we will demonstrate how to use Version Flags to differentiate between Stable and Latest versions of a solution in order to add Longberry Bakers functionality without interfering with our published Longberry Baristas bot.
Prepare the Solution
In order to be able to set your solution to 'Stable' mode you will need to add all the necessary documents to 'Stable' mode. This includes the following:
- Solution Properties (found in the Solution section of the Solution backstage)
- Trigger Ordering
- Prompt Trigger Ordering
- Global Listener Ordering
- Lexical Resources
You can add these to 'Stable' by selecting the relevant document and clicking the 'Set Stable' button.
Flows, language objects, and entities
To mark all flows, language objects, and entities as stable, we select each folder in the solution individually and click the ‘Set Stable’ button for each one.
Classes
For classes used inside the Longberry Baristas, we need to do the following:
- While in the solution main page, select the Class Manager located on the top navigation bar.
- Select the relevant classes and click on the 'Set stable' button.
This is how the Stable looks like inside the Class Manager:
Set entire solution to Stable
It is also possible to set the entire solution to 'Stable' at once. This can be done in the Solution Log.
- While inside the main solution window, click on the 'Solution' button located in the ribbon 'History' section. This will open up the 'Solution Log' which includes all of the recent changes made in the solution.
- Select the relevant 'Revision' number and click on the 'Stable' button. This will set all documents versions specific to the selected revision as stable.
Create a new Longberry Bakers flow
Let's start by creating a draft for our new use case. This draft is going to be about the baked goods we are offering; it will later be shown to and need approval from the team before it is completed.
- Start by creating a new flow and naming it
User asks about baked goods we offer
. - Name the trigger something like
Tell me about your baked goods
. - Add the following Intent examples:
example-inputs
1Do you have baked goods
2Do you serve cinnamon bun
3Do you have any desserts
4Do you serve muffins?
5Tell me about the baked goods you have
6Tell me about your baked goods
7What baked goods do you serve?
8What kinds of baked goods do you serve?
9What kinds of desserts do you sell
10Which baked goods are offered by Longberry Baristas?
11Which sorts of baked goods do you have
12
- Finally, click on the 'Generate' button under the 'Match' section to automatically generate a match requirement based on the example specification.
- As we are not sure yet what baked goods we intend to offer, we will leave the output node untouched and save the flow.
Test the Stable Version
It is time to do a final test in our Tryout before publishing our Stable Version of Longberry Baristas. When testing, we need to make sure we are not including anything from Longberry Bakers, as we do not want this included in our published bot.
This can be done with the following steps,
- While inside the main solution window, click on the Tryout button located in the ribbon. This will open Tryout in advanced mode.
- Select the 'Stable' button located in the 'Stable Version' section in the ribbon. This will only include the stable elements inside the flow to be tested in Tryout.
- Test your Longberry Baristas solution by asking it some questions, such as:
What coffees do you serve?
Suggest me a coffee!
- Everything works as it should. To make sure that the latest created Longberry Bakers flow is not included in this version, try to trigger it by asking the following question:
Which baked goods do you have?
As you can see, it does not trigger as we are only testing the 'Stable Version' of our solution.
Publish the Stable Version
Now that we have tested our solution in Tryout we will proceed by publishing the 'Stable Version' of our Longberry Baristas.
- Close down the Tryout window. This will return you to the main solution page.
- Open the 'SOLUTION' tab in the main solution window.
- Select 'Publish' in the left sidebar.
- Click the 'Manage' button and in the drop-down you will see a lot of different alternatives. Locate the 'Stable' section and choose 'Publish'. This will publish your solution to Teneo Web Chat where you can access it by pressing the link.
Test the Latest version
If we are interested in testing the whole solution and not the stable version we can do the following:
- While inside the advanced window of Tryout, switch over to the 'Latest' version by selecting the 'Latest' button located in the ribbon.
- Test the solution by asking the following questions:
What coffees do you serve?
Suggest me a coffee!
- Now let us make sure the Longberry Bakers flow is also included by asking the the following question:
Which baked goods do you have?
You may notice a yellow warning label; this is because the current flow we triggered is not finished. Let's proceed by finishing it now.
Finish the Longberry Bakers flow
As a final step, let us move on and finish the flow we started.
- Open the 'User asks about baked goods we offer' flow in edit move.
- Select the Output node and name it
We offer a variety of handmade baked goods...
. - Add the answer text
We offer a variety of handmade baked goods - from cinnamon buns to muffins and much more.
. - Go ahead and save the flow now.
Congratulations! You have now finished your first Longberry Bakers flow. If you want to publish the solution again including this flow, make sure to include it to stable and republish your solution.
Test yourself
Go ahead and add a new flow for Longberry Bakers, this time for ordering a baked good. The flow should follow the steps from the Extract Entities page, but instead of coffee types it should cover baked goods, such as cinnamon buns and muffins.