It is trivial :)
Inside the jinja template you have access to a dict called salt, this dict has all of the functions that the salt command can run. If those available commands do not supply you with what you need, then you can add a custom module and call it
http://docs.saltstack.org/en/latest/topics/tutorials/states_pt3.html
should get your feet wet.