Your question has great timing, as I just figured this out today, haha.

I was wondering the same thing this week (wondering how to pass external values into dialog text).
Dialogs can also have "script variables". Not sure what those are all about yet.