Heads Up :
The post you are writing will appear in a public forum. Please ensure all content is appropriate for public consumption. Review the employee guidelines for the community here.
Created by: null on 22-08-2005 03:46:33 PM Can some one help me , how to access the root variables in the application?
Subject: RE: Accessing application root variables Replied by: Vance Vagell on 22-08-2005 04:18:26 PM Hi Ravindra,
Could you please provide an example of what you are trying to accomplish? Which variables in particular are you trying to access? At what point would you like to access them (e.g. in custom code, in substitution, etc.)? Why do they need to be accessed? Once we have this additional information, we can better provide a solution for you.
Regards, Vance
Subject: Root variables Replied by: null on 22-08-2005 04:23:14 PM My application needs to get transferred to different agents depending upon the user selected language. I want to store the language transfer no's in the root document, so that I can access these values upon the user selection.
Thanks in advance..
Subject: RE: Root variables Replied by: Vance Vagell on 22-08-2005 05:23:18 PM Hi Ravindra,
If there is a requirement that this be done via variables in the root document, here is how it can be done:
1) In Audium Builder for Studio, right-click on the application in the Navigator pane and choose "Properties".
2) Select "Audium - Root Doc Settings".
3) In the VoiceXML Variable table, define the variables and values you would like to appear in the root document at runtime.
4) Click OK.
5) Now, you can access these variables stored in the root document by using the getRootDocumentVariables() method of the APIBase class, from within custom code. For example, you could create an Action element that retrieves these variables, and then stores them in element or session data, for use in substitution for a Transfer element. For more information about this method, please refer to the Audium Java API Javadocs.
However, it is simpler to accomplish the same thing using session/element data variables instead, since it involves no custom code. Here is how that would be done:
1) Click on the first element in your callflow, and select its "Data" tab.
2) Add element or session data that contains the phone numbers. For example, you could add element data number_english and set it to 888-555-1212 and number_spanish and set it to 888-555-1213. Now, when this element is visited in the callflow, this data will be set.
3) Later, a Decision element can check the language choice, and then exit to a Transfer element which retrieves the appropriate number to transfer to from the element/session data that was set from step 2 above via substitution.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: