
    [No. A120072.
    First Dist., Div. One.
    Feb. 11, 2009.]
    NATIONAL UNION FIRE INSURANCE COMPANY OF PITTSBURGH, PA, Plaintiff and Appellant, v. CAMBRIDGE INTEGRATED SERVICES GROUP, INC., Defendant and Respondent.
    
      Counsel
    Horvitz & Levy, Peter Abrahams, Curt Cutting; Dongell Lawrence Finney, Richard A. Dongell, John A. Lawrence and Joshua N. Levine for Plaintiff and Appellant.
    Buchalter Nemer, Holly J. Fujie and Efrat M. Cogan for Defendant and Respondent.
    
      
       Judge of the Contra Costa Superior Court, assigned by the Chief Justice pursuant to article VI, section 6 of the California Constitution.
    
   Opinion

MARGULIES, J.

Plaintiff National Union Fire Insurance Company of Pittsburgh, PA (National), provided excess insurance to the workers’ compensation program of the Bank of America (Bank), which was administered by defendant Cambridge Integrated Services Group, Inc. (Cambridge). National filed suit against Cambridge, alleging that as a result of Cambridge’s negligence in handling a workers’ compensation claim, National was required to reimburse over $1.5 million in medical expenses of a former Bank employee. The complaint pleaded claims for negligence, breach of contract, negligent misrepresentation, and subrogation.

The trial court sustained a demurrer to National’s complaint, reasoning that a general assignment clause in the contract between the Bank and Cambridge precluded any claims by National against Cambridge. We reverse in large part, concluding that Cambridge had a duty of care to National under the circumstances as pleaded, National was a third party beneficiary of the contract between the Bank and Cambridge, and National was subrogated to the Bank’s rights against Cambridge. We affirm the trial court’s dismissal of the cause of action for negligent misrepresentation.

I. BACKGROUND

The following account is taken from the allegations of National’s complaint, filed March 14, 2007, which we accept as true for purposes of this appeal from a sustained demurrer. (See Doe v. City of Los Angeles (2007) 42 Cal.4th 531, 543 [67 Cal.Rptr.3d 330, 169 P.3d 559].)

National provided excess workers’ compensation insurance to the Bank. Under National’s policy, it was required to reimburse the Bank for workers’ compensation payments over $250,000 per injury. The Bank was self-insured for amounts below the excess insurance threshold. The policy contained a clause subrogating National to the Bank’s rights with respect to covered claims.

Cambridge served as administrator of workers’ compensation claims for the Bank. Cambridge’s contract with the Bank (the Cambridge contract) required it to “examine, on behalf of BANK, all reports of alleged work-related injury, occupational disease or death of employees reported by the BANK to [Cambridge].” Cambridge had the authority to investigate claims and to “make determinations of liability and compensability on all workers’ compensation claims reported to [Cambridge] and covered by this Agreement.” Cambridge could resolve workers’ compensation claims in amounts less than $25,000, without prior Bank approval, making payments from a fund maintained by the Bank. Litigated claims could be handled by Cambridge attorneys or referred to outside counsel, at the discretion of Cambridge or the direction of the Bank, and Cambridge was required to monitor outside counsel. Among other compensation, Cambridge was paid a flat fee for each new or open claim during the course of a year.

The Cambridge contract contained a general assignment clause, reading: “Neither party shall assign any of its rights or delegate any of its obligations under this Agreement without the prior written consent of the other party. Any prohibited assignment or delegation shall be null and void.” It also contained an indemnity clause requiring Cambridge to indemnify the Bank against “all loss, claim or damage . . . caused by the fault or negligence of [Cambridge], its employees or authorized representatives, arising out of the performance or nonperformance of [Cambridge’s] obligation under” the contract.

The contract required Cambridge to notify the Bank’s excess insurance carrier “of any claim for which such notification is required” by the excess policy. According to the complaint, Cambridge was aware of National’s coverage, had been provided a copy of its excess policy, and provided National with periodic reports on the status of claims. Cambridge continued to handle workers’ compensation claims against the Bank even after they resulted in more than $250,000 in payments, thereby invoking National’s excess coverage. National relied on Cambridge’s expertise in handling the claims.

In 1999, a former employee of the Bank, Michael Metter, filed a workers’ compensation claim against the Bank, claiming that a recent back injury was tied to earlier injuries he suffered in 1982 and 1987, while working for the Bank. Cambridge handled the claim, issuing a denial on the ground that Metter’s injury was not related to the earlier injuries. Supporting Cambridge’s determination was the report of a doctor it retained to examine Metter, who concluded that the injury was not covered and recommended against any surgery to treat it. For reasons that are not clear, the outside attorneys handling the Metter claim, who were being monitored by Cambridge, nonetheless agreed at a February 2000 settlement conference to pay for treatment of Metter’s injury. Cambridge thereafter approved a request made by Metter’s treating physician for surgery. As a result of the surgery, Metter was rendered a paraplegic. Because Cambridge had authorized payment for the surgery, the Bank and National were obligated to pay the expenses associated with its consequences. At the time of filing, those expenses exceeded $1.5 million. Cambridge continued to administer the Metter claim even after it exceeded the Bank’s self-insurance limit.

In its reports to the Bank and National, beginning in February or March 2000 and continuing through March 2006, Cambridge falsely maintained that its examining doctor had approved Metter’s surgery. Relying on Cambridge’s reports, National did not become aware of the true facts until a new law firm took over defense of Metter’s claim.

National’s complaint pleaded several theories of recovery. The first cause of action alleged that Cambridge breached the Cambridge contract by mishandling the Metter claim and that National was subrogated to the Bank’s right of recovery against Cambridge for that breach. The second alleged that the Bank was entitled to contractual indemnity from Cambridge as a result of its negligent handling of the Metter claim and that National was subrogated to the Bank’s right of recovery under the indemnity clause. The third cause of action alleged that Cambridge had “negligently failed to inform [National] that the defense expert had opined that the Metter Claim was not related to his prior injuries” and had affirmatively reported the opposite. As a result of these misrepresentations, National alleged, it became obligated to pay on the Metter claim. The fourth cause of action alleged that National was entitled to “equitable subrogation” from Cambridge. The fifth alleged that National was entitled to recover under a direct tort duty for Cambridge’s negligence.

Cambridge demurred to the complaint. The trial court sustained the demurrer as to all five causes of action alleged against Cambridge, allowing National leave to amend to allege (1) with specificity the terms of its excess policy, which had not been attached to the complaint; and (2) facts sufficient to demonstrate that the Cambridge contract’s assignment clause did not preclude National’s recovery by subrogation.

National’s amended complaint alleged in more detail the provisions of its policy granting it rights with respect to the handling of workers’ compensation claims, including clauses allowing it to (1) associate in the defense of any claim reasonably likely to involve excess insurance, (2) receive information with respect to the handling of such claims, (3) consent to legal costs incurred on its behalf, and (4) consent to any settlement above the self-insurance threshold. It further alleged that Cambridge had, in fact, reported to it with respect to all claims reasonably likely to involve the excess coverage. The amended complaint realleged, with minor changes, four of the causes of action, but it dropped the negligence cause of action. In addition, it altered the basis of the negligent misrepresentation claim, alleging misrepresentation to the Bank rather than directly to National.

Cambridge demurred again, this time with complete success. In its order sustaining the demurrer without leave to amend, the trial court ruled that National had “failed to allege facts sufficient to demonstrate the inapplicability” of the assignment clause, which the court viewed as precluding any recovery against Cambridge.

II. DISCUSSION

“On appeal from a judgment dismissing an action after sustaining a demurrer without leave to amend, the standard of review is well settled. We give the complaint a reasonable interpretation, reading it as a whole and its parts in their context. [Citation.] Further, we treat the demurrer as admitting all material facts properly pleaded, but do not assume the truth of contentions, deductions or conclusions of law. [Citations.] When a demurrer is sustained, we determine whether the complaint states facts sufficient to constitute a cause of action. [Citation.] And when it is sustained without leave to amend, we decide whether there is a reasonable possibility that the defect can be cured by amendment: if it can be, the trial court has abused its discretion and we reverse.” (City of Dinuba v. County of Tulare (2007) 41 Cal.4th 859, 865 [62 Cal.Rptr.3d 614, 161 P.3d 1168].) “ ‘[W]e examine the complaint de novo to determine whether it alleges facts sufficient to state a cause of action under any legal theory ....’” (Betancourt v. Storke Housing Investors (2003) 31 Cal.4th 1157, 1162-1163 [8 Cal.Rptr.3d 259, 82 P.3d 286].)

A. Negligence

National first contends that the trial court erred in sustaining the demurrer as to its negligence cause of action.

1. Waiver

As a preliminary matter, Cambridge argues that National waived its right to appeal this decision by failing to reallege the negligence cause of action in its first amended complaint. We conclude that no waiver occurred. When a demurrer to a cause of action is sustained with leave to amend, the plaintiff may elect not to amend the cause of action. The order sustaining the demurrer is treated as an intermediate order with respect to that cause of action, appealable at the time of a final judgment, and the plaintiff is deemed to have elected to stand on the validity of the cause of action as originally pleaded. (County of Santa Clara v. Atlantic Richfield Co. (2006) 137 Cal.App.4th 292, 312 [40 Cal.Rptr.3d 313] (Atlantic Richfield); cf. Reynolds v. Bement (2005) 36 Cal.4th 1075, 1091 [32 Cal.Rptr.3d 483, 116 P.3d 1162].) “The rule that a choice to amend waives any error can reasonably be applied only on a cause-of-action-by-cause-of-action basis. If a plaintiff chooses not to amend one cause of action but files an amended complaint containing the remaining causes of action or amended versions of the remaining causes of action, no waiver occurs and the plaintiff may challenge the intermediate ruling on the demurrer on an appeal from a subsequent judgment. It is only where the plaintiff amends the cause of action to which the demurrer was sustained that any error is waived.” (Atlantic Richfield, at p. 312.)

Cambridge relies on cases holding that an amended pleading supersedes all prior complaints, which will not be considered on appeal. (E.g., Foreman & Clark Corp. v. Fallon (1971) 3 Cal.3d 875, 884 [92 Cal.Rptr. 162, 479 P.2d 362] [“ ‘It is well established that an amendatory pleading supersedes the original one, which ceases to perform any function as a pleading. [Citations.]’ [Citation.] ‘Such amended pleading supplants all prior complaints. It alone will be considered by the reviewing court.’ ”].) Read to preclude appeal of causes of action on which the plaintiff elects to stand, this principle is in conflict with the general rule that appellate courts “may review the ‘decision and any intermediate ruling, proceeding, order or decision which involves the merits or necessarily affects the judgment or order appealed from or which substantially affects the rights of a party . . . .’ [Citation.] ‘[A]n order sustaining a demurrer ... is generally reviewable on appeal from the final judgment in the action.’ ” (Singhania v. Uttarwar (2006) 136 Cal.App.4th 416, 425 [38 Cal.Rptr.3d 861].) Atlantic Richfield recognized this conflict and, we believe, correctly resolved it in favor of the appealability of causes of action on which the plaintiff elects to stand.

As a practical matter, the question is merely whether a plaintiff who elects to stand on a cause of action to which a demurrer has been sustained with leave to amend must continue to reallege the “dead” cause of action in future amended complaints in order to preserve the right of appeal regarding its validity. We conclude that such pointless reallegation is unnecessary to avoid waiver.

2. The Merits

National may pursue a cause of action for negligence against Cambridge only if, under the circumstances alleged, Cambridge owed a duty of care to National. “Liability for negligent conduct may only be imposed where there is a duty of care owed by the defendant to the plaintiff or to a class of which the plaintiff is a member. [Citation.] . . . Whether a duty is owed is simply a shorthand way of phrasing what is ‘ “the essential question — whether the plaintiff’s interests are entitled to legal protection against the defendant’s' conduct.” ’ ” (J’Aire Corp. v. Gregory (1979) 24 Cal.3d 799, 803 [157 Cal.Rptr. 407, 598 P.2d 60].) Given undisputed facts, whether a duty of care exists is a question of law. (Prouty v. Gores Technology Group (2004) 121 Cal.App.4th 1225, 1233 [18 Cal.Rptr.3d 178].)

A duty may arise through statute, contract, or the relationship of the parties. (J’Aire Corp. v. Gregory, supra, 24 Cal.3d at p. 803.) The factors to be considered in determining whether a duty of care exists based on the relationship between two parties in a commercial context who are not in privity were established in Biakanja v. Irving (1958) 49 Cal.2d 647, 650 [320 P.2d 16] (Biakanja): “The determination whether in a specific case the defendant will be held liable to a third person not in privity is a matter of policy and involves the balancing of various factors, among which are the extent to which the transaction was intended to affect the plaintiff, the foreseeability of harm to him, the degree of certainty that the plaintiff suffered injury, the closeness of the connection between the defendant’s conduct and the injury suffered, the moral blame attached to the defendant’s conduct, and the policy of preventing future harm.” Although the Supreme Court has invoked public policy to override these factors (e.g., Bily v. Arthur Young & Co. (1992) 3 Cal.4th 370, 398 [11 Cal.Rptr.2d 51, 834 P.2d 745] (Bily)), they have never been repudiated and are still regularly applied. (E.g., Summit Financial Holdings, Ltd. v. Continental Lawyers Title Co. (2002) 27 Cal.4th 705, 715 [117 Cal.Rptr.2d 541, 41 P.3d 548]; Richard B. LeVine, Inc. v. Higashi (2005) 131 Cal.App.4th 566, 580-581 [32 Cal.Rptr.3d 244].) Nonetheless, “[Recognition of a duty to manage business affairs so as to prevent purely economic loss to third parties in their financial transactions is the exception, not the rule, in negligence law.” (Quelimane Co. v. Stewart Title Guaranty Co. (1998) 19 Cal.4th 26, 58 [77 Cal.Rptr.2d 709, 960 P.2d 513].)

Application of the Biakanja factors leads us to conclude that this is one of those exceptional cases:

Extent to which the transaction was intended to affect plaintiff'. It is a fair conclusion from the facts alleged that the Cambridge contract was intended to affect National to the same extent it was intended to affect the Bank, at least as to that minority of claims with the possibility of exceeding the self-insurance limit. On its face, the Cambridge contract requires Cambridge to manage all workers’ compensation claims filed against the Bank, regardless of the likely liability. No distinction is made between the handling of claims unlikely to reach the self-insurance limit, those likely to do so, and those that have reached that limit. Nor does the contract dictate any change in handling practices once it becomes apparent that a particular claim might involve National, other than National’s notification. Accordingly, it appears that Cambridge was intended equally to manage claims for which only the Bank was liable and those for which National could or did have liability.

The foreseeability of harm to National'. It was wholly foreseeable that any mishandling of claims by Cambridge would affect National. Cambridge’s job was to manage workers’ compensation claims filed against the Bank. A primary aim undoubtedly was to minimize, consistent with the Bank’s legal obligations to its employees, the amount of those claims. Any mismanagement that inflated the value of a claim had the potential to harm National, since National was required to reimburse the Bank for any claim that exceeded the self-insurance limit. Cambridge, aware of the Bank’s excess insurance, knew that any breach of its duties to the Bank had the potential to trigger payment from National.

The degree of certainty that plaintiff suffered injury: National alleges that it has paid on the Metter claim. Whether that payment has occurred can be ascertained with certainty.

The closeness of the connection between defendant’s conduct and the injury suffered'. The theory of the complaint is that the dramatic expenses associated with Metter’s injury were caused by the surgery and that National would have had no liability had Cambridge exercised due care in following the recommendation of its expert. By approving unnecessary surgery, Cambridge made the Bank, and potentially National, responsible for its consequences. Assuming this theory is proven, Cambridge’s conduct can be found to have been a cause of National’s injury.

The moral blame attached to defendant’s conduct: Negligence in the execution of contractual duties is generally held to be morally blameworthy conduct. (E.g., J’Aire Corp. v. Gregory, supra, 24 Cal.3d at p. 805.)

The policy of preventing future harm: To the extent liability for breach of contract prevents future harm, imposing a duty on Cambridge in these circumstances would further that purpose. Imposing a duty of care toward National would not result in a new or additional duty that did not already exist for Cambridge, since Cambridge already owes a duty to the Bank not to act negligently in its execution of the Cambridge contract. The duty to National would not differ from or supplement this duty; it would merely impose liability to the extent a breach of the duty to the Bank caused injury in excess of the self-insurance limit. In sum, the Biakanja factors weigh in favor of imposing a duty here.

A further consideration is the unique role of the provider of a professional service. In Business to Business Markets, Inc. v. Zurich Specialties London Limited (2005) 135 Cal.App.4th 165 [37 Cal.Rptr.3d 295] (B2B), the court applied Biakanja factors to find a duty, even though the plaintiff and the defendant insurance broker had no direct dealings. (B2B, at pp. 170-171.) In doing so, the court noted that, “[w]hen the third person’s injuries arise from the defendant’s rendering of professional services, several additional factors beyond the Biakanja factors come to mind in our deciding whether to find a duty. One factor is the degree to which clients and third parties ordinarily relinquish control for decisionmaking to the professional. Another is the degree to which the defendant works under professional standards established and maintained by the profession. A third factor is the defendant’s ability to spread its costs by raising its fees or buying liability insurance. And a fourth factor is the expected and customary reliance by clients and others on the skillfulness and expertise of the defendant’s profession.” (Id. at p. 172.) According to its allegations, National relinquished some control in decisionmaking to Cambridge and relied on Cambridge’s skill and expertise. While there are no allegations from which we draw any conclusions about the other two factors, National’s reliance provides further support for the finding of a duty of care.

In arguing against the imposition of a duty, Cambridge relies heavily on Sanchez v. Lindsey Morden Claims Services, Inc. (1999) 72 Cal.App.4th 249 [84 Cal.Rptr.2d 799] (Sanchez). In Sanchez, the plaintiff shipper purchased cargo insurance from a Lloyd’s of London underwriter. After time-sensitive cargo was damaged, Lloyd’s hired the defendant claims adjuster to handle the claim. When settling the claim required three months, the plaintiff’s customer sued the plaintiff for damages associated with the delay. In turn, the plaintiff sued the defendant on a theory of negligence in adjusting the insurance claim. (Id. at p. 251.) The court declined to impose a duty running from the claims adjuster to the insured, citing several public policy concerns, including (1) the adjuster’s role was secondary, since the underwriter, not the claims adjuster, had the ultimate power to resolve the claim; (2) the underwriter’s liability was circumscribed by the policy limits, while the adjuster had no such protection; and (3) imposing the duty would subject the adjuster to conflicting loyalties, since insureds and insurers often disagree about coverage and loss. (Id. at p. 253.) Based on these concerns, the court concluded that the costs of imposing the duty would outweigh the benefits, particularly because the insured already had the same cause of action against the underwriter. (Id. at p. 254.)

While Cambridge argues that “all of the reasons stated in Sanchez for refusing to impose a duty on an adjuster hired by the insurer apply equally to [National’s] attempt to impose just such a duty on Cambridge,” we find no parallel. The primary factor that led the Sanchez court to refuse to find a duty is absent here. In Sanchez, the court was asked to impose a duty running from the insurer’s adjuster to the insured, thereby creating a duty both redundant of the insurer’s existing duty to the insured and in potential conflict with the adjuster’s contractual duty to the insurer. No such duplication is present here because National stands in the Bank’s shoes for claims above the self-insurance limit. The duty running from Cambridge to National is no different in substance from Cambridge’s existing contractual duty to the Bank; it merely covers losses in excess of the self-insured limit. For that reason, there is no threat of a conflict of loyalties. The interests of a primary and excess insurer are not inherently in conflict (The Home Ins. Co. v. Superior Court (2005) 34 Cal.4th 1025, 1036 [22 Cal.Rptr.3d 885, 103 P.3d 283]), and in these circumstances National’s interests are wholly aligned with those of the Bank. Nor is there any redundancy of duty, since the Bank, unlike the insurer in Sanchez, is not itself liable to National for these injuries.

Much of Cambridge’s argument relies on facts outside of, or in conflict with, the allegations of the complaint. For example, Cambridge argues that at all times it was subject to the control of the Bank and that it had no authority to settle or dispose of the Metter claim. These facts may or may not be true, but they cannot be considered on this demurrer, since they fall outside the allegations of the complaint. Cambridge also argues that imposing a duty in favor of National would be in dereliction of the law of agency, which precludes the imposition of a duty running from an agent to a third party regarding acts performed for the principal. As noted, however, National stands in the shoes of the Bank. The duty running to National is, in effect, identical to that running to the Bank.

Cambridge also cites the Supreme Court’s decision in Bily, in which the court refused to find a duty running from the auditor of a public company to investors in the company. The public policy factors cited by the court in Bily, particularly the concern that the auditor’s foreseeable liability would dramatically exceed any fault it might have in causing investor losses, given the auditor’s secondary role in corporate losses (Bily, supra, 3 Cal.4th at p. 398), are simply not present here. Imposing a duty on Cambridge does not expand the liability it would have to the Bank in the absence of excess insurance. Imposing a duty merely removes the artificial limit on Cambridge’s liability that would otherwise exist as a result of National’s excess coverage.

In connection with a discussion of Weseloh Family Ltd. Partnership v. K.L. Wessel Construction Co., Inc. (2004) 125 Cal.App.4th 152 [22 Cal.Rptr.3d 660], Cambridge argues that National’s loss was not caused by Cambridge but by others, such as the doctors who performed the surgery and the Bank’s lawyers, who participated with Cambridge in settling the claim. While it may be true that Cambridge would have had no liability had the Bank’s lawyers refused to acknowledge liability to Metier, we have no reason to find on demurrer that counsel’s actions excused Cambridge’s separate decision to approve unnecessary surgery. For similar reasons, we find the conduct of Metter’s doctors to be irrelevant in a duty analysis. Even assuming (despite the absence of allegations in the complaint) that those doctors were negligent, it was Cambridge’s independent negligence in approving the nonrecom-mended surgery that exposed National to the risk of loss. In wrongfully exposing the Bank to legal liability for the surgery, Cambridge’s negligence may have been a contributing factor in causing National’s loss.

Citing Commercial Union Assurance Companies v. Safeway Stores, Inc. (1980) 26 Cal.3d 912 [164 Cal.Rptr. 709, 610 P.2d 1038], Cambridge argues that it should not have a duty to National because, under Commercial Union, the Bank as insured owes no duty to minimize the liability of its excess carrier, National. (Id. at p. 919.) We find the argument a nonsequitur. Cambridge’s duty to National is derivative of its duty to the Bank, not of the Bank’s duty to National. The fact that the Bank has no duty to its excess carrier does not imply that Cambridge should have no such duty. In any event, Cambridge’s duty here is not to minimize National’s payments but to exercise reasonable care in carrying out its contractual duties.

B. Negligent Misrepresentation

The elements of negligent misrepresentation are “(1) the misrepresentation of a past or existing material fact, (2) without reasonable ground for believing it to be true, (3) with intent to induce another’s reliance on the fact misrepresented, (4) justifiable reliance on the misrepresentation, and (5) resulting damage.” (Apollo Capital Fund LLC v. Roth Capital Partners, LLC (2007) 158 Cal.App.4th 226, 243 [70 Cal.Rptr.3d 199].) While there is some conflict in the case law discussing the precise degree of particularity required in the pleading of a claim for negligent misrepresentation, there is a consensus that the causal elements, particularly the allegations of reliance, must be specifically pleaded. (E.g., Small v. Fritz Companies, Inc. (2003) 30 Cal.4th 167, 184 [132 Cal.Rptr.2d 490, 65 P.3d 1255]; Cadlo v. Owens-Illinois, Inc. (2004) 125 Cal.App.4th 513, 519 [23 Cal.Rptr.3d 1].)

With respect to its negligence and breach of contract causes of action, National’s theory of recovery is that Cambridge, which was responsible for handling the Metier claim, negligently approved his request for back surgery after the medical expert recommended against it. The negligent misrepresentation cause of action, in contrast, alleges that the injury occurred because Cambridge misrepresented to the Bank the opinion of the medical expert. Yet the cause of action does not allege any causal connection between this misrepresentation and the approval of the Metier surgery or, more generally, National’s injury. In particular, there is no allegation that the Bank was even aware of Metter’s request for surgery prior to its approval by Cambridge, let alone that the Bank was in a position to intervene to prevent it. Rather, despite having been granted leave to amend, National pleaded only that “[the Bank] justifiably relied on Defendant Cambridge to accurately report information as to the Metter claim.” The causal connection between that reliance and National’s injury was left entirely unclear. Given the vagueness of National’s pleading, we find no error in the trial court’s dismissal of this cause of action.

C. Breach of Contract

National contends that it should have been permitted to assert a cause of action directly under the Cambridge contract because it is a third party beneficiary of the contract.

Under Civil Code section 1559, a third party can enforce the terms of a contract “made expressly for the benefit of [the] third person.” “Expressly” in this context is interpreted to mean “merely the negative of ‘incidentally.’ ” (Gilbert Financial Corp. v. Steelform Contracting Co. (1978) 82 Cal.App.3d 65, 70 [145 Cal.Rptr. 448].) The contract need not be exclusively for the benefit of the third party in order to permit enforcement, and the third party does not need to be the sole or the primary beneficiary. Further, the third party need not be identified as a beneficiary, or even named, in the contract. (Prouty v. Gores Technology Group, supra, 121 Cal.App.4th at pp. 1232-1233.) “If the terms of the contract necessarily require the promisor to confer a benefit on a third person, then the contract, and hence the parties thereto, contemplate a benefit to the third person. The parties are presumed to intend the consequences of a performance of the contract.” (Johnson v. Holmes Tuttle Lincoln-Merc. (1958) 160 Cal.App.2d 290, 297 [325 P.2d 193].)

On the other hand, “ ‘ “[t]he fact that ... the contract, if carried out to its terms, would inure to the third party’s benefit is insufficient to entitle him or her to demand enforcement.” ’ ” (Landale-Cameron Court, Inc. v. Ahonen (2007) 155 Cal.App.4th 1401, 1411 [66 Cal.Rptr.3d 776].) Rather, “ ‘ “ ‘[i]t must appear to have been the intention of the parties to secure to him personally the benefit of its provisions.’ ” ’ ” (Prouty v. Gores Technology Group, supra, 121 Cal.App.4th at p. 1233.) “ ‘ “Whether a third party is an intended beneficiary or merely an incidental beneficiary to the contract involves construction of the parties’ intent, gleaned from reading the contract as a whole in light of the circumstances under which it was entered. [Citation.]” ’ ” (Landale-Cameron Court, Inc. v. Ahonen, at p. 1411.) Where the facts are undisputed, the issue is one of law. (Prouty v. Gores Technology Group, at p. 1233.)

We conclude that National is a third party beneficiary of the Cambridge contract for two interrelated reasons. First, National will necessarily benefit from the services Cambridge is required to perform for the Bank. As discussed above, one purpose of the Cambridge contract is to minimize, consistent with the Bank’s legal obligations to its employees, the Bank’s liability for workers’ compensation claims. To the extent Cambridge’s performance of its contractual duties reduces the number of claims that exceed the self-insurance threshold and restricts the size of claims exceeding this threshold, it confers a benefit on National. This benefit is not incidental; rather, it flows directly from one of the purposes of the contracting parties, which was to limit the Bank’s liability for workers’ compensation claims. Second, the allegations of the complaint and the text of the Cambridge contract demonstrate that Cambridge was to administer all of the Bank’s workers’ compensation claims, including those that were likely to exceed and had exceeded the self-insurance limit. The complaint alleges that Cambridge administered the entirety of the Bank’s workers’ compensation program, regardless of the nature of the claims, and that it continued to administer claims even after they became the responsibility of National’s insurance. The contract supports this allegation, containing no distinction in the services required of Cambridge based upon the involvement of the excess insurance, other than notification of the excess carrier. In turn, Cambridge is compensated under the contract for handling all claims, again without distinction based on the involvement of excess insurance. This administrative function further demonstrates the intent of the parties to benefit National. Accordingly, National qualifies as a third party beneficiary of the contract and can enforce its provisions directly.

Cambridge argues that National could not be a third party beneficiary of the contract because the contract “could very easily be carried out according to its terms regardless of whether or not [National] had any involvement with the Bank.” While it is true that the contract does not depend upon the Bank’s having an excess insurance carrier, that fact is irrelevant to determination of third party beneficiary status. The contract expressly anticipated that the Bank might have an excess insurance carrier, required Cambridge to notify that carrier, and provided a direct benefit to any excess carrier that was retained.

Cambridge also argues that “on the face of the [Cambridge] contract, there is no intention whatsoever to secure for [National] as the unnamed excess carrier the benefit of its provisions.” Cambridge appears to base this contention largely on the claim that the purpose of the contract “was for Cambridge to adjust claims within the Bank’s self-insured retention.” While Cambridge might be able to support this factual claim with extrinsic evidence at trial, we find no basis for it in the text of the contract or the allegations of the first amended complaint, which expressly allege that Cambridge continued to manage claims after they exceeded that limit. Accordingly, the contention is irrelevant on this review of an order sustaining a demurrer.

D. Subrogation

“ ‘ “Equitable subrogation permits a party who has been required to satisfy a loss created by a third party’s wrongful act to ‘step into the shoes’ of the loser and pursue recovery from the responsible wrongdoer. [Citation.] In the insurance context, the doctrine permits the paying insurer to be placed in the shoes of the insured and to pursue recovery from third parties responsible to the insured for the loss for which the insurer was liable and paid.” [Citation.] Because subrogation rights are purely derivative, an insurer cannot acquire anything by subrogation to which the insured has no right and can claim no right the insured does not have. [Citation.]’ [Citation.] ‘The subrogated insurer is said to “ ‘stand in the shoes’ ” of its insured, because it has no greater rights than the insured and is subject to the same defenses assertable against the insured.’ ” (Great American Ins. Cos. v. Gordon Trucking, Inc. (2008) 165 Cal.App.4th 445, 451 [81 Cal.Rptr.3d 65].)

Equitable subrogation is generally taken to have six elements: “ ‘(1) [t]he insured has suffered a loss for which the party to be charged is liable, either because the latter is a wrongdoer whose act or omission caused the loss or because he is legally responsible to the insured for the loss caused by the wrongdoer; (2) the insurer, in whole or in part, has compensated the insured for the same loss for which the party to be charged is liable; (3) the insured has an existing, assignable cause of action against the party to be charged, which action the insured could have asserted for his own benefit had he not been compensated for his loss by the insurer; (4) the insurer has suffered damages caused by the act or omission upon which the liability of the party to be charged depends; (5) justice requires that the loss should be entirely shifted from the insurer to the party to be charged . . . ; and (6) the insurer’s damages are in a stated sum, usually the amount it has paid to its insured, assuming the payment was not voluntary and was reasonable.’ ” (Fireman’s Fund Ins. Co. v. Maryland Casualty Co. (1994) 21 Cal.App.4th 1586, 1596 [26 Cal.Rptr.2d 762].)

Cambridge asserts that three of the six elements cannot be satisfied here: that the Bank suffered a loss for which Cambridge is liable, that the Bank has an existing assignable cause of action against Cambridge, and that justice requires that the loss should be entirely shifted from the Bank to Cambridge.

As to the first element, a loss for which Cambridge is responsible, Cambridge argues that subrogation is inappropriate because it did not cause Metter’s injuries. The argument fails to take account of the difference between ordinary casualty insurance and workers’ compensation insurance. In the typical situation involving, for example, casualty insurance and property damage, the policy insures against property damage. Subrogation permits the insurer to pursue the insured’s claim against the person whose acts caused damage to the insured property. The present situation differs because National’s excess policy did not insure the Bank against personal injury or property damage. Rather, the policy insured the Bank against liability for personal injury under the workers’ compensation laws.

Once that difference is recognized, it is clear that the situations are parallel. National does not claim that Cambridge is liable because it caused Metter’s personal injury. Rather, National claims that Cambridge’s wrongdoing caused the Bank’s liability for that injury. Liability for the injury, and not the injury itself, is the loss for which Cambridge is allegedly responsible; this is also the loss against which National insured the Bank. Accordingly, application of equitable subrogation is appropriate in these circumstances, even though Cambridge had no hand in Metter’s injuries. (See also Troost v. Estate of DeBoer (1984) 155 Cal.App.3d 289, 295-296 [202 Cal.Rptr. 47] [subrogation lies against person who caused insurer’s loss, even if not the direct cause of the insured injury].)

Cambridge also contends that the third element, an existing, assignable cause of action, is absent because the Cambridge contract contains a clause that precluded either party from assigning its rights and obligations under the contract. Despite the broad language of the assignment clause, it is not certain that it would have prevented the Bank from assigning its claims against Cambridge. While it is true that the clause precludes assignment of all “rights” of the parties, such general assignment clauses have been held not to preclude assignment of certain causes of action. Notably, in Trubowitch v. Riverbank Canning Co. (1947) 30 Cal.2d 335 [182 P.2d 182] (Trubowitch), the Supreme Court concluded that a general assignment clause does not preclude the assignment of a cause of action for breach of contract. “ ‘Where a bilateral contract in terms forbids assignment, it becomes a matter of interpretation as to what is meant. Is it intended that a duty under the contract shall not be delegated, or is it intended that a right shall not be assigned, or are both prohibitions intended?’ [Citation.] Even if it is assumed that the prohibition against assignments relates to rights rather than duties, it does not necessarily apply to all claims under the contract or to all transfers of the contract rights. It is established that in the absence of language to the contrary in the contract, a provision against assignment does not govern claims for money due or claims for money damages for nonperformance . . . .” (Id. at p. 344.) Because the cause of action to which National is subrogated is effectively for breach of contract, there is a substantial question whether the assignment clause would prevent assignment of the subrogated cause of action.

We need not resolve that issue, however, because the right of equitable subrogation does not depend upon an express assignment. Rather, it is, in effect, an assignment by operation of law. (Patent Scaffolding Co. v. William Simpson Constr. Co. (1967) 256 Cal.App.2d 506, 509-510 [64 Cal.Rptr. 187].) When the requirements for equitable subrogation are satisfied, actual assignment of the cause of action from the insured to the insurer is unnecessary. (Ibid.) The subrogee has a right to subrogation that is independent of his or her contractual rights.

In California, general assignment clauses do not preclude assignments that occur by operation of law. “California courts have long recognized the distinction between voluntary assignment of contract rights by one party and involuntary assignments by operation of law.” (Miller v. San Francisco Newspaper Agency (1985) 164 Cal.App.3d 315, 317 [210 Cal.Rptr. 159].) The rule traces at least to Farnum v. Hefner (1889) 79 Cal. 575 [21 P. 955], in which the Supreme Court held that the transfer of a lease by execution sale did not cause a forfeit of the leasehold under an assignment clause. As the court noted, “[t]he covenant in the lease is the ordinary kind, which applies, it seems to us, to a voluntary, and not an involuntary, assignment of the lease. It is firmly established by authority that under such a covenant an involuntary assignment by sale under execution — bankruptcy and the like — is not a violation of the covenant, and does not work a forfeiture.” (Id. at p. 580.) Citing Farnum, the Supreme Court held in California Packing Corp. v. Lopez (1929) 207 Cal. 600 [279 P. 664], that a non-personal-services contract containing a clause forbidding assignment survived the second party’s death, noting that “[t]he prohibitory clause against assignment . . . forbids only voluntary assignment by the parties; it is not violated by an involuntary assignment by operation of law . . . .” (Id. at p. 603.) Trubowitch summarized this rule as holding that “a provision against assignment in a contract or lease does not preclude a transfer of the rights thereunder by operation of law . . . .” (Trubowitch, supra, 30 Cal.2d at p. 344.) Because subrogation is effectively an assignment by operation of law, the general assignment clause cannot be construed to preclude National’s equitable subrogation rights, assuming the other requirements for the doctrine are met.

Cambridge relies on Fifield Manor v. Finston (1960) 54 Cal.2d 632 [7 Cal.Rptr. 377, 354 P.2d 1073] (Fifield Manor), in which the plaintiff was a “life-care” organization that, under a contract containing a subrogation clause, agreed to provide medical care to a decedent. The decedent was hit by a car driven by the defendant, and the plaintiff sought to recover the cost of the care it provided the decedent under a direct theory of recovery and through subrogation of the decedent’s claim. (Id. at p. 634.) California common law held that tort causes of action for damages relating to personal injury did not survive the death of the injured person. A provision of the Civil Code, long since repealed, also precluded the assignment of such causes of action. The question posed in Fifield Manor was, therefore, “whether a third party may be subrogated either by the operation of equitable principles ... or by contract with the injured party ... to any part of a cause of action for injury to the person in view of the fact that under our law no such cause of action may be assigned.” (Id. at p. 639.) The court reasoned that “[w]hile subrogation and assignment have certain technical differences, each operates to transfer from one person to another a cause of action against a third, and the reasons of policy which make certain causes of action nonassignable would seem to operate as forcefully against the transfer of such causes of action by subrogation. . . . [¶] . . . Whether the transfer be technically called assignment or subrogation or equitable assignment or assignment by operation of law its ultimate effect is the same, to pass the title to a cause of action from one person to another.” (Id. at p. 640.) Because of this similarity of effect, the court concluded, the Legislature’s preclusion of assignment equally precluded subrogation.

Contrary to Cambridge’s suggestion, Fifield Manor is not controlling, since assignment of the cause of action in Fifield Manor was precluded by law, not by private contract. On the contrary, Fifield Manor demonstrates the primacy of legal rules over contractual provisions in this context. Although the life-care contract contained a clause permitting subrogation, the court held that the statutory ban on assignment of causes of action of the deceased precluded enforcement of the subrogation clause. By analogy, any contractual restraint on assignment would be disregarded in favor of National’s equitable right to subrogation.

Cambridge’s final argument, that the equities do not favor imposing liability on it, relies largely on facts and conclusions outside the allegations of the complaint. National has alleged, at a minimum, that Cambridge negligently authorized Metter’s surgery against the recommendation of its medical consultant. Because Cambridge’s contractual duty was to minimize or prevent workers’ compensation liability, this failure was a direct cause of the Bank’s loss, rather than an indirect cause. (See State Farm General Ins. Co. v. Wells Fargo Bank, N.A. (2006) 143 Cal.App.4th 1098, 1112 [49 Cal.Rptr.3d 785]; Fireman’s Fund Ins. Co. v. Morse Signal Devices (1984) 151 Cal.App.3d 681, 687 [198 Cal.Rptr. 756].) Assuming that allegation to be true, as we must, the equities favor imposing liability for the consequences of that error on Cambridge rather than National.

III. DISPOSITION

The judgment of the trial court is reversed and remanded for further proceedings consistent with this decision. National shall recover its costs on appeal.

Marchiano, P. J., and Flinn, J., concurred.

Respondent’s petition for review by the Supreme Court was denied May 13, 2009, S171445.

Chin, J., did not participate therein. 
      
       The complaint also alleged a series of claims against the outside law firm that handled the Metter claim for Cambridge. Because the fate of those claims is not before us on this appeal, we will disregard them.
     
      
       Cambridge distinguishes Atlantic Richfield as involving a demurrer to fewer than all causes of action. The court’s reasoning, however, did not rest on this distinction, and there is no policy reason for restricting appealability in this manner.
     
      
       We emphasize that this determination of duty is made on the basis of the allegations in the complaint. The facts proven at trial may, of course, be different than those alleged and could lead to a different conclusion regarding the existence of a duty.
     
      
       Further, they are not arguments against the imposition of a duty, but rather against liability, since they seek to avoid causal responsibility for the loss.
     
      
       The complaint also alleges that outside counsel improperly acknowledged coverage for Metter’s claim. It is not clear to us whether Cambridge is alleged to have legal responsibility for this decision. While the negligence cause of action alleges that Cambridge acted negligently in “improper management of defense counsel,” there is no allegation that Cambridge controlled outside counsel or was otherwise responsible for counsel’s conduct in these circumstances.
     
      
       Although the Bank was not liable for amounts above $250,000, it had an incentive to minimize these claims. The higher the number and amount of such claims, the more expensive its excess insurance was likely to be.
     
      
       Cambridge also asserts that permitting National to enforce the contract would create conflicting obligations and permit National “to intermeddle into a contract relationship to which it was a stranger.” For the reasons discussed in connection with the negligence claim, we see no conflicting obligations that would arise from permitting National to enforce the contract, nor would that enforcement constitute improper meddling.
     
      
       This result is consistent with the policy underlying the law of equitable subrogation. Because equitable subrogation is available by operation of law, the Bank could not have frustrated National’s acquisition of this right by refusing to assign its causes of action against Cambridge. Construing the general assignment clause in the Cambridge contract to prevent equitable subrogation would conflict directly with this result, since it would allow the contract between Cambridge and the Bank to frustrate National’s rights in equity.
     