Condition include during time of day | Community
Skip to main content
Miles_Baltrusa3
December 6, 2021
Solved

Condition include during time of day

  • December 6, 2021
  • 1 reply
  • 741 views

I've got a live chat widget dropped on our site via Launch rule. I would like the script to be active during our support hours only.

 

What kind of condition could I use to restrict firing this rule during during our support window? (8 AM to 8 PM CT)

 

Thanks! 

Best answer by yuhuisg

Here's one possible solution:

  1. Create a Data Element that returns the current hour of day in CT in 24-hour format. You'll need to write your own code to do this.
  2. In your Rule that loads the widget, include a Condition that checks if this Data Element's value is between 8 and 20.

1 reply

yuhuisg
Community Advisor
yuhuisgCommunity AdvisorAccepted solution
Community Advisor
December 11, 2021

Here's one possible solution:

  1. Create a Data Element that returns the current hour of day in CT in 24-hour format. You'll need to write your own code to do this.
  2. In your Rule that loads the widget, include a Condition that checks if this Data Element's value is between 8 and 20.