Skip to main content

Notifications

Copilot Studio - Calling Actions from Copilot S...
Answered

Determine in PVA if where are in the morning, afternoon or at night ?

(0) ShareShare
ReportReport
Posted on by 1,017

Dear community,

In my previous version of Power Virtual Agent i connected a Power Automate flow to greet the customer.

The Power Automate flow retrieves the user from the Office365 connector and Time connector determines

if where are the morning, afternoon or at night.

 

So it displays the following message:

"Good afternoon Peter, I am the chatbot. How can i help you?

 

In het new version of PVA i do not need the PA flow to get my name from the office365 connector. I just use

the prebuild variable User.Firstname

 

My question: is it possible to determine if we are in the morning, afternoon or at night using perhaps the variables Conversation.LocalTimeZone and / or the variable Conversation.LocalTimeZoneOffset

 

This is my power automate flow: 

PeKi72_0-1696937671506.png

 

the value of the initialize variable is: int(body('Hour'))

the value of the compose is: 

if(less(variables('varNumber'),04),'Goedenacht ', if(less(variables('varNumber'),12),'Goedemorgen ', if(less(variables('varNumber'),18),'Goedemiddag ','Goedeavond ')))
 
Can this be done better now that i have the new version of PVA ?

Gr.P

 

 

Categories:
  • Verified answer
    remidyon Profile Picture
    remidyon on at
    Re: Determine in PVA if where are in the morning, afternoon or at night ?

    Hi @PeKi72 

    If you bot is in a single timezone you could use the Now() PowerFX and adjust the value based on your timezone.

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,422

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,711

Leaderboard

Featured topics