The casetokens extension makes it possible to use tokens such as:
Unfortunately that extension uses a static variable hack to get the case_id. This commit adds support for that.
case_id