Exhibit 10.4

August 9, 2006

Mr.  Sam Gilson
159 Barberry Lane
Ponte Vedra Beach, FL 32082

Re:          Option Vesting on Change of Control

Dear Sam:

This letter agreement confirms our agreement regarding option vesting upon the
occurrence of certain events or conditions.

As discussed, to the extent permitted under applicable law, upon the occurrence
of (i) a Change of Control (as defined below), (ii) you are terminated without
Cause (as defined below), or (iii) you terminate your employment for Good Reason
(as defined below), all outstanding unvested stock options granted to you by
Primal Solutions, Inc. (“Primal”) shall accelerate and vest and be exercisable.

“Change of Control” shall mean in a transaction or series of related
transactions, (i) the sale of all or substantially all of the assets of the
Company, (ii) the acquisition by any person, entity or group within the meaning
of Section 13(d) or 14(d) of the Securities Exchange Act of 1934 (“Exchange
Act”) or any comparable successor provisions of the beneficial ownership (within
the meaning of Rule 13d-3 promulgated under the Exchange Act, or comparable
successor rules) of more than 50% of the outstanding capital stock of Primal, or
(iii) the merger, consolidation or other reorganization of Primal; provided,
however, that any such merger, consolidation or other reorganization of Primal
whereby securityholders of the Company immediately prior to such transaction
continue to own not less than 50% of the capital stock in the surviving company
following such transaction shall not be deemed to be a Change of Control. 
Additionally, a Change of Control shall be deemed to have occurred upon
(i) Primal entering into a “going private” transaction, (ii) the deregistration
of Primal’s securities under the Exchange Act, or (iii) Primal otherwise no
longer being subject to the reporting requirements under the Exchange Act and no
longer filing periodic reports under such Act.

“Good Reason” shall mean any of the following: (a) a material breach by Primal
of any agreement between you and Primal concerning your employment with Primal;
provided, however, that Primal shall have ten (10) days to remedy the breach
after receipt of written notice from you that the breach has occurred if the
breach is susceptible of cure; (b) the assignment without your express and
voluntary written consent to a title, status, overall position,
responsibilities, duties, reporting relationship, or general working environment
of a materially lesser status or degree of responsibility than your title,
status, overall position, responsibilities, duties, reporting relationship, and
general working environment at the effective date of this letter agreement; (c)
the requirement by Primal that you relocate your personal residence outside the
metropolitan Orange County, California area; (d) the relocation by Primal of
your office more

--------------------------------------------------------------------------------

than 50 miles from its location as of the effective date of this letter
agreement; (e) any failure by Primal to obtain the assumption of any material
written agreement between you and Primal concerning your employment by any
successor of Primal or assignee of substantially all of the business of Primal;
or (f) any material change by Primal in the benefits or incentive compensation
offered to you from those in which you are participating on the effective date
of this letter agreement, or the taking of any action by Primal which would
materially and adversely affect your participation in or reduce your benefits
under any of the benefits or incentive compensation plans of Primal or deprive
you of any fringe benefit then enjoyed by you; provided, however, that nothing
contained in this subparagraph (f) shall be deemed to permit termination by you
for Good Reason if Primal offers a range of benefit plans and programs to you
which, taken as a whole, are at least comparable to the benefits and incentive
compensation in which you are participating on the effective date of this letter
agreement.

“Cause” shall mean (a) your failure to perform (other than by reason of
disability) your duties and responsibilities to Primal in any material respect
in the good faith determination of the Board of Directors and, after receiving
written notice to such effect from Primal, you fail to cure the problem within
ten (10) days of receipt of such written notice; (b) your gross negligence or
willful misconduct in the performance of your duties and responsibilities to
Primal, such duties and responsibilities not to be unreasonably imposed; (c)
your appropriation (or attempted appropriation) of a material business
opportunity of Primal’s, including attempting to secure or securing any personal
profit in connection with any transaction entered into on behalf of Primal; (d)
your misappropriation (or attempted misappropriation) of any of Primal’s funds
or property; or (e) the conviction of, or the entering of a guilty plea or plea
of no contest by you with respect to, a felony.

If this arrangement is acceptable to you, please sign the enclosed copy of this
letter and return it to me at your earliest convenience.

Very truly yours,

 

Joseph R. Simrell

 

Chief Executive Officer

 

I agree to the terms described above:

 

 

Signature

Date

 

 

cc:           Personnel File

--------------------------------------------------------------------------------