Convertible Senior Notes - Schedule of Net Carrying Amount of the Equity Component of the Notes (Details) - USD ($)
$ in Thousands
Apr. 30, 2019
Jul. 31, 2018
Debt Instrument [Line Items]    
Debt discount for conversion option   $ 84,200
Convertible Debt    
Debt Instrument [Line Items]    
Issuance costs   (8,800)
Convertible Senior Notes, Equity Component | Convertible Debt    
Debt Instrument [Line Items]    
Debt discount for conversion option $ 84,168  
Issuance costs (2,485) $ (2,500)
Net carrying amount $ 81,683