The fairly new feature for merge-fields in documents is great, but since things like foreach features are supported, this can get complex.
The syntax is for 80% similar to the syntax that proven libraries like Twig (http://twig.sensiolabs.org/documentation) and Ruby haml (http://haml.info/tutorial.html) use. That is why I’d like to suggest start using/implementing the same syntax.
This significantly will improve the adoption of the feature, and thereby will increase the sales.