Business Hours

Overview

The business hours module is used to activate the bot on a schedule basis.

For instance, you would like your bot to be active when no humans are at work.

WARNING

Currently this module uses the agent local timezone. Please get in touch with your Satisfaction.AI contact if you have questions.

Activation

Currenlty this module is activated using athena special file.

Create a new knowledge, and add this line on top of the file :

//!type=businessHours

What’s the configuration

With this module, you can define a week schedule: when your bot will be activated.

You can also add exceptions, that will override week schedule (holidays, day off …).

How to

Here’s the code you need to add after the first line :

{
    "production":{
        "week":{
        "w0": null,
        "w1":[{"start":"00:00", "end":"08:00"},{"start":"18:00", "end":"23:59:59"}],
        "w2":[{"start":"00:00", "end":"08:00"},{"start":"18:00", "end":"23:59:59"}],
        "w3":[{"start":"00:00", "end":"08:00"},{"start":"18:00", "end":"23:59:59"}],
        "w4":[{"start":"00:00", "end":"08:00"},{"start":"18:00", "end":"23:59:59"}],
        "w5":[{"start":"00:00", "end":"08:00"},{"start":"18:00", "end":"23:59:59"}],
        "w6": null
        },
        "exceptions":[
            {
                "day":"2018-01-01"
            },
            {
                "day":"2018-01-02",
                "timeRange":[{"start":"00:00", "end":"12:00"}]
            }
        ]
    },
    "development":{
    }
}

This json object contains 2 section, one per bot environment. If the bot environment is empty, the bot will be activated 24/7.

Inside the node, you can define a week node and an exceptions node.

Week node defines a time range for each day, “w0” belongs to sunday, “w1” to monday and so on.

If a day is missing, or is set to null, the bot is activated all day long.

The time range is a list of range, in this case, on monday to friday, we activate the bot from 0 am to 8 am, and from 6pm to 12pm

For exceptions, you need to specify the date and optionaly a timeRange. If not provided (timeRange), the bot will be activated all day long.