Variables used in the messages can be chosen to whatever you like. It's best to make them self-explicatory of course. In custom code you will get the value from the node, user, comment, heartbeat activity, ... object.
With rules and heartbeat_rules we may need a custom token. Underneath is an example on how to create your own avatar token and album pictures. The example beneath has a situation of an image that has a node_reference field to either album or user album. Ofcourse, you could adjust this whatever you want.