These are variables passwd when you log in. If you type 'man smb.conf' you'll see an explanation of all of it:
%S = the name of the current service, if any.
%U = session username (the username that the client wanted, not necessarily the same as the one they got).