One use case for Metadata is to annotate data which helps measure the solution value in business terms. For example, in a coffee shop, the owner can track the solution value by looking at the number of coffees sold, as that is a clear number which indicates the revenue for the owner. On this page, we will add a Metadata tag inside our solution and later use Teneo Query Language to extract the corresponding information.
The first step is to create a new Metadata tag that can be placed inside the flow to track the number of sold coffees.
It is now time to place a Metadata tag inside the User wants to order coffee flow.
Before the new version of the solution can start collecting Metadata information, and in order to make the recent changes active, it is important to publish the solution again.
Metadata is logged once your bot has been published and end users start having conversations with it. To see the full potential of what metadata can do for your project, make sure that the bot is published and in use for long enough to gather interesting conversation logs.
For this step, it is important that the solution has been published for a while and people have talked to it, as we are going to use Teneo Query Language to extract the number of coffees sold by our bot.
ca t.e.md:CoffeeType as 'Coffees sold' : t.e.md:CoffeeOrdered == true. This should display the number of sold coffees.
The result should look like this,
Please see TQL Cookbook for more template queries.
Go ahead and test yourself by adding a similiar Metadata tag, this time to store the number of reserved coffee mugs in User wants to buy a coffee mug. If you are up for an extra challenge, you can also go ahead and store the ordered coffee type in a Metadata tag. This time you will need to have a string Metadata tag.
Was this page helpful?