web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Scheduling Working Hou...
Copilot Studio
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.

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,189 Most Valuable Professional on at

    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

  • Harsh 786 Profile Picture
    14 on at

    Hi Expiscornovus,

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

  • Harsh 786 Profile Picture
    14 on at

    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

  • Expiscornovus Profile Picture
    33,189 Most Valuable Professional on at

    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

  • Benji101 Profile Picture
    2 on at

    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 😄

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 255 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 205 Super User 2025 Season 2

#3
S-Venkadesh Profile Picture

S-Venkadesh 101 Moderator

Last 30 days Overall leaderboard