Text Expansion Items can have special replacements, which will pull information from what you are currently doing and use that for the text added by the expansion.
A list of available special replacements is available from the info icon on the Text Expansion Item Manager.
Clicking on the info button (top right above) opens the Information Dialog:
This dialog contains the up to date list of what you can use for Text Expansion Items.