Yes, as of the now ( Apr 2017), H1B Lottery is mandatory. The guidance is that if USCIS receives more petitions than the required number cap that is mandated by Congress, they will need to conduct random selection, aka H1B Lottery. You can check the official Federal Register Document . You can search for “Random” in the document to find it. Below is the actual text from the document.
There are many applicants, who are frustrated with the delay in processing by USCIS and making speculations that there will not be lottery and President Trump Administration will be looking at the Merit based system, some say that they will look at the highest salary, some claim that Indian companies will be banned…many speculations….But all those claims are wrong at least as of today in April 2017. There will be H1B Lottery, if USCIS has received more than required petitions for their congressionally Mandated 65,000 for regular and 20,000 for masters quota.
What do you all think with the speculations ?