12-01-2016 01:43 PM
Current I have a CustomDateWithConfirm class which is extend to MBasicDateWithConfirm, to valid the date such as "19900231", the way currently I did is once I get this value, I increment the disconfirmed count, then ask the user to re-enter the date again. The way I want is if user the invalid date, such as 19900231, I need the way to let CVP know it is Date NoMatch state, and ask user to re-enter again, how can I do this?
By the way I using CVP 10.5
12-01-2016 01:56 PM
In Studio 11.0 there's a utility you can use in the SetValue element to
check if a date is valid.
If you're not on CVP11, then why not just change from Date with Confirm
to a Date element, followed by either the SetValue (11.0) or a and a a
custom java element to check if the date is valid.
If it is valid, use a YesNoMenu to confirm the date with the caller.
If not valid, tell the caller it's not valid, and perhaps increment a
counter, and then either re-collect the Date or transfer to agent.
12-02-2016 07:47 AM
That is my original thought...
But the problem is if I have another project(s) need the same element, each time I need to add 5 elements, counter, decision, date, audio(for confirm) and yesNoMenu. It seems like not really efficient... That is why I want to write one custome element that once I got invalid date, it increase the nomatch count.
Or is it have better way to make that 5 elements into one??
12-02-2016 07:57 AM
If you're writing your own element, it'll definitely be more efficient.
If you're already testing if the date is not valid in your custom
element, then why not just have your tag throw a NoMatch event?
Your custom element should be catching that event already.
--
Janine Graves
Cisco Designated VIP
Training the Experts, LLC
Expert Training in CVP, IVR, VoiceXML, and Speech Technologies
617-549-8585
1 Roundys Hill, Marblehead, MA 01945
12-02-2016 08:15 AM
How to tag the nomatch event? Automatically? Seems like not that case
12-02-2016 08:28 AM
create a tag
12-02-2016 08:49 AM
Vincent,
If it's more the cumbersome nature and untidiness aspect of having to insert the same 5 elements everywhere that's the problem, have you tried making them into an element group? It doesn't fit all situations but it can make things look somewhat neater and more manageable without having to code new elements.
12-02-2016 09:05 AM
Can you give me an example how to make the element group? Or just like subflow?
12-02-2016 09:15 AM
Select the elements you want to group.
Right-click on the selection and click on Group Elements.
The selected elements will be reduced to a single one.
You can double click on it to expand it and open the group.
You can also save the group into a pallette folder of your choice for reuse (right click and select Save As).
Let me know if you hit a snag with these steps.
Paul
12-02-2016 09:53 AM
I just think about that again, if I group the element, it might mess up the nomatch count.
For example, if the max_nomatch is 3, then following situation might be the problem.
User enter "19920231", that is invalid date, should recognized as no match (1st time)
User enter something else again such as "1990020"(CVP can handle that before my validation runs), count as no match 2
and User probably re-enter the date again with one of following above, that should count as no match 3.
Then the program provide following action for max_nomatch.
So I don't know what is the better way to accomplish this...
12-02-2016 10:03 AM
Grouping shouldn't change the functionality; it's essentially just a way of inserting a copy of a bunch of elements with the interconnection between them hidden.
12-02-2016 11:03 AM
I know the group will not change the functionality, I just don't know how to handle that case I mentioned above. If I group into one element, I just want the exit_state is done, max_noinput, max_nomatch, and max_disconfirm.
12-02-2016 02:18 PM
The element group can have the same exit states as the elements
contained in the group. Or you can easily use a Subflow for this.
What version of CVP/Studio do you have?
12-02-2016 05:49 PM
We are using 10.5
12-02-2016 06:24 PM
In VoiceXML, if you throw a nomatch event, then it'll go to your nomatch
event handler.
So, in your filled tag, if you determine that the date isn't valid, then
use a VAction to throw a nomatch event.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide