I'm trying to build a simple dialog that the user will write: "My name is Joe", and I want the Dialog to set a userName variable to "Joe". I found this example, but the response is always empty string.
<folder label="Main">
<output>
<prompt selectionType="RANDOM">
<item>Hello, What's your name?
</item>
</prompt>
</output>
<input id="input_2530402">
<grammar>
<item>My name is</item>
<item>my name is (DYNAMIC_DATA)={userName}</item>
<item>mine is (DYNAMIC_DATA)={userName}</item>
<item>(DYNAMIC_DATA)={userName} </item>
<item>(DYNAMIC_DATA)={userName} GiveName</item>
</grammar>
<action varName="userName" operator="SET_TO">{userName.source}</action>
<action varName="Defaulted_Previous" operator="SET_TO_NO"/>
<output>
<prompt>
<item>Hi {userName}!</item>
</prompt>
</output>
</input>
</folder>
Variable definition:
<variables>
<var_folder name="Home">
<var name="agentName" type="TEXT" initValue="Alice"
description="The virtual agent's name." />
<var name="userName" type="TEXT" initValue="SomeName" description="The user's name" />
</var_folder>
</variables>
I don't want the user name input to be seperated from the sentence... Any suggestions?
Thanks!