With sys.any entity you can easily capture URLs sent to the bot by your clients and make use of them.
Teach your bot a new trick by adding the sys.url
entity to your interactions. It’s the best solution to grab useful links from the visitors and reuse them in the chat or pass them to your database or web services.
Chatbot example with the sys.url
entity
Let’s think of an example. Imagine that you’re running a business that gathers fresh entrepreneurs and you want the bot to collect some data from your potential clients, including their web addresses. The easiest way to do that is to use sys.url
— the system entity prepared by our team, that automatically recognizes URL and catches it.
{{
to trigger the entity window and select the one you you need.{{
to trigger the entity window and select the one you you need.In the following example, we’ll create a new story and modify the welcome interaction to ask our users for URLs.
-
First, we need to create a new interaction that will catch all the incoming messages with the URLa.. To do so, click the
+
button and give your new part of the story a name. I named itGet URL
. -
In the User Says tab we need to fill out the possible answers given by our users together with our sys.url system entity. To call this entity just type two curly brackets and find the
url
. Then decide the name of the the attribute that will hold values entered by users. -
Now we can reuse the attribute
url
that we gathered thanks to our system entity. Go to bot responses and create a new text message that included the attribute.