<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Time based dynamic IVR in Contact Pro</title>
    <link>https://community.sinch.com/t5/Contact-Pro/Time-based-dynamic-IVR/m-p/11568#M403</link>
    <description>&lt;P&gt;Hi Community,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am looking for an XML script that during opening hours from 9 to 12 and from 1 to 5, I offer an IVR menu with 3 options, but during lunch from 12 to 1 an IVR with only 2 options.&lt;/P&gt;
&lt;P&gt;I don't want to use schedules or other, but want to route inside the IVR condition to menu 1 or 2 based on time of day.&lt;BR /&gt;&lt;BR /&gt;Anybody came across the same, or similar?&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Thu, 09 Nov 2023 11:29:32 GMT</pubDate>
    <dc:creator>eewortel</dc:creator>
    <dc:date>2023-11-09T11:29:32Z</dc:date>
    <item>
      <title>Time based dynamic IVR</title>
      <link>https://community.sinch.com/t5/Contact-Pro/Time-based-dynamic-IVR/m-p/11568#M403</link>
      <description>&lt;P&gt;Hi Community,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am looking for an XML script that during opening hours from 9 to 12 and from 1 to 5, I offer an IVR menu with 3 options, but during lunch from 12 to 1 an IVR with only 2 options.&lt;/P&gt;
&lt;P&gt;I don't want to use schedules or other, but want to route inside the IVR condition to menu 1 or 2 based on time of day.&lt;BR /&gt;&lt;BR /&gt;Anybody came across the same, or similar?&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 09 Nov 2023 11:29:32 GMT</pubDate>
      <guid>https://community.sinch.com/t5/Contact-Pro/Time-based-dynamic-IVR/m-p/11568#M403</guid>
      <dc:creator>eewortel</dc:creator>
      <dc:date>2023-11-09T11:29:32Z</dc:date>
    </item>
    <item>
      <title>Re: Time based dynamic IVR</title>
      <link>https://community.sinch.com/t5/Contact-Pro/Time-based-dynamic-IVR/m-p/11569#M404</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is quite common requirement, I suggest you&amp;nbsp; read the IVR documentation and search for a keyword "datetime" (&lt;A href="https://docs.cc.sinch.com/cloud/ivr-development-guide/en/IVR_Development_Guide.pdf" target="_blank"&gt;https://docs.cc.sinch.com/cloud/ivr-development-guide/en/IVR_Development_Guide.pdf&lt;/A&gt; ). This way you can query current time and branch your IVR accordingly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another option is to use a schedule assigned to some dummy queue and query on open/closed queue status.&lt;/P&gt;&lt;P&gt;The latter is better for management, i.e. you have all time/date dependent data in one place. Managing time conditions directly written in different IVR will get complicated over time...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Dawood&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2023 13:30:53 GMT</pubDate>
      <guid>https://community.sinch.com/t5/Contact-Pro/Time-based-dynamic-IVR/m-p/11569#M404</guid>
      <dc:creator>dhlashwe</dc:creator>
      <dc:date>2023-05-11T13:30:53Z</dc:date>
    </item>
    <item>
      <title>Re: Time based dynamic IVR</title>
      <link>https://community.sinch.com/t5/Contact-Pro/Time-based-dynamic-IVR/m-p/11586#M405</link>
      <description>&lt;P&gt;Hi Dawood,&lt;BR /&gt;Yes, we already misuse queues as dummy queues to query open.close, but I was looking to make it leaner and add opening hours in the IVR and route either to menu 1 or menu, or even the an OOO message, based on ToD.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was experimenting and I feel I am close, but the condition does not return a true or false in the If-block.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have something like that?&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2023 08:22:03 GMT</pubDate>
      <guid>https://community.sinch.com/t5/Contact-Pro/Time-based-dynamic-IVR/m-p/11586#M405</guid>
      <dc:creator>eewortel</dc:creator>
      <dc:date>2023-05-12T08:22:03Z</dc:date>
    </item>
    <item>
      <title>Re: Time based dynamic IVR</title>
      <link>https://community.sinch.com/t5/Contact-Pro/Time-based-dynamic-IVR/m-p/11602#M406</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Like dhlashwe said, the keyword is "datetime" and using that in an &lt;STRONG&gt;IF&lt;/STRONG&gt; block. For example:&lt;BR /&gt;You create a variable that checks the current time:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;currentTime = datetime.datetime.now().strftime('%H:%M')&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;This will return a string in 24H format.&lt;/P&gt;&lt;P&gt;In the IF block you check the current time and place a&amp;nbsp;&lt;STRONG&gt;goto&lt;/STRONG&gt; element that will forward it to the right&amp;nbsp;&lt;STRONG&gt;Menu&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IF&lt;/STRONG&gt;: &lt;EM&gt;"12:00" &amp;lt;= &lt;STRONG&gt;currentTime&lt;/STRONG&gt; &amp;lt; "13:00"&lt;/EM&gt;&lt;BR /&gt;- &lt;STRONG&gt;goto &lt;EM&gt;Menu1&lt;/EM&gt;&lt;/STRONG&gt; (Lunch time)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ELSEIF&lt;/STRONG&gt; &lt;EM&gt;"09:00" &amp;lt;= &lt;STRONG&gt;currentTime&lt;/STRONG&gt; &amp;lt; "12:00" &lt;STRONG&gt;or&lt;/STRONG&gt; "13:00 &amp;lt;= &lt;STRONG&gt;currentTime&lt;/STRONG&gt; &amp;lt; "17:00"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;- &lt;STRONG&gt;goto&lt;/STRONG&gt; &lt;EM&gt;&lt;STRONG&gt;Menu2&lt;/STRONG&gt; &lt;/EM&gt;(Regular working time)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ELSE&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;- &lt;STRONG&gt;goto&lt;/STRONG&gt; &lt;EM&gt;&lt;STRONG&gt;ServiceClosedBlock&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;You don't have to use the datetime string format. You can use the datetime object and make comparisons with that. Also the order isn't important. You just need to make the checks correctly.&lt;BR /&gt;But I would also recommend using schedules with a dummy queue. With that it's hard to go wrong or make major mistakes in the IVR (Queue Query: Checking Service Availability). It's easier to mess up in the IVR if you make date/time comparisons there.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Alder&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2023 05:27:07 GMT</pubDate>
      <guid>https://community.sinch.com/t5/Contact-Pro/Time-based-dynamic-IVR/m-p/11602#M406</guid>
      <dc:creator>aldets</dc:creator>
      <dc:date>2023-05-16T05:27:07Z</dc:date>
    </item>
    <item>
      <title>Re: Time based dynamic IVR</title>
      <link>https://community.sinch.com/t5/Contact-Pro/Time-based-dynamic-IVR/m-p/11606#M407</link>
      <description>&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;That's what I was after! Thanks. I'll try it out.&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2023 07:00:43 GMT</pubDate>
      <guid>https://community.sinch.com/t5/Contact-Pro/Time-based-dynamic-IVR/m-p/11606#M407</guid>
      <dc:creator>eewortel</dc:creator>
      <dc:date>2023-05-16T07:00:43Z</dc:date>
    </item>
  </channel>
</rss>

