Rule reminder
Context determines the right phrase: time of day → greeting; first meeting → Piacere; departing → farewell; asking wellbeing → Come stai/sta?; bad news → Mi dispiace; register (formal/informal) must match the situation.
It's 7:30 a.m. and you walk into a formal office. What do you say?