2.8.2 Bot Day/Night Theme Settings

The Bot interface can be customized to display in dark theme based on Day/Night time defined. Do the following:

  1. Open the chatbot.js file available in below location.

    <Installation Director >\javascripts\chatbots.js

  2. Locate and edit the pre-defined variable daylight property as required.
    var dayLight ="default";
    if((new Date()).getHours()>18)
    {
        dayLight='redwood-dark';
    };

Note the following:

  • Here, default is the generic theme provided by ODA based Chabot.
  • The number 18 represents 6PM, and Chabot theme changes after this time has elapsed in hours. The same can be changed as required.
  • Ensure not to change the variable since the same is called in the chat Widget Settings assigned to attribute theme - Widget Settings : theme: dayLight,

Once done, the daylight theme is as displayed based on time zone:

Figure 2-34 Bot Day_Night Theme Settings