CONDENSED CONSOLIDATED STATEMENTS OF CASH FLOWS - USD ($) $ in Thousands |
6 Months Ended |
Jan. 31, 2017 |
Jan. 31, 2016 |
| Cash flows from operating activities: |
|
|
| Net loss |
$ (255,381)
|
$ (71,750)
|
| Adjustments to reconcile net loss to net cash (used in) provided by operating activities: |
|
|
| Depreciation and amortization |
18,172
|
11,822
|
| Stock-based compensation |
143,335
|
10,336
|
| Loss on debt extinguishment |
3,320
|
0
|
| Change in fair value of convertible preferred stock warrant liability |
21,133
|
(1,904)
|
| Other |
929
|
(327)
|
| Changes in operating assets and liabilities: |
|
|
| Accounts receivable—net |
(39,730)
|
(13,374)
|
| Deferred commission |
(8,049)
|
(9,179)
|
| Prepaid expenses and other assets |
(2,707)
|
2,088
|
| Accounts payable |
11,342
|
(8,034)
|
| Accrued compensation and benefits |
11,811
|
1,484
|
| Accrued expenses and other liabilities |
1,594
|
(3,514)
|
| Deferred revenue |
118,143
|
81,209
|
| Net cash (used in) provided by operating activities |
23,912
|
(1,143)
|
| Cash flows from investing activities: |
|
|
| Purchases of property and equipment |
(24,616)
|
(20,021)
|
| Purchases of investments |
(117,550)
|
(31,546)
|
| Maturities of investments |
41,200
|
40,285
|
| Sale of investments |
32,640
|
0
|
| Payments for business acquisitions, net of cash acquired |
(184)
|
0
|
| Net cash used in investing activities |
(68,510)
|
(11,282)
|
| Cash flows from financing activities: |
|
|
| Proceeds from initial public offering, net of underwriting discounts and commissions |
254,455
|
0
|
| Payments of offering costs, net |
(1,609)
|
(2,659)
|
| Proceeds from exercise of stock options, net of repurchases |
2,180
|
1,978
|
| Repayment of senior notes |
(75,000)
|
0
|
| Debt extinguishment costs |
(1,580)
|
0
|
| Payment of debt in conjunction with a business acquisition |
(7,124)
|
0
|
| Other |
73
|
836
|
| Net cash provided by financing activities |
171,395
|
155
|
| Net (decrease) increase in cash and cash equivalents |
126,797
|
(12,270)
|
| Cash and cash equivalents—beginning of period |
99,209
|
67,879
|
| Cash and cash equivalents—end of period |
226,006
|
55,609
|
| Supplemental disclosures of cash flow information: |
|
|
| Cash paid for income taxes |
2,344
|
1,489
|
| Cash paid for interest |
1,271
|
0
|
| Supplemental disclosures of non-cash investing and financing information: |
|
|
| Vesting of early exercised stock options |
920
|
1,995
|
| Purchases of property and equipment included in accounts payable |
6,983
|
5,771
|
| Offering costs included in accounts payable |
51
|
803
|
| Conversion of convertible preferred stock to common stock, net of issuance costs |
310,379
|
0
|
| Reclassification of convertible preferred stock warrant liability to additional paid-in capital |
30,812
|
0
|
| Issuance of common stock for business acquisitions |
$ 27,063
|
$ 0
|