The fairly new feature for merge-fields in documents is great, but since things like foreach features are supported, this can get complex.
Secondly, I have logged the requested feature (Use Twig or Ruby syntax in Cloud Templates feature ) as SAASWORDS-121 in our issue tracking system. Our development team will look into the possibility of implementation of this requested feature. Once I have any information about this feature, I will update you via this thread.
Please let us know if you have any more queries.