Amended and Restated Subordination Agreement



 Exhibit 10.4 
 AMENDED AND RESTATED 
 SUBORDINATION AGREEMENT AND CONSENT 
 This Amended and Restated Subordination Agreement (this “Agreement”), dated as of June 29, 2007, is between Ashutosh Roy
(the “Lender”) and Silicon Valley Bank (“Bank”). 
 WITNESSETH: 
 WHEREAS, eGain Communications Corporation, a Delaware corporation (the “Company”), has obtained a loan from Bank which is secured
by a pledge of substantially all of the Company’s assets pursuant to the terms of that certain Loan and Security Agreement, dated as of October 24, 2004, between Bank and the Company (in each case, as amended, restated, modified or
supplemented, and including all of the other agreements and documents entered into in connection therewith, the “Loan Documents”); and 
 WHEREAS, the Lender, the Bank and the Company are parties to that certain Subordination Agreement and Consent dated as of December 24, 2002 (the “Prior Agreement”) pursuant to which
certain subordinated secured promissory notes in the face amounts of $3,524,000 and $3,524,000 dated as of December 31, 2002 and October 31, 2003, respectively (collectively, the “Prior Notes”) were subordinated to
the Company’s obligations owed to Bank under certain then existing loan documents; and 
 WHEREAS, pursuant to the Purchase Agreement
(as defined below), the Lender and the Company have agreed to extend the maturity date of the Prior Notes to March 31, 2009 and the Lender is tendering the original Prior Notes to the Company for cancellation and the Company is issuing to the
Lender a restated subordinated secured promissory note reflecting the extended maturity date (the “Restated Note”); and 
 WHEREAS, the Lender desires to purchase an additional Subordinated Secured Promissory Note (the “Note”) issued by the Company pursuant to the terms of that certain Note and Warrant Purchase Agreement and Amendment to
Subordinated Secured Promissory Notes, dated as of even date herewith, between the Company and the Lender (the “Purchase Agreement”) which Note shall be on a parity with the Prior Notes and certain subordinated secured
promissory notes issued by the Company pursuant to that certain Note and Warrant Purchase Agreement by and between certain lenders named therein and the Company dated as of March 31, 2004 (the “Credit Facility”); and

 WHEREAS, the Purchase Agreement provides that the Lender shall obtain a warrant to purchase shares of the Company’s Common Stock in
connection with Lender’s purchase of the Note (the “Warrant”); and 
 WHEREAS, Bank is willing to allow the
Lender to purchase the Note and the Warrant from the Company, and to enter into the other transactions contemplated by the Purchase Agreement, but only if the Lender and Bank enter into this Agreement, pursuant to the terms and conditions of which
the Lender will subordinate: (i) all of the Company’s indebtedness and 

  

 1 








 
obligations to the Lender, including without limitation the Note and the Restated Note, existing now or later (the “Subordinated
Debt”) to all of the Company’s indebtedness and obligations to Bank, and (ii) all of the Lender’s security interests, to all of Bank’s security interests in the Company’s property: 
 NOW, THEREFORE, in consideration of the foregoing promises and for good and valuable consideration, the receipt and sufficiency of which are hereby
acknowledged, parties hereto hereby agree as follows: 
 AGREEMENT 
 1. In exchange for the agreements of the Lender sets forth below, Bank hereby consents for all purposes under the Loan Documents to the sale and purchase
of the Note and the Warrant by the Lender from the Company, and all of the other transactions set forth in or contemplated by the Purchase Agreement. 
 2. The Lender subordinates to Bank any security interest or lien that he may have in all of the property and assets of the Company. Despite the actual attachment or perfection dates of the Lender’s security
interest and Bank’s security interest, Bank’s security interest in all of the assets and property of the Company is prior to the Lender’s security interest. 
 3. All Subordinated Debt payments are hereby subordinated to all of the Company’s obligations to Bank existing now or hereafter created, together
with collection costs of such obligations (including attorneys’ fees), including, interest accruing after any bankruptcy, reorganization or similar proceeding and all obligations owing to Bank (the “Senior Debt”).

 4. The Lender will not: 
 a) demand or receive from the Company (and the Company will not pay) any part of the Subordinated Debt, by payment, prepayment, or otherwise, 
 b) exercise any remedy against any assets of the Company, or 
 c) accelerate the Subordinated Debt, or begin or participate in any action against the Company, until all the Senior Debt is paid;

 provided, however, that the Lender may take any and all of the actions set forth in this Section 4 in the event that a default
or an event of default occurs under the Senior Debt, or any of the documents entered into in connection therewith, and the Bank has not within one hundred eighty (180) days of such default or event of default (i) accelerated the
indebtedness of the Company to the Bank under the Senior Debt, and (ii) commenced judicial or non-judicial enforcement proceedings with respect to such Senior Debt. No term or provision contained in this Section 4 shall impair, limit, or
modify the obligations of the Lender to the Bank set forth in Section 5 below. 
  

 2 








 5. The Lender must deliver to Bank in the form received (except for endorsement or assignment by the
Lender) any payment, distribution, security or proceeds it receives on the Subordinated Debt, other than according to this Agreement. 
 6.
These provisions shall remain in full force and effect, despite the Company’s insolvency, reorganization or any case or proceeding under any bankruptcy or insolvency law, and Bank’s claims against the Company and the Company’s estate
will be fully paid before any payment is made to the Lender. 
 7. Until the Senior Debt is paid, the Lender irrevocably appoints Bank as his
attorney-in-fact, with power of attorney with power of substitution, in the Lender’s name or in Bank’s name, for Bank’s use and benefit without notice to the Lender, to do the following in any bankruptcy, insolvency or similar
proceeding involving the Company: 
 (i) File any claims for the Subordinated Debt for the Lender if the Lender does not do so
at least 30 days before the time to file claims expires, and 
 (ii) Accept or reject any plan of reorganization or
arrangement for the Lender and vote the Lender’s claims in respect of the Subordinated Debt in any way it chooses. 
 8. The Lender will
immediately put a legend on the Subordinated Debt instruments that the instruments are subject to this Agreement. No amendment of the Subordinated Debt documents will modify this Agreement in any way that terminates or impairs the subordination of
the Subordinated Debt or the subordination of the security interest or lien that the Lender has in the Company’s property. For example, without the written consent of Bank, instruments cannot be amended to (i) increase the interest rate of
the Subordinated Debt or (ii) accelerate payment of principal or interest or any other portion of the Subordinated Debt. 
 9. This
Agreement is effective while the Company owes any amounts to Bank. If after full payment of the Senior Debt, Bank must disgorge any payments made on the Senior Debt, this Agreement and the relative rights and priorities provided in it, will be
reinstated as to all disgorged payments as though the payments had not been made, and the Lender will immediately pay Bank all payments received under the Subordinated Debt to the extent the payments would have been prohibited under this Agreement.
At any time without notice to the Lender, Bank may take actions it considers appropriate on the Senior Debt such as terminating advances, increasing the principal, extending the time of payment, increasing interest rates, renewing, compromising or
otherwise amending any documents affecting the Senior Debt and any collateral securing the Senior Debt, and enforcing or failing to enforce any rights against the Company or any other person. No action or inaction will impair or otherwise affect
Bank’s rights under this Agreement. The Lender waives any benefits of California Civil Code Sections 2809, 2810, 2819, 2845, 2847, 2848, 2849, 2850, 2899 and 3433. 
 10. This Agreement shall bind any successors or assignees of the Lender and shall benefit any successors or assigns of Bank. This Agreement is solely for the benefit of Lender and Bank and not for the benefit of
Company or any other party. The Lender further agrees that if the Company is in the process of refinancing a portion of the Senior Debt with a new lender, and if Bank makes a request of the Lender, the Lender shall agree to enter into a new
subordination agreement with the new lender on substantially the terms and conditions of this Agreement. 
  

 3 








 11. This Agreement may be executed in two or more counterparts, each of which is an original and all of
which together constitute one instrument. 
 12. California law governs this agreement without giving effect to conflicts of laws principles.
The Lenders and Bank submit to the exclusive jurisdiction of the courts in Santa Clara County, California. 
 13. This Agreement amends and
restates the Prior Agreement, represents the entire agreement about this subject matter, and supersedes prior negotiations or agreements. The Lender is not relying on any representations by Bank or the Company in entering into this Agreement. The
Lender will keep itself informed of the Company’s financial and other conditions. This Agreement may be amended only by written instrument signed by (i) the Lender and (ii) Bank. 
 14. If there is an action to enforce the rights of a party under this Agreement, the party prevailing will be entitled, in addition to other relief, all
reasonable costs and expenses, including reasonable attorneys’ fees, incurred in the action 
 15. MUTUAL WAIVER OF JURY TRIAL.

 a) Because disputes arising in connection with complex financial transactions are most quickly and economically resolved by an experienced
and expert person and the parties wish applicable state and federal laws to apply (rather than arbitration rules), the parties desire that their disputes be resolved by a judge applying such applicable laws. LENDER AND BANK EACH SPECIFICALLY WAIVE
ITS RESPECTIVE RIGHT TO TRIAL BY JURY OF ANY CAUSE OF ACTION, CLAIM, CROSS-CLAIM, COUNTERCLAIM, THIRD PARTY CLAIM OR ANY OTHER CLAIM (COLLECTIVELY, “CLAIMS”) ASSERTED BY THE COMPANY, LENDER, OR BANK AGAINST THE OTHER PARTY OR PARTIES TO
THIS AGREEMENT. This waiver extends to all such claims, including, without limitation, claims which involve persons or entities other than the Company, Lender, and Bank; claims which arise out of or are in any way connected to the relationships
between or among the Company, Lender, and Bank; and any claims for damages, breach of contract, specific performance, or any equitable or legal relief of any kind. 
 b) WITHOUT INTENDING IN ANY WAY TO LIMIT THE PARTIES’ AGREEMENT TO WAIVE THEIR RESPECTIVE RIGHT TO A TRIAL BY JURY, if the above waiver of the right to a trial by jury is not enforceable, the parties hereto agree
that any and all disputes or controversies of any nature between them arising at any time shall be decided by a reference to a private judge, mutually selected by the parties (or, if they cannot agree, by the Presiding Judge of the Santa Clara
County, California Superior Court) appointed in accordance with California Code of Civil Procedure §638 (or pursuant to comparable provisions of federal law if the dispute falls within the exclusive jurisdiction of the federal courts), sitting
without a jury, in Santa Clara County, California; and the parties hereby submit to the jurisdiction of such court. The reference proceedings shall be conducted pursuant to and in accordance with the 

  

 4 








 
provisions of California Code of Civil Procedure §§ 638 through 645.1, inclusive. The private judge shall have the power, among others, to grant
provisional relief, including without limitation, entering temporary restraining orders, issuing preliminary and permanent injunctions and appointing receivers. All such proceedings shall be closed to the public and confidential and all records
relating thereto shall be permanently sealed. If during the course of any dispute, a party desires to seek provisional relief, but a judge has not been appointed at that point pursuant to the judicial reference procedures, then such party may apply
to the Santa Clara County, California Superior Court for such relief. The proceeding before the private judge shall be conducted in the same manner as it would be before a court under the rules of evidence applicable to judicial proceedings. The
parties shall be entitled to discovery which shall be conducted in the same manner as it would be before a court under the rules of discovery applicable to judicial proceedings. The private judge shall oversee discovery and may enforce all discovery
rules and order applicable to judicial proceedings in the same manner as a trial court judge. The parties agree that the selected or appointed private judge shall have the power to decide all issues in the action or proceeding, whether of fact or of
law, and shall report a statement of decision thereon pursuant to the California Code of Civil Procedure § 644(a). Nothing in this paragraph shall limit the right of any party at any time to exercise self-help remedies, foreclose against
collateral, or obtain provisional remedies. The private judge shall also determine all issues relating to the applicability, interpretation, and enforceability of this paragraph. 
 [remainder of page intentionally left blank] 
  

 5 








 In Witness Whereof, this Amended and Restated Subordination Agreement and Consent has been duly executed and
delivered by the duly authorized officer of each party hereto as of the date first above written. 
  

					
	BANK:	 	SILICON VALLEY BANK
			
		 	By:	 	 /s/ Mei Chui

		 	Name:	 	 Mei Chui

		 	Its:	 	  

		
	LENDER:	 	ASHUTOSH ROY
			
		 	By:	 	 /s/ Ashutosh Roy

		 	Name:	 	 Ashutosh Roy

		 	Its:	 	  

		
	The Company approves the terms of this Agreement:	 	eGAIN COMMUNICATIONS CORPORATION
			
		 	By:	 	 /s/ Eric Smit

		 	Name:	 	 Eric Smit

		 	Its:	 	  


  

 6