Showing results for 
Search instead for 
Did you mean: 
New Member

Scheduling Working Hours in PVA Bot

Hello All,

I need assistance in Power Virtual Agent Bots, where I want to schedule working hours to respond to the users within the Bot.

I have created a topic in which there is a quick survey for assistance and resolution with "Yes" and "No" options.

If yes is selected, a survey will be sent to the customer for rating and submission.

However, if "NO" is selected, the Bot should verify the time and respond accordingly to the company's working hours. If the customer response is within the working hours, it will redirect to the agent, and if it is beyond working hours, it will send a message.

I need assistance here on how to configure working hours with/within the Bot for it to identify/verify and respond accordingly?

E.g., Company working hours are from 9 am – 5 pm. A survey is sent to the customer, and if (s)he responds to the resolution as "NO" before 5 pm, then Bot should check the same with the company working schedule. However, if the response is within the support hours, it should direct it to the live agent or search for another topic for the resolution. If the response is received post 5 pm beyond the working hours, a notification will be shown to the user regarding the business working hours.

I want to schedule this working hour for Bot to identify working hours and respond accordingly if the customer response is within or beyond the working hours.

Super User
Super User

Hi @HarshChat,


Like suggested in the other thread, you could use a flow for this to retrieve the current time. In the topic of the Power Virtual Agent you can check the outcome of that flow and show the appropriate message to the user.


Below is an example for 09-17.


1. The Topic setup. As you can see it calls a flow and retrieves the BusinessHours output. A condition checks what the outcome is. When it is equal to OutOfBusinessHours text it will show an opening hours message to the user.




2. The Get Business Hours flow setup. It uses the Business Hours text output variable. The value contains the following expression:

if(and(greaterOrEquals(utcNow('HH'), '09'),lessOrEquals(utcNow('HH'), '17')), 'BusinessHours', 'OutOfBusinessHours')



Hi Expiscornovus,

Thank you for sharing a solution I'll try the same.

Helpful resources

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.


New Year’s Resolution - Build Conversational Bots!

Access all of the Power Virtual Agents learning resources and join the January learning challenge.

Top Kudoed Authors
Users online (2,207)