Scripted Chatbots are a particular case of chatbots where NLP is not used.
In this case, the Chatbot generator generates other objects (different from the objects for Machine-intelligent chatbots). Here we explain this in more detail.
First, it should be said that for Scripted chatbots, a Data Provider (called ChatbotDefinition) is generated under the instance Module (when the chatbot is generated).
Its Output property is ChatbotStruct (an SDT of the Chatbot Module).
The ChatbotDefinition Data Provider represents the Flows, User inputs, Responses, etc., and has the following basic properties:
To be considered in the call tree, the ChatbotDefinition Data Provider is called in a Dummy Event in the main objects (<InstanceName>WebUI object or <InstanceName>SDUI object), which call the Chatbot panels (e.g: CitizenEnergyServiceChatbotWebUI):
Event Start
CommonChatbots.PanelChatWeb(!"CitizenEnergyService")
EndEvent
Event 'Dummy'
CitizenEnergyServiceChatbot.ChatbotDefinition()
EndEvent
To support the cases where you have Conversational objects, conditional responses or Chatbot User Input Redirections, the following procedures are generated:
- CommandHandler
- CommandRedirectionsHandler
- CommandResponsesHandler
So, when they are generated, you'll see the following code in the main objects (e.g.: CitizenEnergyServiceChatbotWebUI)
Event Start
CommonChatbots.PanelChatWeb(!"CitizenEnergyService")
EndEvent
Event 'Dummy'
CitizenEnergyServiceChatbot.ChatbotDefinition()
CitizenEnergyServiceChatbot.CommandRedirectionsHandler()
CitizenEnergyServiceChatbot.CommandHandler()
EndEvent