erpnext has this feature like other erp software???
Check it reference: Create mapping between user and department for leads