Stackoverflow is the best place to find use cases along with numerous questions. One such question that hit my radar was
How do I make my Chatbot to ONLY answer from 6 pm to 8 am - IBM Watson
or
Adding business hours to a chatbot
This is part of my shortposts (quick and short answers). For in-depth understanding, please check the Check
section below.
The question was IBM Watson Assistant specific.
Challenge
I accepted the challenge and here's what I came up with
- Create a top node called
input
and underIf assistant recognizes
- Add
now().before('18:00:00')
andnow().after('8:00:00')
as shown in the image below - Time is in 24 hour format - Assistant responds --> Text -->
We are open only between 6 PM and 8 AM every day
Add another node called
welcome
and under welcomeAssistant responds --> Text -->
Welcome, how can I help?
Check the Expression language documentation to understand more about the use of now()
Once done, click Try it
to see the chatbot to respond only between the times mentioned
Link to the Stackoverflow questions
Check
- Getting Started with IBM Watson Assistant
Top comments (0)