Summary of Significant Accounting Policies | Basis of Presentation The consolidated financial statements have been prepared in accordance with United States Generally Accepted Accounting Principles, or GAAP. The consolidated financial statements include the accounts of Zendesk, Inc. and its subsidiaries. All intercompany balances and transactions have been eliminated in consolidation. Reclassification Certain prior year amounts have been reclassified for consistency with the current year presentation. These reclassifications had an immaterial effect on our reported results of operations. Use of Estimates The preparation of our consolidated financial statements in conformity with GAAP requires management to make certain estimates, judgments, and assumptions that affect the reported amounts of assets and liabilities and disclosure of contingent assets and liabilities at the date of the financial statements, as well as the reported amounts of revenue and expenses during the reported periods. Significant items subject to such estimates and assumptions include the fair value of share-based awards, acquired intangible assets, goodwill, and our convertible senior notes, as well as unrecognized tax benefits, the useful lives of acquired intangible assets and property and equipment, the capitalization and estimated useful life of costs to obtain customer contracts and internal-use software, variable consideration related to revenue recognition, financial forecasts used in currency hedging, and impairment of strategic investments. These estimates are based on information available as of the date of the financial statements; therefore, actual results could differ from those estimates. Segment Information Our chief operating decision maker reviews the financial information presented on a consolidated basis for purposes of allocating resources and evaluating our financial performance. Accordingly, we have determined that we operate in a single operating segment. Revenue Recognition We generate substantially all of our revenue from subscription services, which are comprised of subscription fees from customer accounts on Zendesk Support and, to a lesser extent, Chat, Talk, Guide, Explore, Sell, and Connect. In addition, we generate revenue by providing additional features to certain of our subscription plans for a fee that is incremental to the base subscription rate for such plans. Subscription service arrangements are generally non-cancelable and do not provide for refunds to customers in the event of cancellations or any other right of return. We record revenue net of sales or excise taxes. We also derive revenue from implementation and training services, for which we recognize revenue based on proportional performance, and Talk usage, for which we recognize revenue based on usage. Revenues are recognized when control of these services is transferred to our customers, in an amount that reflects the consideration we expect to be entitled to in exchange for those services. We determine 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 performance obligations are satisfied. Subscription revenue is recognized on a ratable basis over the contractual subscription term of the arrangement beginning on the date that our service is made available to the customer. Payments received in advance of services being rendered are recorded as deferred revenue. In limited circumstances, certain customers have arrangements that provide for a maximum number of users over the subscription term, with usage measured monthly. Incremental fees are incurred when the maximum number of users is exceeded. In determining the transaction price for these arrangements, we evaluate the expected usage and estimate any incremental fees that we are entitled to throughout the subscription term and recognize revenue ratably over the subscription term. In making these assessments, we constrain our estimates based on factors that could lead to a probable significant reversal of cumulative revenue recognized. Certain of our product offerings include service-level agreements warranting defined levels of uptime reliability and performance and permitting those customers to receive credits for future services in the event that we fail to meet those levels. To date, we have not accrued for any material liabilities in our consolidated financial statements as a result of these service-level agreements. Deferred Revenue We invoice customers for subscriptions to our products in monthly, quarterly, or annual installments. Deferred revenue consists primarily of customer billings made in advance of performance obligations being satisfied and revenue being recognized, and includes an immaterial amount of billings for subscriptions with customer cancellation rights. The term between invoicing and when payment is due is not significant and we do not provide financing arrangements to customers. Deferred revenue associated with performance obligations that are anticipated to be satisfied, and thus revenue recognized, during the succeeding 12-month period is recorded as current deferred revenue and the remaining portion is recorded as noncurrent deferred revenue. Deferred revenue associated with implementation, Talk usage, and training services was immaterial as of December 31, 2018 and 2017 . We invoice customers based on billing schedules established in our contracts. Accounts receivable are recorded when the right to consideration becomes unconditional. Cost of Revenue Cost of revenue consists primarily of personnel costs (including salaries, share-based compensation, and benefits) for employees associated with our infrastructure, product support, and professional service organizations, and expenses for hosting capabilities, primarily for third-party managed hosting services and depreciation from our self-managed colocation data centers. Cost of revenue also includes third-party license fees, payment processing fees, amortization expense associated with capitalized internal-use software, amortization expense associated with acquired intangible assets, and allocated shared costs, primarily including facilities, information technology, and security costs. Cash, Cash Equivalents, and Restricted Cash We consider all highly liquid investments purchased with a remaining maturity of three months or less to be cash equivalents. Cash and cash equivalents are recorded at fair value and consist primarily of bank deposits and money market funds. As of December 31, 2018 , our restricted cash balance was $2.4 million , consisting of $1.6 million pledged for charitable donation and $0.7 million related to deposits for leased office spaces. As of December 31, 2017 , our restricted cash balance was $1.5 million , consisting of $0.9 million pledged for charitable donation and $0.6 million related to a deposit for leased office space. Restricted cash is included within prepaid expenses and other current assets and other assets on our consolidated balance sheets. Marketable Securities Marketable securities consist of corporate bonds, asset-backed securities, U.S. Treasury securities, money market funds, commercial paper, agency securities, certificates of deposit, and time deposits. We classify marketable securities as available-for-sale at the time of purchase and reevaluate such classification as of each balance sheet date. All marketable securities are recorded at their estimated fair values. Unrealized gains and losses for available-for-sale securities are recorded in other comprehensive gain (loss). We evaluate our investments to assess whether those with unrealized loss positions are other than temporarily impaired. Impairments are considered other than temporary if they are related to deterioration in credit risk or if it is likely we will sell the securities before the recovery of their cost basis. Realized gains and losses and declines in value determined to be other than temporary are determined based on the specific identification method and are reported in other income (expense), net in the consolidated statements of operations. Accounts Receivable and Allowance for Doubtful Accounts Accounts receivable are recorded at the invoiced amount, net of allowance for doubtful accounts. The allowance is based upon historical loss patterns, the age of each past due invoice, and an evaluation of the potential risk of loss associated with delinquent accounts. Accounts receivable deemed uncollectable are charged against the allowance for doubtful accounts when identified. The balance of accounts receivable also includes contract assets, which are recorded when revenue is recognized in advance of invoicing. Our allowance for doubtful accounts consists of the following activity (in thousands): Year Ended December 31, 2018 2017 Allowance for doubtful accounts, beginning balance $ 1,252 $ 1,269 Additions 2,667 3,400 Write-offs (1,348 ) (3,417 ) Allowance for doubtful accounts, ending balance $ 2,571 $ 1,252 Costs to Obtain Customer Contracts Sales commissions and related expenses are considered incremental and recoverable costs of acquiring customer contracts. These costs are capitalized and amortized on a straight-line basis over the anticipated period of benefit, which we have estimated to be three years. We determined the period of benefit by taking into consideration the length of our customer contracts, our technology lifecycle, and other factors. Amortization expense is recorded in sales and marketing expense within our consolidated statement of operations. Sales commissions paid for contract renewals are not material. Property and Equipment Property and equipment are stated at cost less accumulated depreciation. Depreciation is calculated using the straight-line method over the estimated useful lives of the assets. Maintenance and repair costs are charged to expense as incurred. The estimated useful lives of our property and equipment are as follows: Furniture and fixtures 5 years Hosting equipment 3 years Computer equipment and licensed software and patents 3 to 5 years Leasehold improvements Shorter of the lease term or estimated useful life Derivative Instruments and Hedging We enter into foreign currency forward contracts with certain financial institutions to mitigate the impact of foreign currency fluctuations on our future cash flows and earnings. All of our foreign currency forward contracts are designated as cash flow hedges. Our foreign currency forward contracts generally have maturities of 15 months or less. We recognize all forward contracts on our balance sheet at fair value as either assets or liabilities. The effective portion of the gain or loss on each forward contract is reported as a component of accumulated other comprehensive loss and reclassified into earnings, into revenue, cost of revenue or operating expense in the same period, or periods, during which the hedged transaction affects earnings. The ineffective portion of the gains or losses, if any, is recorded immediately in other income (expense), net. The change in time value related to our cash flow hedges is excluded from the assessment of hedge effectiveness and is recorded immediately in other income (expense), net. We evaluate the effectiveness of our cash flow hedges on a quarterly basis. We have a master netting agreement with each of our counterparties, which permits net settlement of multiple, separate derivative contracts with a single payment. We may also be required to exchange cash collateral with certain of our counterparties on a regular basis. As of December 31, 2018 , we have no restricted cash associated with cash collateral exchanged. GAAP permits companies to present the fair value of derivative instruments on a net basis according to master netting arrangements. We have elected to present our derivative instruments on a gross basis in our consolidated financial statements. We do not enter into any derivative contracts for trading or speculative purposes. Fair Value Measurements We measure certain financial instruments at fair value using a fair value hierarchy. A financial instrument’s classification within the fair value hierarchy is based upon the lowest level of input that is significant to the fair value measurement. Three levels of inputs may be used to measure fair value: Level 1—Observable inputs that reflect quoted prices (unadjusted) for identical assets or liabilities in active markets. Level 2—Other inputs that are directly or indirectly observable in the marketplace. Level 3—Unobservable inputs that are supported by little or no market activity. Our marketable securities are classified within either Level 1 or Level 2, and our foreign currency forward contracts and convertible senior notes are classified within Level 2. We have no financial assets or liabilities measured using Level 3 inputs. The fair value of our Level 1 marketable securities is based on quoted market prices of identical underlying securities. The fair value of our Level 2 marketable securities is based on indirect or directly observable market data, including readily available pricing sources for identical underlying securities that may not be actively traded. The fair value of our foreign currency forward contracts is based on quoted prices and market observable data of similar instruments in active markets, such as currency spot rates, forward rates, and LIBOR. The fair value of our convertible senior notes is determined based on the quoted price of the convertible senior notes in an inactive market. For certain other financial instruments, including accounts receivable, accounts payable and other current liabilities, the carrying amounts approximate their fair value due to the relatively short maturity of these balances. Capitalized Internal-Use Software Costs We capitalize certain development costs incurred in connection with software development for our platform and software used in operations. Costs incurred in the preliminary stages of development are expensed as incurred. Once software has reached the development stage, internal and external costs, if direct and incremental, are capitalized until the software is substantially complete and ready for its intended use. Capitalization ceases upon completion of all substantial testing. We also capitalize costs related to specific upgrades and enhancements when it is probable the expenditures will result in additional functionality. Capitalized costs are recorded as part of property and equipment. Maintenance and training costs are expensed as incurred. Capitalized internal-use software is amortized on a straight-line basis over its estimated useful life and recorded in cost of revenue within the accompanying consolidated statements of operations. The weighted-average remaining useful life of our capitalized internal-use software was 3.7 years as of December 31, 2018 . Business Combinations When we acquire businesses, we allocate the purchase price to the net tangible and identifiable intangible assets. Any residual purchase price is recorded as goodwill. The allocation of the purchase price requires management to make significant 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. Goodwill, Acquired Intangible Assets, and Impairment Assessment of Long-Lived Assets Goodwill. Goodwill represents the excess purchase consideration of an acquired business over the fair value of the net tangible and identifiable intangible assets. Goodwill is evaluated for impairment annually in the third quarter, and whenever events or changes in circumstances indicate the carrying value of goodwill may not be recoverable. Triggering events that may indicate impairment include, but are not limited to, a significant adverse change in customer demand or business climate or a significant decrease in expected cash flows. No impairment charges were recorded during the years ended December 31, 2018 , 2017 , or 2016 . Acquired Intangible Assets. Acquired intangible assets consist of identifiable intangible assets, primarily developed technology and customer relationships, resulting from our acquisitions. Intangible assets are recorded at fair value on the date of acquisition and amortized over their estimated useful lives. Impairment of Long-Lived Assets. The carrying amounts of our long-lived assets, including property and equipment, capitalized internal-use software, costs to obtain customer contracts, and acquired intangible assets, are reviewed for impairment whenever events or changes in circumstances indicate that the carrying value of these assets may not be recoverable or that the useful lives are shorter than originally estimated. Recoverability of assets to be held and used is measured by comparing the carrying amount of an asset to future undiscounted net cash flows the asset is expected to generate over its remaining life. If the asset is considered to be impaired, the amount of any impairment is measured as the difference between the carrying value and the fair value of the impaired asset. If the useful life is shorter than originally estimated, we amortize the remaining carrying value over the new shorter useful life. There were no material impairments for the years ended December 31, 2018 , 2017 , and 2016 , other than those disclosed in Note 6. Strategic Investments Strategic investments consist of non-controlling equity investments in privately-held companies. We have elected to apply the measurement alternative for these investments as they do not have readily determinable fair values, measuring them at cost, less any impairment, plus or minus adjustments resulting from observable price changes in orderly transactions for the identical or a similar investment of the same issuer. An impairment loss is recorded when events or circumstances indicate a decline in value has occurred. We include strategic investments in other assets in our consolidated balance sheets. Share-Based Compensation Share-based compensation expense to employees is measured based on the fair value of the awards on the grant date and recognized in our consolidated statements of operations over the period during which the employee is required to perform services in exchange for the award (generally the vesting period of the award, which is typically four years ). The contractual term of our stock options is typically ten years . We estimate the fair value of stock options granted using the Black-Scholes option valuation model. We measure the fair value of Restricted Stock Units, or RSUs, based on the fair value of the underlying shares on the date of grant. Compensation expense for awards with only service conditions is recognized over the vesting period of the applicable award using the straight-line method. We record share-based compensation expense for performance-based equity awards using the accelerated attribution method. As of December 31, 2018 , we had a total of $265.4 million in future period share-based compensation expense related to all equity awards to be recognized over a weighted average period of 2.7 years. Advertising Expense Advertising is expensed as incurred. For the years ended December 31, 2018 , 2017 , and 2016 , advertising expense was $48.2 million , $36.8 million , and $23.9 million , respectively. Government Grants We have obtained government grants in certain jurisdictions where we operate. We receive the grant funds as we meet certain commitments, including targeted levels of employment and/or spending within the local jurisdictions. If we fail to maintain these commitments, we may be required to repay grant funds received or be ineligible to receive future funding. We recognize grant proceeds to offset costs to which the grants relate on a straight-line basis when it is reasonably assured that the applicable commitments have been met. For each of the years ended December 31, 2018 and 2017 , we recognized grant proceeds of $2.0 million and in 2016 we recognized grant proceeds of $1.2 million in our consolidated statements of operations. Income Taxes We record income taxes using the asset and liability method, which requires the recognition of deferred tax assets and liabilities for the expected future tax consequences of events that have been recognized in our consolidated financial statements or tax returns. Deferred tax assets and liabilities are measured using the 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. Valuation allowances are provided when necessary to reduce deferred tax assets to the amount expected to be realized. We recognize tax benefits from uncertain tax positions if it is more likely than not that the tax position will be sustained on examination by the taxing authorities based on the technical merits of the position. Although we believe that we have adequately reserved for our uncertain tax positions, we can provide no assurance that the final tax outcome of these matters will not be materially different. We make adjustments to these reserves when facts and circumstances change, such as the closing of a tax audit or the refinement of an estimate. To the extent that the final 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 our financial condition and results of operations. We have elected to record interest accrued and penalties related to unrecognized tax benefits in our consolidated financial statements as a component of provision for income taxes. Foreign Currency The functional currency of our foreign subsidiaries is the U.S. dollar. Accordingly, monetary balance sheet accounts are remeasured using exchange rates in effect at the balance sheet dates and non-monetary items are remeasured at historical exchange rates. Expenses are generally remeasured at the average exchange rates for the period. Foreign currency remeasurement and transaction gains and losses are included in other income (expense), net and were not material for the years ended December 31, 2018 , 2017 , and 2016 , respectively. Concentrations of Risk Financial instruments potentially exposing us to concentrations of credit risk consist primarily of cash and cash equivalents, restricted cash, marketable securities, accounts receivable and derivative instruments. We place our cash and cash equivalents with high-credit-quality financial institutions. However, we maintain balances in excess of the FDIC insurance limits. We do not require our customers to provide collateral to support accounts receivable and maintain an allowance for doubtful accounts receivable balances. We seek to mitigate counterparty credit risk related to our derivative instruments by transacting with major financial institutions with high credit ratings. At December 31, 2018 and 2017 , there were no customers that represented 10% or greater of our accounts receivable balance. There were no customers that individually exceeded 10% of our revenue in any of the periods presented. Recently Issued Accounting Pronouncements In February 2016, the Financial Accounting Standards Board, or FASB, issued ASU 2016-02, regarding ASC Topic 842 “ Leases ,” including subsequent amendments. This new guidance requires lessees to recognize most leases on their balance sheets as right-of-use assets with corresponding lease liabilities and eliminates certain real estate-specific provisions. The new guidance is effective for annual reporting periods beginning after December 15, 2018, including interim periods within that reporting period. Early adoption is permitted. We have completed our process to identify our population of lease arrangements and completed our evaluation of each arrangement under the guidance, including application of elected practical expedients. We are also finalizing the incremental borrowing rate for each arrangement. We plan to adopt utilizing the modified retrospective method of transition. While the adoption remains in progress, we expect that adoption will result in the recognition of right-of-use assets and lease liabilities that were not previously recognized, which will increase total assets and liabilities on our consolidated balance sheet. In June 2016, the FASB issued ASU 2016-13, “Financial Instruments - Credit Losses: Measurement of Credit Losses on Financial Instruments,” which changes the impairment model for most financial assets. The new model uses a forward-looking expected loss method, which will generally result in earlier recognition of allowances for losses. The standard is effective for annual reporting periods beginning after December 15, 2019, including interim periods within that reporting period. Early adoption is permitted. We are currently evaluating the effect of this standard on our consolidated financial statements. In January 2017, the FASB issued ASU 2017-04, regarding ASC Topic 350 “ Simplifying the Test for Goodwill Impairment ,” which simplifies the required methodology to calculate an impairment charge for goodwill. The standard is effective for fiscal years beginning after December 15, 2019, however early adoption is permitted. We do not expect the adoption of this standard to have a material effect on our consolidated financial statements. In August 2017, the FASB issued ASU 2017-12, regarding ASC Topic 815 “ Derivatives and Hedging. ” This amendment simplifies various aspects of hedge accounting, including the measurement and presentation of hedge ineffectiveness and certain documentation and assessment requirements. The amendment also makes more hedging strategies eligible for hedge accounting. The guidance is effective for annual reporting periods beginning after December 15, 2018, including interim periods within that reporting period. Early adoption is permitted. We do not expect the adoption of this standard to have a material effect on our consolidated financial statements. In February 2018, the FASB issued ASU 2018-02, “ Income Statement - Reporting Comprehensive Income, ” which provides for the reclassification of the effect of remeasuring deferred tax balances related to items within accumulated other comprehensive income to retained earnings resulting from the Tax Cuts and Jobs Act, or Tax Act. The guidance is effective for annual reporting periods beginning after December 15, 2018, including interim periods within that reporting period. Early adoption is permitted. We do not expect the adoption of this standard to have a material effect on our consolidated financial statements. In June 2018, the FASB issued ASU 2018-07, regarding ASC Topic 718 “ Compensation - Stock Compensation, ” which largely aligns the accounting for share-based compensation for non-employees with employees. The guidance is effective for annual reporting periods beginning after December 15, 2018, including interim periods within that reporting period. Early adoption is permitted. We do not expect the adoption of this standard to have a material effect on our consolidated financial statements. In June 2018, the FASB issued ASU 2018-08, regarding ASC Topic 958 “ Not-for-Profit Entities, ” which clarified the guidance on how entities determine whether to account for a transfer of assets as an exchange transaction or a contribution. The guidance is effective for annual reporting periods beginning after December 15, 2018, including interim periods within that reporting period. Early adoption is permitted. We do not expect the adoption of this standard to have a material effect on our consolidated financial statements. In August 2018, the FASB issued ASU 2018-13, regarding ASC Topic 820 “ Fair Value Measurement, ” which modifies the disclosure requirements for fair value measurements for certain types of investments. The guidance is effective for annual reporting periods beginning after December 15, 2019, including interim periods within that reporting period. Early adoption is permitted. We do not expect the adoption of this standard to have a material effect on our consolidated financial statements. In August 2018, the FASB issued ASU 2018-15, regarding ASC Topic 350-40 “ Intangibles - Internal-Use Software, ” which aligns the requirements for capitalizing implementation costs incurred in a hosting arrangement that is a service contract with the requirements for capitalizing implementation costs incurred to develop or obtain internal-use software. The guidance is effective for annual reporting periods beginning after December 15, 2019, including interim periods within that reporting period. We plan to early adopt this standard in the first quarter of 2019 on a prospective basis. We do not expect adoption to have a material effect on our consolidated financial statements. Recently Adopted Accounting Pronouncements In March 2016, the FASB issued ASU 2016-09, regarding ASC Topic 718 “ Compensation - Stock Compensation .” This amendment changes certain aspects of accounting for share-based awards to employees, including the recognition of income tax effects of awards when the awards vest or are settled, requirements on net share settlement to cover tax withholding, and accounting for forfeitures. We adopted the standard in the first quarter of 2017. As required by the new standard, we now recognize excess tax effects from share-based awards as a component of provision for income taxes in our statement of operations when awards vest or are settled. Upon adoption, we recorded a deferred tax asset of $52.8 million to reflect, on a modified retrospective basis, the previously unrecognized excess tax benefits; however, the deferred tax asset was fully offset by a valuation allowance, resulting in no impact to our consolidated financial statements. In our statement of cash flows, we no longer classify excess tax benefits as a reduction from operating cash flows. This change was made prospectively beginning with the quarter ended March 31, 2017. We also elected to account for forfeitures as they occur, therefore share-based compensation expense for the years ended December 31, 2018 and 2017 have been calculated based on actual forfeitures in our consolidated statement of operations, rather than our previous approach which was net of estimated forfeitures. The cumulative-effect adjustment of this change on a modified retrospective basis was not material. Share-based compensation expense for the year ended December 31, 2016 was recorded net of estimated forfeitures. In May 2014, the FASB issued new revenue guidance under ASU 2014-09 that provides principles for recognizing revenue when promised goods or services are transferred to customers in an amount that reflects the consideration to which an entity expects to be entitled in exchange for the promised goods or services provided to customers. ASC 606 and ASC 340-40 also require the deferral of incremental costs of obtaining contracts with customers and subsequent amortization of those costs over the period of anticipated benefit. Collectively, we refer to this guidance as “ASC 606.” We adopted ASC 606 on January 1, 2018, utilizing the full retrospective method of transition. The adoption resulted in changes to our accounting policies for revenue recognition and incremental costs to acquire contracts, as described below. We applied ASC 606 using the following practical expedients: • consideration allocated to the remaining performance obligations and an explanation of when we expect to recognize that amount as revenue is not disclosed for comparative periods prior to the adoption date; • completed contracts that included variable consideration utilize the final transaction price rather than an estimation of variable consideration for comparative periods prior to the adoption date; and • costs of obtaining contracts with customers are expensed when the amortization period would have been one year or less. The effect of adopting ASC 606 on our 2017 and 2016 revenues was not material. The primary effect r |