Chatbot generator resources update

Official Content
This documentation is valid for:

A Module called CommonChatbots is created in the KB, which contains all the Chatbot generator pattern resources.

In the Build process, and in the Generate bot action, it is checked whether those resources have any change in comparison with the version of the resources that you have in the KB, and depending on the Keep Resources Updated property, they are updated or not.

When the resources need to be updated in the KB, if the property Keep Resources Updated property = prompt, the following dialog is shown:

image_2018726151349_1_png

The Chatbot generator resources to be updated are as follows:

image_20181123102249_1_png

Data

GXChatMessage: Table used to store messages and their metadata.

  • GXChatMessageId -> Message Identifier (GUID)
  • GXChatUserId -> FK of the GXChatUser table (GUID)
  • GXChatMessageMessage -> The message (The text you see in the chat)
  • GXChatMessageType -> Message type (if it is a response or is from the user including its format)
  • GXChatMessageImage -> If you send an Image, it is saved there.
  • GXChatMessageDate -> DateTime of the message 
  • GXChatMessageMeta -> Stores the metadata of the message (The JSON sent by the provider)
  • GXChatMessageRepeat -> Auxiliary for SD (see again)
  • GXChatUserDevice -> FK of the GXChatUser table
  • GXChatMessageInstance -> Instance of the conversational flow to which the message belongs

GXChatUser: Table in which users and their devices are stored.

  • GXChatUserId -> User identification (GUID)
  • GXChatUserDevice -> User device identification

GetUserId procedure: Includes an example assigning a hard coded sample user. You should change this code according to your needs.

Themes

The Carmine and CarmineSD Themes include the classes used to style the UI of the chatbot. These are default classes prefixed by "CF" which give a predefined style to the chatbot.

UI objects

  • PanelChatWeb -> called by the <InstanceName>WebUI generated object.
  • PanelChatSD -> called by the <InstanceName>SDUI generated object. The PanelChatSD panel has the Connectivity Support property set to Offline, in order to generate the tables locally in SD apps. This is for perfomance reasons, so it's more optimal the search for messages belonging to a user.

Context

GetContext and SetContext procedures have the logic to get and update the Chatbot Context from the GXChatMessage table. See HowTo: Manage the Context of the conversation through the Chatbot API for more information.

 

Note: These objects can be modified as desired because they aren't updated mandatorily every time the pattern is generated (as opposed to the generated objects of the Chatbot generator pattern). They are updated considering the Keep Resources Updated property.
The selection to update the resources is done in the Build process, and in the Generate bot action.

 


Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.