PDA

View Full Version : Setting Work Hours for Specific Day



flyboy_dea
06-24-2011, 03:03 AM
I have adapted a custom VXML AA script but I am having trouble setting the datetime for Friday work hours to 8-Noon and then 1:00 to 4:30. M-Th uses the same code but the last half of the day is 1 to 5 pm.

Here is the snippet that sets the time but last portion of it sets the time for between 1:00 and 5:00. Not sure how to get the time set to 4:30 instead of 5:00. Any help is appreciated.

<!-- Fri:8-Noon; 1:00-4:30 -->
<if cond="datetime_wday == '6'">
<if cond="datetime_hour &lt; '8'">
<elseif cond="datetime_hour &lt; '12'"/>
<assign name="business_hours" expr="'1'"/>
<elseif cond="datetime_hour &lt; '13'"/>
<elseif cond="datetime_hour &lt; '17'"/>
<assign name="business_hours" expr="'1'"/>
<else/>
</if>
</if>
Thanks.

shah11186
06-28-2011, 03:21 AM
Hi,

You can achieve your required day-end hours by adding few rows in the place shown bellow:

<!-- Fri:8-Noon; 1:00-4:30 -->
<if cond="datetime_wday == '6'">
<if cond="datetime_hour &lt; '8'">
<elseif cond="datetime_hour &lt; '12'"/>
<assign name="business_hours" expr="'1'"/>
<elseif cond="datetime_hour &lt; '13'"/>
<elseif cond="datetime_hour &lt; '17'"/>
<!-- ----------------------------- -->
<if cond="datetime_hour == '16'">
<if cond = "datetime_min &lt; '30'">
<assign name="business_hours" expr="'1'"/>
</if>
<else>
<assign name="business_hours" expr="'1'"/>
</if>
<!-- ----------------------------- -->
<else/>
</if>
</if>

Regards,
Samvel

flyboy_dea
07-05-2011, 07:23 PM
Thanks I will try it.