Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Copilot Studio - Bot Administration
Unanswered

Scheduling Working Hours in PVA Bot

(0) ShareShare
ReportReport
Posted on by 14

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.

  • Benji101 Profile Picture
    2 on at
    Re: Scheduling Working Hours in PVA Bot

    Hey @Expiscornovus

    Thank you for your solution, I'm just wondering how and where did you create the OutofBusinessHours variable and what was the formatting of the text within it? Thanking you in advance 😄

  • Expiscornovus Profile Picture
    31,726 Most Valuable Professional on at
    Re: Scheduling Working Hours in PVA Bot

    Hi @HarshChat,

     

    Yes that would probably be possible by using the Dataverse connector. For example the Customer Service Schedule records should be retrievable via the Teams Engagement Contexts table.

     

    teamengagementstable.png

  • Harsh 786 Profile Picture
    14 on at
    Re: Scheduling Working Hours in PVA Bot

    Hi @Expiscornovus

     

    I need assistance on configuring the PVA topic with Power Automate flow to return value based on the value into Dataverse (Operating Hours)

    We have PVA configured in Omnichannel with a chat channel. We use the operating hours as 24X7 to ensure that the chatbot (with PVA) will always be on. In the cases where the customer wants to connect with a Live agent (during the request "Transfer to Live agent"). We want to run the additional check based on the operating hours configured into the system (Operating Hours).

    As the operating hour's data gets stored into the calendar and calendar rule table, it isn't easy to read with power automate flow.

    Need assistance on identifying the easy way to configure Working hours for "Live Agent" and during the escalation from Virtual Agent to Live Agent, the additional condition will verify that if the customer request falls under the Working hours or beyond working hours.f

  • Harsh 786 Profile Picture
    14 on at
    Re: Scheduling Working Hours in PVA Bot

    Hi Expiscornovus,

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

  • Expiscornovus Profile Picture
    31,726 Most Valuable Professional on at
    Re: Scheduling Working Hours in PVA Bot

    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.

     

    checktime_pva.png

     

    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')

     

    flow_businesshours.png

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Copilot Studio - Bot Administration

#1
stampcoin Profile Picture

stampcoin 2

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 2 Super User 2025 Season 1

Overall leaderboard

Featured topics