I am having trouble understanding how the flow works with netget and the app I am creating. It is for ACH telephone payments. I have gotten the program to validate a users account with their phone number and then transfer to the next survo that asks if they want to 1. hear their account balance or 2. make a payement.
When the code below executes the survo reads back all fo the xml including the balance. As in "Thirty five thousand two hundred one, Your current balance is 105, 45". The first part is the suvo id, then the balance on the account and then the userid.
I have this set for retrieve text and read back. should this be set for transmit and get next action? If so, how does the user get the balance amount? Can $balance be used in a question that is in the survo id passed in the action tag? If so how is it formated? Delimiter?
case 'option' : $userid = $_REQUEST['userid']; $option = $_REQUEST['select_option'];
if ($option == 1){ $balance = $phone_function->get_balance($userid);
echo "<action> <app>survo</app> <parameters> <id>35201</id> <user_parameters> <balance>Your current account balance is $balance</balance> </user_parameters> <p_t>$userid</p_t> </parameters> </action>";
Yes, you should have the NetGet set to "Transmit and Get Next action," that will accept the XML response. What our system is expecting as you have it set up now is a text stream. Hence, it is reading it verbatim.
Also note, if you format the number as $115.45, our TTS should say "one hundred fifteen dollars and 45 cents." However, if you format it as 115.45, it should say one hundred fifteen point forty five.
So when its set to transmit and get next would the balance variable be available to the next survo? I think I remember somewhere seeing where you could put the variable into a survo question, is that right? I have looked but can't find where and I think I saw it in the docs before.
So to clarify. When a user presses one to get their balance and I have the survo set to transmit and get next then the first xml statement below will execute. The caller would then be routed to survo 35201. Would I leave $balance as is or put in as p/t? If I am able to put the variable balance into a question on survo 35201, how does it need to be formated? Maybe: "Your current balance is {$balance}"?
case 'option' : $userid = $_REQUEST['userid']; $option = $_REQUEST['select_option'];
if ($option == 1){ $balance = $phone_function->get_balance($userid);
So to clarify. When a user presses one to get their balance and I have the survo set to transmit and get next then the first xml statement below will execute. The caller would then be routed to survo 35201. Would I leave $balance as is or put in as p/t? If I am able to put the variable balance into a question on survo 35201, how does it need to be formated? Maybe: "Your current balance is {$balance}"?
Yes, the caller would be routed to survo 35201. You would include the balance parameter as you have in the XML below. In the survo it would look like:
Your current balance is {balance}
Drop the $ because our Survo won't see that in the XML, which you have labelled <balance> - without the $.
Generally speaking, most people use pass-through to identify transactions with unique ID's or to tag them with customer IDs and the like. You can not use variables in pass through in the Survo itself.