Page 1 of 1

Comparing a DTMF entry to a variable

Posted: Mon Mar 01, 2010 10:53 am
by wrothman@dealermagic.net
I want to enter a transaction number that has to a agree with a variable we passed from our main database application into the Plum database and the stack. Our variable identifies the record being verified. I assumed that I can do a Digits Input then compare it to our variable using an Inputs Properties "Input mode". Then, if the two agree, we move on. If not, we go through some counters to decide. Is that a correct approach? What name would I give the Digit Input as it is not the variable I am comparing it to?

Comparing IVR input to database variable

Posted: Mon Mar 01, 2010 11:58 am
by support
Hi,

About your post, would you please verify a few things for us:

1) The variable that is passed from your database. Would this variable be a series of digits? If so, you shouldn't have any problems comparing this variable to any digits the user inputs via the digit input module.

2) Why do you need to check to see if the digit input was DTMF? The module can be limited to only accept DTMF inputs.

Thanks for clarifying!

Regards,
Plum Support

Variable string

Posted: Mon Mar 01, 2010 1:41 pm
by wrothman@dealermagic.net
Actually it is a character string, though I can modify it to be all numbers and, consequently, input by the caller. In certain cases the caller has to enter the character string to get started on the questions. Consequently, I thought about using numbers only. So, back to my question. Am I approaching it correctly?

Comparing IVR input to database variable

Posted: Mon Mar 01, 2010 3:10 pm
by support
Hi,

You should be able to compare the string of numbers you retrieve from the database with a set of digits from the digits input module. From what we can understand your application should look like this:

Start> Query Database> Get Row from Stack> Digits Input> Branch on Number> Rest of Application

The branch on number should be set up to compare the variable for the Digits Input with the variable you name in the Get Row from Stack module.

Note that by default the Get Row from Stack module expects you to name your variable the same as the column name in the table you just queried. If you want to fetch the value into a differently named variable, you need to use the Reassign Names option in the module menu.

You can name your digits input anything memorable, as long as it is different from the variable you are comparing it with in the Branch on Number module.

Hope this helps.

Regards,
Plum Support

Getting row

Posted: Mon Mar 01, 2010 3:37 pm
by wrothman@dealermagic.net
If I have a unique identifier for a row, how do I address the Query Database function to fetch the matching row. I would think my caller could enter the Digits Input and could trigger the function. This is important when my callers are randomly calling back to complete a questionnaire or to leave a fax number for us to forward a form. In the outbounds, we will trigger the questionnaires one at a time so the variables are used and completed without issue as to row. They are clearly the "next" row.

Posted: Mon Mar 01, 2010 4:38 pm
by support
Use the filter function of Query Database to only return the row that matches your unique identifier. If your caller is entering the unique identifier in the Digits input, you use that as the variable value for your filter. It would look something like the following:

Code: Select all

select from <table>
filter matching all of the following:
<column> = <variable from digits input>
and then the first and only row that you would get with a Get Row from Stack module would be the one matching your unique identifier.

If you don't get a row, then no rows in the table matched what the user entered, and you can branch off to an error message.