VoiceXML uses standard variable systems. This means that Fuse does too, because it is built on VoiceXML. Standard variable systems allow users to create their own variables and manipulate them directly.
Fuse allow access to global session variables that contains information about the current call. The session variable is a complex object that contains properties. Sometimes those properties have properties of their own.
Because these variables are global variables, there will be no need to use the
$notation to access them.
In Fuse, users might want to access the following session properties:
When collecting input or interacting with a REST web service, information often exists in addition to the “response” data that users may want to access. Shadow variables allow users to access this additional data.
$symbol to the end of a variable, automatically creates a shadow variable for that variable. The shadow variable will contain different member variables depending on the type of input or web service it is being used with. For example, with an input
credit_cardyou can determine the confidence of the grammar engine match by accessing
This variable is filled in the case of both a match or a nomatch.
Lastresult$allows users to get the list of all possible matches, not just the best match. In the event that speech input exists for the variable in use,
lastresult$can also provide a recording of the utterance spoken by the user (for speech input).
Users can also access the “n-best” results if there were multiple matches by accessing
$lastresult[i]where “i” represents the position in the list of matches (0 is the best match, 1 is second best, etc.).
lastresult$.recording(only for speech input)
Some modules in Fuse have specific shadow variable associated with them. “name” below refers to the actual name of the module.
name$.headers(object indexed by header name)
name$.raw_headers(0-indexed array containing all header strings)
name$.error(only in the event of an error)
NOTE: Some of the following terms and concepts are specific to Google Dialogflow.
Table data returned by a
DynamoDB module is formatted in a zero-indexed array, which you can access through shadow variables. You can write these shadow variables by using the names of any column(s) returned and the module itself. The
$symbol is not used here.