Reprompt not working?

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

  • Author
  • Message
Offline

srmoser430

  • Posts: 20
  • Joined: Thu Oct 19, 2017 3:40 pm

Reprompt not working?

PostWed Apr 11, 2018 10:25 am

Hi Suport Team,

I have two questions regarding the code excerpt below:

    1 - the caller enters '040118#'. Why doesn't this pass the grammar check (termchar is set to #)?
    2 - Why isn't this reprompt working? Instead of reprompting for fld_startdate, the dialog moves onto the next field (fld_starttime).

Thanks for your help!
Scott

Here's my code excerpt (with the suspect reprompt in red).

<!-- Collect shift start date from caller -->
<field name="fld_startdate" type="digits?length=6">
<prompt>
<audio src="{{appUrl('audio/enter_startdate.wav')}}">
Please enter shift start date in M M D D Y Y format
</audio>
</prompt>
<filled>
<if cond="validDate(fld_startdate) != true">
<audio src="{{appUrl('audio/invalid_date.wav')}}">
Please enter a valid date
</audio>
<clear namelist="fld_startdate" />
<goto nextitem="fld_startdate"/>
</if>
</filled>
<nomatch>
<audio src="{{appUrl('audio/no_match.wav')}}">
Sorry, I didn't understand you
</audio>
<reprompt/>
</nomatch>
</field>


<!-- Collect shift start time from caller -->
<field name="fld_starttime" type="digits?length=4">
<prompt>
<audio src="{{appUrl('audio/enter_starttime.wav')}}">
Please enter shift start time in H H M M format
</audio>

.....
Offline

srmoser430

  • Posts: 20
  • Joined: Thu Oct 19, 2017 3:40 pm

Re: Reprompt not working?

PostWed Apr 11, 2018 10:41 am

UPDATE -
it turns out the reprompt for fld_startdate is working. The issue is about the termchar. Here's what appears to be happening:

    1 - user enters '040118#' for fld_startdate
    2 - IVR accepts '040118' as input for fld_startdate
    3 - IVR uses trailing termchar as input for next field, fld_starttime
    4 - this forces immediate nomatch event for fld_starttime

can termchar be used with a field where type=digits?length=6?

Thanks again....Scott
Offline

admin

Site Admin

  • Posts: 27
  • Joined: Thu May 29, 2003 3:12 pm

Re: Reprompt not working?

PostWed Apr 11, 2018 3:01 pm

Hi Scott,

The issue may have been caused by a delay between the time the user enters the 6 digit date and the # key, causing the # key to be taken as an input in the next prompt

By including "digits?length=6", the application automatically expects user to input 6 digits, and will ignore inputs entered after the 6th key. Therefore # key is not necessary in the input.

Regards,
Plum Support
Offline

srmoser430

  • Posts: 20
  • Joined: Thu Oct 19, 2017 3:40 pm

Re: Reprompt not working?

PostThu Apr 12, 2018 8:03 am

Thanks.

I want the termchar to be active throughout the application and I inform the caller at the main greeting that they can use the termchar to speed up data entry. However, in this case, when they enter the termchar, it seems to "trip up" the FIA causing it to use the termchar as input for the next field (fld_starttime) and raising a nomatch for this field. Could this be because fld_startdate has a fixed length grammar (6 digits) and the caller has entered 6 digits forcing the FIA to move immediately onto collecting input for the next field?
Offline

support

  • Posts: 3505
  • Joined: Mon Jun 02, 2003 3:47 pm
  • Location: Boston, MA

Re: Reprompt not working?

PostFri Apr 13, 2018 10:27 am

Hi Scott,

Once the 6 digits have been filled using the fixed length grammar, the platform then moves onto the next field immediately. This could cause the termchar to be recognized as the next input. One way to avoid the termchar being carried over to the next field is by unfixing grammar length.

The following sample code has no fixed length grammar in the first field, but instead checks for fld_startdate length after the input.

Code: Select all
 
<?xml version="1.0"?>
<vxml version="2.0">
   <form>
      <field name="fld_startdate" type="digits">
         <prompt>
            Please enter shift start date in M M D D Y Y format
         </prompt>
         <filled>
            <if cond="fld_startdate.length == 6">
               <prompt> You entered <value expr="fld_startdate"/> </prompt>
               <else/>
                  <prompt> Please enter 6 digits </prompt>
                  <clear namelist = "fld_startdate"/>
                  <reprompt/>
            </if>
         </filled>
         <nomatch>
            Sorry, I didn't understand you
            <reprompt/>
         </nomatch>
      </field>
      
      <field name = "fld_starttime" type="digits?length=4">
         <prompt>
            Enter start time
         </prompt>
         <filled>
            You entered <value expr="fld_starttime"/>
         </filled>
      </field>
   </form>
</vxml>


Regards,
Plum Support

Return to Plum DEV Q&A

Who is online

Users browsing this forum: No registered users and 1 guest

cron