How to Set Up Service Hours and Holidays August 18, 2026 20:40 Updated Summary Setting Up Your Service Hours How to Configure Periods Without Service Setting Service Hours via Script (Optional) Tips SummaryThis documentation explains in detail how to create and configure the scheduling of your service operation hours. You will learn how to define queues, establish periods without operation, and set up the exit condition in the Builder to direct contacts when the team is unavailable. Setting Up Your Service Hours Access the Service Hours submenu, located in the Service menu in the Portal header. On the new screen, create a schedule by setting the following parameters: Name and description; Belonging queues; Schedule (days and operation hours); Periods without service. Save the configuration. The schedule will be created but will require setting an exit condition in your Builder to start functioning. After saving, your schedule will be created but not yet active. To apply the validation of your service hours, it is mandatory to SET AN EXIT CONDITION in your Builder’s service box. Go to the Builder menu. Select your bot's human service block. Navigate to the Exit Conditions tab. Find and click on the option + Condition for Service Hours. Set which block the conversation should follow if your service team is unavailable. Publish your bot so that the service hours become active in your operation. With this, just publish your bot for the service hours to start functioning in your operation. How to Configure Periods Without ServiceThis configuration is useful for holidays, recesses, or specific breaks in the operation.Navigate to the desired service hours schedule and go to the Periods Without Service section. Click the Register Period button. Fill in the configuration components shown on the screen: Period Name: Required field to customize the period title. Full Day: If enabled, the period without service will be blocked and set to start at 12:00 AM and end at 11:59 PM on the respective start and end days. In other words, the period always starts at 12:00 AM on the first day and ends at 11:59 PM on the last day. Start Day: Date when the period without service begins. End Day: Date when the period without service ends. Set Start Time: Time when the period without service begins. Set End Time: Time when the period without service ends. Practical Examples of Period Configuration Operation without service on January 10 and 11: Click the Register Period button to add a new period. Fill in the field with a title for your period. Keep the Full Day option enabled. Set the start date to January 10 and the end date to January 11. Operation without service on January 20, returning on January 21 at 1:00 PM: Click the Register Period button to add a new period. Fill in the field with a title for your period. Disable the Full Day option. Set the start date to January 20. Set the start time to 12:00 AM. Set the end date to January 21. Set the end time to 12:59 PM. Setting Service Hours via Script (Optional)If you choose to configure this via Script, follow these steps:1. Adding the SetWorkSchedule Script Access the block 2.0 - Check Service Hours. Create an entry action of type execute a script. Rename the script to SetWorkSchedule. The SetWorkSchedule script must be executed before the CheckWorkTime script. Do not set input variables for this script. Save the return in the variable workSchedule. The resulting script is shown below and can be customized as needed: function run() { let workSchedule = [ { num: 0, name: "Sunday", portugueseName: "Domingo", workTime: [ { start: "8:30", end: "12:00" } ] }, { num: 1, name: "Monday", portugueseName: "Segunda-feira", workTime: [ { start: "8:30", end: "12:00" }, { start: "13:00", end: "15:00" }, { start: "15:30", end: "18:00" } ] }, { num: 2, name: "Tuesday", portugueseName: "Terça-feira", workTime: [ { start: "8:30", end: "18:00" } ] }, { num: 3, name: "Wednesday", portugueseName: "Quarta-feira", workTime: [ { start: "8:30", end: "12:00" }, { start: "13:00", end: "18:00" } ] }, { num: 4, name: "Thursday", portugueseName: "Quinta-feira", workTime: [ { start: "8:30", end: "12:00" }, { start: "13:00", end: "18:00" } ] }, { num: 5, name: "Friday", portugueseName: "Sexta-feira", workTime: [ { start: "8:30", end: "12:00" }, { start: "13:00", end: "18:00" } ] }, { num: 6, name: "Saturday", portugueseName: "Sábado", workTime: [ { start: "8:30", end: "12:00" } ] } ]; return JSON.stringify(workSchedule); }2. Adding the CheckWorkTime Script Access the block 2.0 - Check Service Hours again. Create a second entry action of type execute a script. Rename the script to CheckWorkTime. Configure input variables strictly passing: config.dateTimeOffset and workSchedule. Save the return in the variable isWorkTime. Transfer the script below to your bot: // Receive the variables as parameters function run(offset, weekSchedule) { offset = parseInt(offset); weekSchedule = JSON.parse(weekSchedule); let today = nowUTC(offset); if (isWorkDay(today, weekSchedule)) { let todaySchedule = getTodaySchedule(weekSchedule, today); let intervalTime = getIntervalTime(todaySchedule, today); return checkTime(intervalTime, today); } return false; } function getIntervalTime(todaySchedule, today) { let intervalTime = []; for (let i = 0; i 0 && intervalTime[i].end - today 0) return true; } return false; } function getTodaySchedule(weekSchedule, today) { for (let i = 0; i 3. Publishing the FlowPublish the flow to apply all configurations.To continue configuring holidays via Script, follow the steps below:1. Creating the Verification Script Access the bot flow. Create a new block called 1.0 - Check Holiday. Access the block 1.0 - Check Holiday. Create an entry action of type execute a script. Rename the script to checkHoliday. No input variables are needed. Save the script's return in a variable called isHoliday. Delete the default script. Paste the code below: function run() { const today = new Date(); const holidays = ["01-01", "15-04", "21-04", "01-05", "16-06", "07-09", "12-10", "02-11", "15-11", "25-12", "14-10"]; const month = ((today.getUTCMonth() + 1) Press control + s to save. 2. Configuring Holiday Exit Conditions Still in the block 1.0 - Check Holiday, go to the exit conditions tab. Create a condition checking if the variable isHoliday equals true. Direct the true condition to a new block called 1.1 - It’s a Holiday. In the block 1.1 - It’s a Holiday, configure a message informing that on the specified day there is no service due to the holiday. Direct the default exit of the block 1.1 - It’s a Holiday to the Start of Flow or to the main bot redirection if using a router. Create a second condition in the block 1.0 - Check Holiday checking if the variable isHoliday equals false. Direct the false condition to proceed to the schedule verification block (we recommend naming it 2.0 - Check Service Hours).3. Customizing HolidaysAny date changes should be made only in the command let holidays.let holidays = ["01-01", "15-04", "21-04", "01-05", "16-06", "07-09","12-10", "02-11", "15-11", "25-12"]; By default, the script includes some national holidays. Below are some guidelines on how to add or remove holidays.AddAdding a new date must always be done in the “dd-MM” format. Using other symbols like slashes (/) instead of hyphens (-) will not work. Example of adding December 31. Add a comma Insert the desired date in the “dd-MM” format inside double quotes Press ctrl + s to save the script Publish the flow let holidays = ["01-01", "15-04", "21-04", "01-05", "16-06", "07-09","12-10", "02-11", "15-11", "25-12", “31-12”];Note: As a best practice, it is suggested to include the date in chronological order to facilitate future changes. For example, holiday 02-28 (Carnival) should be included between 01-01 and 15-04, as shown below. ["01-01", “28-02”, "15-04", "21-04", "01-05", "16-06", "07-09","12-10", "02-11", "15-11", "25-12"]; RemoveRemoving a specific date must also include removing a comma, as each holiday should be separated by only one comma. Example before: let holidays = ["01-01", "15-04", "21-04", "01-05", "16-06", "07-09","12-10", "02-11", "15-11", "25-12"];Example after removing 15-04let holidays = ["01-01", "21-04", "01-05", "16-06", "07-09","12-10", "02-11", "15-11", "25-12"]; Suggested StructureThe suggestion below uses the human service template bot provided; it is important that the implementation fits the structure of each bot. Create a new block called 1.0 - Check Holiday which will receive the configurations detailed above. Create a new block called 1.1 - It’s a Holiday which will have a message informing that on the specified day there is no service due to the holiday and direct its default exit to the Start of Flow or redirection to the main bot if using a router. In the block 1.0 - Check Holiday, create two exit conditions to check the variable isHoliday. If true, send to 1.1 - It’s a Holiday; if false, send to the schedule verification block. Tips As a best practice, it is suggested to include holiday dates in chronological order to facilitate future changes. For example, holiday 02-28 (Carnival) should be included between 01-01 and 15-04. Modify the SetWorkSchedule script if you want to add, change, or remove service days and hours. Change the chatbot configuration variables if you want to adjust the time zone. Since this example is used for checking human service hours, the location for changing the service hours definition will not be the same as the official service template. Need more help? Explore our content at Blip Academy or Blip Community, watch tutorials on our YouTube channel, or ask your questions in our support channel 😃 Related articles Adjusting Builder Time Custom Breaks Creating interactive messages in WhatsApp Sending Active WhatsApp Messages in Blip Desk Audience file configuration - Bulk notification sending