Summary of Significant Accounting Policies | Summary of Significant Accounting Policies Segment Information The Company operates in a single operating segment. The Company’s chief operating decision maker is its chief executive officer, who reviews financial information presented on a consolidated basis for purposes of making operating decisions, assessing financial performance and allocating resources. Revenue Recognition The Company derives revenue from subscription fees (which include support fees) and professional services fees. The Company sells subscriptions to its platform through arrangements that are generally one to five years in length. The Company’s arrangements are generally noncancelable and nonrefundable. Furthermore, if a customer reduces the contracted usage or service level, the customer has no right of refund. The Company’s subscription arrangements do not provide customers with the right to take possession of the software supporting the platform and, as a result, are accounted for as service arrangements. This revenue recognition policy is consistent for sales generated directly with customers and sales generated indirectly through channel partners. The Company determines revenue recognition through the following steps: • Identification of the contract, or contracts, with a customer; • Identification of the performance obligations in the contract; • Determination of the transaction price; • Allocation of the transaction price to the performance obligations in the contract; and • Recognition of revenue when, or as, the Company satisfies a performance obligation. Subscription Revenue Subscription revenue, which includes support, is recognized on a straight-line basis over the noncancelable contractual term of the arrangement, generally beginning on the date that the Company’s service is made available to the customer. Professional Services Revenue The Company’s professional services principally consist of customer-specific requests for application integrations, user interface enhancements and other customer-specific requests. Revenue for the Company’s professional services is recognized as services are performed in proportion to their pattern of transfer. Contracts with Multiple Performance Obligations Some of the Company’s contracts with customers contain multiple performance obligations. For these contracts, the Company accounts for individual performance obligations separately if they are distinct. The transaction price is allocated to the separate performance obligations on a relative SSP basis. The Company determines SSP based on observable, if available, prices for those related services when sold separately. When such observable prices are not available, the Company determines SSP based on overarching pricing objectives and strategies, taking into consideration market conditions and other factors, including customer size, volume purchased, market and industry conditions, product-specific factors and historical sales of the deliverables. Deferred Revenue Deferred revenue consists primarily of payments received and accounts receivable recorded in advance of revenue recognition under the Company’s subscription and support services and professional services arrangements. The Company primarily invoices its customers for its subscription services arrangements annually in advance. The Company’s payment terms generally provide that customers pay the invoiced portion of the total arrangement fee within 30 days of the invoice date. Amounts anticipated to be recognized within one year of the balance sheet date are recorded as deferred revenue, current; the remaining portion is recorded as deferred revenue, noncurrent in the consolidated balance sheets. Deferred Commissions Sales commissions earned by the Company’s sales force are considered incremental and recoverable costs of obtaining a contract with a customer. Sales commissions for new revenue contracts, including incremental sales to existing customers, are deferred and then amortized on a straight-line basis over a period of benefit, which the Company has determined to be generally five years. The Company determined the period of benefit by taking into consideration its customer contracts, its technology and other factors. Sales commissions for renewal contracts (which are not considered commensurate with sales commissions for new revenue contracts and incremental sales to existing customers) are deferred and then amortized on a straight-line basis over the related period of benefit, which is generally the related contract renewal term. Amortization expense is included in sales and marketing expenses in the accompanying consolidated statements of operations. Sales commissions capitalized as contract costs totaled $61.3 million and $41.3 million in the years ended January 31, 2020 and 2019 , respectively. Amortization of contract costs was $28.6 million , $20.9 million and $15.2 million for the years ended January 31, 2020 , 2019 and 2018 , respectively. There was no impairment loss in relation to the costs capitalized. Cost of Revenue Costs of revenue primarily consist of costs related to providing the Company’s cloud-based platform to its customers, including third-party hosting fees, amortization of capitalized internal-use software and finite-lived purchased developed technology, customer support, other employee-related expenses for security, technical operations and professional services staff, and allocated overhead costs. Cash, Cash Equivalents and Restricted Cash Cash and cash equivalents consist of cash on hand and highly liquid investments with original maturities of three months or less from the date of purchase. Cash equivalents generally consist of investments in money market funds. The fair market value of cash equivalents approximated their carrying value as of January 31, 2020 and 2019 . As of January 31, 2020 and 2019 , the Company's long-term restricted cash balance was $11.4 million related to letters of credit for its facility lease agreements. Long-term restricted cash is included within other assets on the Company's consolidated balance sheet. Short-term Investments The Company’s short-term investments comprise asset-backed securities, U.S. treasury securities and corporate debt securities. The Company determines the appropriate classification of its short-term investments at the time of purchase and reevaluates such designation at each balance sheet date. The Company has classified and accounted for its short-term investments as available-for-sale securities as the Company may sell these securities at any time for use in its current operations or for other purposes, even prior to maturity. As a result, the Company classifies its short-term investments, including securities with stated maturities beyond twelve months, within current assets in the consolidated balance sheets. Available-for-sale securities are recorded at fair value each reporting period. Unrealized gains and losses on these short-term investments are reported as a separate component of accumulated other comprehensive loss in the consolidated balance sheets until realized. Interest income is reported within interest income and other, net in the consolidated statements of operations. The Company periodically evaluates its short-term investments to assess whether those with unrealized loss positions are other-than-temporarily impaired. The Company considers various factors in determining whether to recognize an impairment charge, including the length of time the investment has been in a loss position, the extent to which the fair value is less than the Company’s cost basis, the investment’s financial condition and near-term prospects of the investee. Realized gains and losses are determined based on the specific identification method and are reported in interest income and other, net in the consolidated statements of operations. If the Company determines that the decline in an investment’s fair value is other-than-temporary, the difference is recognized as an impairment loss in the consolidated statements of operations. Accounts Receivable and Allowances Accounts receivable are recorded at the invoiced amount, net of allowances. These allowances are based on the Company’s assessment of the collectibility of accounts by considering the age of each outstanding invoice, the collection history of each customer and an evaluation of potential risk of loss associated with delinquent accounts. Amounts deemed uncollectible are recorded to these allowances in the consolidated balance sheets with an offsetting decrease in related deferred revenue and a charge to general and administrative expense in the consolidated statement of operations. Property and Equipment Property and equipment, net, is stated at cost less accumulated depreciation. Depreciation is recorded using the straight-line method over the estimated useful lives of the respective assets. Repairs and maintenance costs are expensed as incurred. The useful lives of property and equipment are as follows: Useful lives Capitalized internal-use software costs 3 years Computers and equipment 3 years Furniture and fixtures 7 years Leasehold improvements Shorter of estimated useful life or remaining lease term Business Combinations When the Company acquires a business, the purchase price is allocated to the net tangible and identifiable intangible assets acquired. Any residual purchase price is recorded as goodwill. The allocation of the purchase price requires management to make estimates in determining the fair values of assets acquired and liabilities assumed, especially with respect to intangible assets. These estimates can include, but are not limited to, the cash flows that an asset is expected to generate in the future, the appropriate weighted-average cost of capital and the cost savings expected to be derived from acquiring an asset. These estimates are inherently uncertain and unpredictable. During the measurement period, which may be up to one year from the acquisition date, adjustments to the fair value of these tangible and intangible assets acquired and liabilities assumed may be recorded, with the corresponding offset to goodwill. Upon the conclusion of the measurement period or final determination of the fair value of assets acquired or liabilities assumed, whichever comes first, any subsequent adjustments are recorded to the consolidated statements of operations. Goodwill and Other Long-Lived Assets The excess of the purchase price over the estimated fair value of net assets of businesses acquired in a business combination is recognized as goodwill. Goodwill is tested for impairment annually on November 1 st or more frequently if certain indicators are present. Long-lived assets, such as property and equipment and finite-lived intangible assets subject to amortization are reviewed for impairment whenever events or changes in circumstances indicate that the carrying amount of any asset may not be recoverable. Recoverability of assets to be held and used is measured by comparing the carrying amount to the estimated undiscounted future cash flows expected to be generated. If the carrying amount exceeds the undiscounted cash flows, the assets are determined to be impaired and an impairment charge is recognized as the amount by which the carrying amount exceeds its fair value. The Company amortizes intangible assets with finite lives on a straight-line basis over their estimated useful lives in cost of revenue in the consolidated statements of operations. Operating Leases and Incremental Borrowing Rate The Company leases office space under operating leases with expiration dates through 2028. The Company determines whether an arrangement constitutes a lease and records lease liabilities and right-of-use assets on its consolidated balance sheets at lease commencement. Lease liabilities are measured based on the present value of the total lease payments not yet paid discounted based on the more readily determinable of either the rate implicit in the lease or the Company’s incremental borrowing rate, which is the estimated rate the Company would be required to pay for a collateralized borrowing equal to the total lease payments over the term of the lease. Lease liabilities due within twelve months are included within accrued expenses and other current liabilities on the Company's consolidated balance sheet. The estimation of the incremental borrowing rate is based on an analysis of publicly traded debt securities of companies with similar credit and financial profiles. Right-of-use assets are measured based on the corresponding lease liability adjusted for (i) payments made to the lessor at or before the commencement date, (ii) initial direct costs incurred and (iii) tenant incentives received, incurred or payable under the lease. Recognition of rent expense begins when the lessor makes the underlying asset available to the Company. The Company does not assume renewals or early terminations of its leases unless it is reasonably certain to exercise these options at commencement and does not allocate consideration between lease and non-lease components. For short-term leases, the Company records rent expense in its condensed consolidated statements of operations on a straight-line basis over the lease term and records variable lease payments as incurred. Convertible Senior Notes In February 2018 , the Company issued $345.0 million aggregate principal amount of 0.25% convertible senior notes due February 15, 2023 in a private offering (2023 Notes). In September 2019 , the Company issued $1,060.0 million aggregate principal amount of 0.125% convertible senior notes due September 1, 2025 (2025 Notes, the 2025 Notes together with the 2023 Notes, the Notes). Concurrent with the issuance of the 2025 Notes, the Company used part of the net proceeds to repurchase a portion of the 2023 Notes (2023 Notes Partial Repurchase). See Note 9 for additional details. The Notes are accounted for in accordance with FASB ASC Subtopic 470-20, Debt with Conversion and Other Options. Pursuant to ASC Subtopic 470-20, issuers of certain convertible debt instruments, such as the Notes, that have a net settlement feature and may be settled wholly or partially in cash upon conversion are required to separately account for the liability (debt) and equity (conversion option) components of the instrument. The carrying amount of the liability component of the instrument is computed by estimating the fair value of a similar liability without the conversion option using income and market based approaches. For the income-based approach, the Company uses a convertible bond pricing model that includes several assumptions such as volatility and the risk-free rate. For the market-based approach, the Company observes the price of derivative price instruments purchased in conjunction with our convertible senior note issuances or evaluates issuances of convertible debt securities by other companies with similar credit risk ratings at the time of issuance. The amount of the equity component is then calculated by deducting the fair value of the liability component from the principal amount of the instrument. The difference between the principal amount and the liability component represents a debt discount that is amortized to interest expense over the respective terms of the Notes using an effective interest rate method. The equity component is not remeasured as long as it continues to meet the conditions for equity classification. In accounting for the issuance costs related to the Notes, the allocation of issuance costs incurred between the liability and equity components were based on their relative values. Similarly, in accordance with ASC Subtopic 470-20, transactions involving contemporaneous exchanges of cash between the same debtor and creditor in connection with the issuance of a new debt obligation and satisfaction of an existing debt obligation by the debtor, such as the contemporaneous 2023 Notes Partial Repurchase and issuance of the 2025 Notes, should be evaluated as a modification or an exchange transaction depending on whether the exchange is determined to have substantially different terms. The 2023 Notes Partial Repurchase and issuance of the 2025 Notes were deemed to have substantially different terms due to the significant difference between the value of the conversion option immediately prior to and after the exchange, and consequently, the 2023 Notes Partial Repurchase was accounted for as a debt extinguishment. Pursuant to ASC Subtopic 470-20, total consideration for the 2023 Notes Partial Repurchase was separated into liability and equity components by estimating the fair value of a similar liability without a conversion option and assigning the residual value to the equity component. The effective interest rate used to estimate the fair value of the liability component of the 2023 Notes Partial Repurchase is based on the income and market based approaches used to determine the effective interest rate of the 2025 Notes, adjusted for the remaining tenor of the 2023 Notes. The gain or loss on extinguishment of the debt is subsequently determined by comparing repurchase consideration allocated to the liability component to the sum of the carrying value of the liability component, net of the proportionate amounts of unamortized debt discount and remaining unamortized debt issuance costs. Advertising Expenses Advertising costs are expensed as incurred. Advertising expense was $17.0 million , $10.0 million , and $9.4 million for the years ended January 31, 2020 , 2019 and 2018 . Income Taxes The Company accounts for income taxes in accordance with the liability method of accounting for income taxes. Under this method, the Company recognizes deferred tax assets and liabilities for the expected future tax consequences of temporary differences between the financial reporting and tax basis of assets and liabilities, as well as for operating loss and tax credit carryforwards. Deferred tax assets and liabilities are measured using enacted tax rates that are expected to apply to taxable income for the years in which those tax assets and liabilities are expected to be realized or settled. The Company records a valuation allowance to reduce its deferred tax assets to the net amount that the Company believes is more likely than not to be realized. In assessing the need for a valuation allowance, the Company has considered its historical levels of income, expectations of future taxable income and ongoing tax planning strategies. Because of the uncertainty of the realization of the deferred tax assets, the Company has recorded a full valuation allowance against its deferred tax assets. Realization of its deferred tax assets is dependent primarily upon future U.S. taxable income. The Company recognizes and measures tax benefits from uncertain tax positions using a two-step approach. The first step is to evaluate the tax position taken or expected to be taken by determining if the weight of available evidence indicates that it is more likely than not that the tax position will be sustained in an audit, including resolution of any related appeals or litigation processes. The second step is to measure the tax benefit as the largest amount that is more than 50% likely to be realized upon ultimate settlement. Significant judgment is required to evaluate uncertain tax positions. Although the Company believes that it has adequately reserved for its uncertain tax positions, it can provide no assurance that the final tax outcome of these matters will not be materially different. The Company evaluates its uncertain tax position on a regular basis and evaluations are based on a number of factors, including changes in facts and circumstances, changes in tax law, correspondence with tax authorities during the course of an audit and effective settlement of audit issues. To the extent that the final tax outcome of these matters is different than the amounts recorded, such differences will affect the provision for income taxes in the period in which such determination is made and could have a material impact on the Company’s financial condition and results of operations. The provision for income taxes includes the effects of any accruals that the Company believes are appropriate, as well as the related net interest and penalties. Concentrations of Risk and Significant Customers The Company’s financial instruments that are exposed to concentrations of credit risk consist primarily of cash and cash equivalents, short-term investments and accounts receivable. Cash and cash equivalents and short-term investments are currently held in three financial institutions and, at times, may exceed federally insured limits. As of January 31, 2020 and 2019 and for each of the three years ended January 31, 2020 , no single customer represented greater than 10% of accounts receivable or greater than 10% of revenue, respectively. In order to reduce the risk of downtime of the Company’s subscription services, the Company uses data center facilities operated by a third party located in Virginia, Oregon, Ohio, Germany, Ireland, Singapore and Sydney. The Company has internal procedures to restore services in the event of disaster at any of its current data center facilities. Even with these procedures for disaster recovery in place, the Company’s subscription services could be significantly interrupted during the time period following a disaster at one of its sites and the subsequent restoration of services at another site. Geographical Information Revenue by location is determined by the billing address of the customer. The following table sets forth revenue by geographic area (in thousands): Year Ended January 31, 2020 2019 2018 United States $ 494,529 $ 337,367 $ 217,300 International 91,538 61,887 39,247 Total $ 586,067 $ 399,254 $ 256,547 Other than the United States, no individual country exceeded 10% of total revenue for the years ended January 31, 2020 , 2019 and 2018 . Property and equipment by geographic location is based on the location of the legal entity that owns the asset. As of January 31, 2020 and 2019 , substantially all of the Company’s property and equipment was located in the United States. Net Loss per Share The Company computes basic and diluted net loss per share attributable to common stockholders in conformity with the two-class method required for participating securities. Under the two-class method, basic net loss per share attributable to common stockholders is calculated by dividing the net loss attributable to common stockholders by the weighted-average number of shares of common stock outstanding during the period, less shares subject to repurchase, without consideration for potentially dilutive securities as they do not share in losses. The diluted net loss per share attributable to common stockholders is computed giving effect to all potential dilutive common stock equivalents outstanding for the period. For purposes of this calculation, options to purchase common stock, unvested restricted stock units, or RSUs, purchase rights issued under the 2017 Employee Stock Purchase Plan, or ESPP, shares subject to repurchase from early exercised options, unvested common stock and restricted stock issued in connection with certain business combinations, convertible senior notes and warrants are considered common stock equivalents but have been excluded from the calculation of diluted net loss per share attributable to common stockholders as the effect is antidilutive. Since the Company's IPO, Class A and Class B common stock are the only outstanding equity of the Company. The rights of the holders of Class A and Class B common stock are identical, except with respect to voting and conversion rights. See Note 13. Recently Adopted Accounting Pronouncements In February 2016, the Financial Accounting Standards Board (FASB) issued Accounting Standards Update (ASU) No. 2016-02, Leases (Topic 842) , which requires lessees to record a right-of-use asset and a corresponding lease liability on their balance sheet for most leases. The Company adopted the requirements of ASC 842 as of February 1, 2019, using the modified retrospective method for leases that existed as of February 1, 2017, or were entered into thereafter. The modified retrospective method provides a method for recording existing leases at adoption and in comparative periods that approximates the results of a full retrospective approach. In order to simplify an entity’s transition, ASC 842 provides a package of three practical expedients, which must be elected together and applied consistently to all of an entity’s leases. The Company elected to use the package of practical expedients and, therefore, did not reassess: • whether contractual arrangements that expired prior to or existed as of February 1, 2017, are or contain leases, • the classification of leases that expired prior to or existed as of February 1, 2017, and • initial direct costs for leases that existed as of February 1, 2017. As of the later of February 1, 2017 or each lease’s respective commencement date, the Company recorded lease liabilities equal to the present value of the remaining minimum lease payments and right-of-use assets equal to the corresponding lease liability adjusted for (i) any prepaid or accrued lease payments, (ii) the remaining balance of any lease incentives received, (iii) unamortized initial direct costs and (iv) any impairments. The Company adjusted its consolidated balance sheet from amounts previously reported due to the adoption of ASC 842. Select consolidated balance sheet line items, which reflect the adoption of ASC 842, are as follows (in thousands): As of January 31, 2019 As Reported Adoption of ASC 842 As Adjusted Assets Current assets: Prepaid expenses and other current assets $ 29,451 $ (1,214 ) $ 28,237 Total current assets 709,330 (1,214 ) 708,116 Operating lease right-of-use assets — 121,389 121,389 Other noncurrent assets 15,286 (197 ) 15,089 Total assets $ 864,335 $ 119,978 $ 984,313 Liabilities and stockholders’ equity Current liabilities: Accrued expenses and other liabilities $ 24,740 $ 8,913 $ 33,653 Total current liabilities 564,191 8,913 573,104 Operating lease liabilities, noncurrent — 147,046 147,046 Other noncurrent liabilities 38,999 (35,981 ) 3,018 Total liabilities 611,958 119,978 731,936 Total liabilities and stockholders’ equity $ 864,335 $ 119,978 $ 984,313 The Company’s consolidated statements of cash flows reflect the adoption of ASC 842. The adoption of ASC 842 did not have an impact on cash provided by or used in operating, investing, or financing activities or on the Company’s condensed consolidated statements of operations. Recently Issued Accounting Pronouncements Not Yet Adopted In June 2016, the FASB issued ASU 2016-13, Financial Instruments - Credit Losses: Measurement of Credit Losses on Financial Instruments, which changes the existing incurred loss impairment model for financial assets held at amortized cost. The new model uses a forward-looking expected loss method to calculate credit loss estimates. ASU 2016-13 also eliminates the concept of other-than-temporary impairment and requires credit losses related to available-for-sale debt securities to be recorded through an allowance for credit losses rather than as a reduction in the amortized cost basis of the securities. These changes will result in earlier recognition of credit losses. This guidance is effective for the Company on February 1, 2020 with early adoption permitted. The Company is currently evaluating the impact of the adoption of this standard on its consolidated financial statements and related disclosures and does not expect a material impact. In August 2018, the FASB issued ASU 2018-15, Customer’s Accounting for Implementation Costs Incurred in a Cloud Computing Arrangement That Is a Service Contract (ASU 2018-15), which requires a customer in a cloud computing arrangement that is a service contract to follow the internal-use software guidance in Accounting Standards Codification 350-40 to determine which implementation costs to defer and recognize as an asset. This guidance is effective for the Company on February 1, 2020 with early adoption permitted. The Company is currently evaluating the impact of the adoption of this standard on its consolidated financial statements and related disclosures and does not expect a material impact. |