Basic Syntax
A proper TeXML response comprises the following elements:<Response>element — tag defining the body of the TeXML document- verb — an XML tag denoting the desired action
- noun — an XML tag denoting the object of the desired action
Dynamic parameters
When creating a TeXML set of instructions you can make use of Mustache Templates to generate instructions dynamically at runtime.Inserting dynamic content
You can make use of Mustache Dynamic templating to insert content into your TeXML instructions through HTTP request parameters in the webhook URL we use to fetch your TeXML set of instructions. For example, you could create a TeXML set of instructions that calls a number that is set until the HTTP request is made to fetch your TeXML instructions. You first create your TeXML instructions using Mustache Templating and set the{{PhoneNumber}} as a variable like this
PhoneNumber as a parameter.
Iterate through lists
You can set arrays as parameters in your TeXML webhook URL and let Mustache Template handle them. If for example, you want the dial command to have two numbers, you could add aNumbers list parameter to your callback Url.
PhoneNumbers parameter in the TeXML instructions using the following syntax.
Render conditional content
Conditional content is supported by usingif/else statements in the TeXML instructions. You could define a set of instructions to dial a specific number depending on From parameter present in the HTTP request.
==, != and no operator for checking if the parameter value is not null.