Thank you Jan.
I was also thinking how we can do Genesys schedule to the logic so we don't need worry about daylight saving or holidays in Australia, or do we need to have custom logic for these and change it as we need?
Original Message:
Sent: 10-25-2024 08:13
From: Jan Heinonen
Subject: Digital bot date
Hi,
It will return the day of week as an integer.
If you want to return the callback date in one expression the following should work
DayOfWeek(ToDate(AddDuration(GetCurrentDateTimeUtc(), MakeDuration(0, 11, 0, 0)))) == 6 ?ToDate(AddDuration(GetCurrentDateTimeUtc(), MakeDuration(3, 11, 0, 0))) :ToDate(AddDuration(GetCurrentDateTimeUtc(), MakeDuration(1, 11, 0, 0)))
It will add 3 days (returning date for Monday) if it's Friday, otherwise it adds 1 day.
------------------------------
Jan Heinonen
Contact Center Specialist
GlobalConnect AB
Original Message:
Sent: 10-25-2024 01:26
From: Phaneendra Avatapalli
Subject: Digital bot date
Hi Jan,
Thank you for your reply, I got an error when I added this statement saying "Cannot convert expression from type Integer to required type of Date." Not sure if I need to add anything else.
Regards
Phaneendra
------------------------------
Phaneendra Avatapalli
Client Support, Desktop Support
Original Message:
Sent: 10-23-2024 04:36
From: Jan Heinonen
Subject: Digital bot date
Hi Phaneendra,
You can use DayOfWeek to find out what weekday it is so you know if you should add 1 or 3 days to the current datetime.
DayOfWeek(ToDate(AddDuration(GetCurrentDateTimeUtc(), MakeDuration(0, 11, 0, 0))))
Returns
- Integer : Returns the day of week from the supplied DateTime as a value from 1 to 7. Sunday=1, Monday=2, Tuesday=3, Wednesday=4, Thursday=5, Friday=6, Saturday=7
------------------------------
Jan Heinonen
Contact Center Specialist
GlobalConnect AB
Original Message:
Sent: 10-22-2024 20:23
From: Phaneendra Avatapalli
Subject: Digital bot date
Hi Nicole, Yes it does work thank you so much for your help. Now I have to figure out how to configure so it knows the next business day. We are only open Monday to Friday so if someone does request for a callback on Saturday it should show the next business day which is a Monday.
------------------------------
Phaneendra Avatapalli
Client Support, Desktop Support
Original Message:
Sent: 10-22-2024 11:25
From: Nicole VanWie
Subject: Digital bot date
Hi Phaneendra. Could you use ToDate(AddDuration(GetCurrentDateTimeUtc(), MakeDuration(1, 11, 0, 0))) to add a duration of 1 day and 11 hours to the UTC date? Would that give you the next business day?
------------------------------
Nicole VanWie
UC Engineer
Original Message:
Sent: 10-21-2024 01:23
From: Phaneendra Avatapalli
Subject: Digital bot date
Hi everyone,
I'm working on displaying the next business date to the customer in our Digital Bot. Currently, I'm using the following expression:
ToDate(AddDuration(GetCurrentDateTimeUtc(), MakeDuration(0, 11, 0, 0)))
This successfully converts the current UTC time to Melbourne time (with the 11-hour daylight saving adjustment), but it only shows the current date.
What I need is for the bot to display the next business day so that a callback can be scheduled, and the customer can be informed when to expect it. I'm struggling with this part-how to base it on the bot's schedule and ensure it shows the next business day.
Any guidance or suggestions would be greatly appreciated!
Regards
Phaneendra
#DigitalBots
#DigitalChannels
------------------------------
Phaneendra Avatapalli
Client Support, Desktop Support
------------------------------