Mostly wei can be used when you answer the phone , while it's too oralize to use over text. But someti
mes you can see it like this:
他正在打电话:“喂?”
他不耐烦的说道:“喂,哪位?”
I prefer it is better to use 你好 or 您好 as a alternative word. (Actually I use 您好 cause It's polite to when you talking or writing.)
If you want to write a letter or email , adding a adj. word such as 尊敬的 can be better.
Well, 嗨 is accepted in China and it is normal in the big city, most of people know the means of ‘hai’ ‘hei’ and use it frequently(like me...wave to the other so that he can see you.) , But If you lived in the countryside , 您好 is a better way.
嗨
is okay if you use it with someone close to you.