Call your insurance company, if you have comprehensive insurance, your insurance company will guide you to have it replaced, you need to pay deductible money. Dealer normally asks more for replacing the glass,it is around $1-2k. Glass shops like safelite ask less (around $800 for BMW). However, if your windshield glass has rain sensor on it, you need BMW OEM glass, don't use after-market glass, otherwise, rain sensor will not be working properly. So, talk to your insurance company, they normally don't like you to go with dealer because they are going to pay more. So, if your insurance company guide you a glass shop, remember, ask them to use BMW OEM glass, they can get it from bmw dealer. No matter what glass you are going to use, you just need to pay your deductible money.
Hope this helps.