token generation, templates and alerts