
512 N.W.2d 119 (1994)
PORTA-MIX CONCRETE, INC., Appellant,
v.
FIRST INSURANCE EAST GRAND FORKS, Western Casualty & Surety Company, a Kansas corporation, Respondents.
No. C8-93-1641.
Court of Appeals of Minnesota.
February 22, 1994.
Review Denied April 28, 1994.
*120 Kenneth F. Johannson, Dickel Johannson Taylor Rust & Tye, Crookston, for Porta-Mix Concrete, Inc.
David S. Maring, Fargo, ND, for First Ins. East Grand Forks.
Thomas S. McEachron, Mahoney Dougherty & Mahoney, Minneapolis, for Western Cas. & Sur. Co.
Considered and decided by DAVIES, P.J., and RANDALL and KALITOWSKI, JJ.

OPINION
RANDALL, Judge.
Appellant Porta-Mix Concrete, Inc., commenced this action alleging respondents were negligent in failing to obtain and provide coverage for appellant for claims arising out of the construction of a building located in Grand Forks, North Dakota. Appellant's complaint also alleges that it is entitled to insurance coverage under the doctrine of reasonable expectations. The trial court concluded this action is barred by res judicata based upon a declaratory judgment action previously brought by respondent Great Western Casualty Company against Porta-Mix. In the prior action, the trial court determined that Western had no duty to defend or indemnify Porta-Mix on claims arising out of the construction. We affirm in part and reverse in part.

FACTS
In 1985, Tom Senger, an insurance agent for respondent First Insurance East Grand Forks (First Insurance), sold a comprehensive general liability insurance policy to appellant Porta-Mix Concrete, Inc. The general liability policy was provided by respondent Western Casualty & Surety Company (Western). The policy was for the time period of August 5, 1985, through August 5, 1986. Vigen Construction Company (Vigen) contracted for the construction of a building for Minn-Dak Seeds, Ltd., in North Dakota. Porta-Mix subsequently contracted with Vigen to provide the concrete for the building. The concrete was mixed in Minnesota and delivered to the North Dakota job site. It is undisputed that the concrete did not meet specifications because Porta-Mix used a mislabeled sheet for the mix.
Minn-Dak commenced an action in North Dakota district court against Vigen and its bonding company, Great American Insurance Company. (North Dakota action). Minn-Dak alleged breach of contract by constructing a building with concrete slip form walls below specified strength. Vigen impleaded Porta-Mix as a third-party defendant seeking contribution and indemnity. Vigen's third party claim against Porta-Mix was based on theories of negligence and breach of contract. Western retained counsel to defend Porta-Mix pursuant to a reservation of rights to deny coverage and defense. Western also commenced a declaratory action in Minnesota district court, seeking a determination that Western had no duty to defend or indemnify Porta-Mix, its insured, in the North Dakota action.
*121 After a court trial on the declaratory action, the trial court determined that (1) Minnesota law applied to determine the rights and obligations of the parties under the policy, and (2) Western had no duty to defend or indemnify Porta-Mix in the North Dakota action. In applying Minnesota law, the trial court determined that the general comprehensive liability policy did not cover the claims because they arose out of the insured's own defective product, namely, defective concrete. The trial court also determined that the doctrine of reasonable expectations did not apply to the facts of this case.
Porta-Mix appealed on the basis that North Dakota law, rather than Minnesota law, should apply. By unpublished opinion filed on December 13, 1988, this court affirmed. See Western Casualty & Sur. Co. v. Porta-Mix Concrete, Inc., No. C1-88-1370, 1988 WL 131259 (Minn.App. Dec. 13, 1988).
Minn-Dak obtained an arbitration award against Vigen. Vigen, in turn, obtained a confession of judgment from Porta-Mix on its third party claim in the amount of $318,227.72.
Appellant Porta-Mix commenced this action against respondents First Insurance and Great Western on January 16, 1990. In its complaint, appellant alleges (1) respondents negligently failed to obtain and provide coverage to Porta-Mix for the risk of deficient and defective concrete, and (2) Porta-Mix could have reasonably expected that respondents would have provided coverage for Porta-Mix's products and completed operations.
The trial court granted summary judgment in favor of respondents, concluding the action is barred by the doctrine of res judicata based on the prior declaratory judgment action brought by Western against Porta-Mix.

ISSUE
Are all of appellant's claims barred by the doctrine of res judicata based upon the prior declaratory judgment action brought by Western against Porta-Mix?

ANALYSIS
On appeal from summary judgment, the function of this court is to determine whether genuine issues of material fact exist and whether the trial court erred in its application of the law. Offerdahl v. University of Minn. Hosps. & Clinics, 426 N.W.2d 425, 426 (1988).
The doctrine of res judicata operates to prevent the relitigation of issues already determined in a prior action. Beutz v. A.O. Smith Harvestore Prods., 431 N.W.2d 528, 531 (Minn.1988) (citing Shimp v. Sederstrom, 305 Minn. 267, 270, 233 N.W.2d 292, 294 (1975)). Litigation of a claim may be barred under the following rule:
A judgment on the merits constitutes an absolute bar to a second suit for the same cause of action, and is conclusive between parties and privities, not only as to every matter which was actually litigated, but also as to every matter which might have been litigated, therein.
Id. (quoting The Youngstown Mines Corp. v. Prout, 266 Minn. 450, 466, 124 N.W.2d 328, 340 (1963)). There are three elements to res judicata: (1) a final judgment on the merits; (2) identical parties or parties in privity; and (3) a second suit involving the same cause of action. Myers v. Price 463 N.W.2d 773, 776 (Minn.App.1990), pet. for rev. denied (Minn. Feb. 4, 1991).
The doctrine of claims preclusion [collateral estoppel], an extension of res judicata law, forbids a party from asserting in a second lawsuit claims that could have been asserted in the first lawsuit. The doctrine will preclude in the second lawsuit claims that could have been asserted in the first lawsuit but were not, provided the plaintiff actually could have asserted those claims in the first suit.
Johansen v. Production Credit Ass'n, 378 N.W.2d 59, 61-62 (Minn.App.1985) (citations omitted).

Final judgment on the merits.
The judgment arising out of the declaratory action operates as an adjudication upon the merits as to every matter actually litigated and "also as to every matter which might have been litigated." Mattsen v. Packman, 358 N.W.2d 48, 49 (Minn.1984) (quoting Youngstown, 266 Minn. at 466, 124 *122 N.W.2d at 340); see also Howe v. Nelson, 271 Minn. 296, 302-03, 135 N.W.2d 687, 692 (1965) (a declaratory judgment is a final decision on the merits which can have res judicata effect).
In this case, Western brought a declaratory judgment action prior to this present action. The trial court determined, pursuant to declaratory judgment, that (1) Minnesota law applied to determine the rights and obligations of the parties under the policy, and (2) Western had no duty to defend or indemnify Porta-Mix, its insured, in the North Dakota action. In applying Minnesota law, the trial court determined that the general comprehensive liability policy did not cover the claims because they arose out of the insured's own defective product, namely, defective concrete. The trial court also specifically determined that the doctrine of reasonable expectations did not apply to the facts of this case. By unpublished opinion filed on December 13, 1988, this court affirmed. See Western Casualty & Sur. Co. v. Porta-Mix Concrete, Inc., No. C1-88-1370, 1988 WL 131259 (Minn.App. Dec. 13, 1988).
The declaratory judgment, which was entered on April 22, 1988, and subsequently affirmed by this court, is a final judgment on the merits, satisfying the first element of res judicata.

Same parties and privies.
For the purposes of the doctrine of res judicata,
"Privies" to a judgment are those who are so connected with the parties in estate or in blood or in law as to be identified with them in interest, and consequently to be affected with them by the litigation.
Hentschel v. Smith, 278 Minn. 86, 95, 153 N.W.2d 199, 206 (1967). "Privity depends upon the relation of the parties to the subject matter." Id.
Porta-Mix was insured by Western under a comprehensive general liability policy which was obtained through First Insurance, an insurance agency[1]. This action was brought by Porta-Mix against respondents Western and First Insurance. Although Porta-Mix and Western were parties to the prior declaratory action, First Insurance was not a named party to the prior action.
The trial court concluded that First Insurance was a party in privity with Western and Porta-Mix, named parties to the declaratory action. We agree. As the trial court noted, Western was, in essence, representing the interests of First Insurance in the declaratory action.
Furthermore, Minn.Stat. § 60K.15 (1992) provides that an insurance agent acts as the agent of the insurer, in this case Western, rather than the insured, Porta-Mix. Although section 60K.15 was not enacted until 1992, well after this action was commenced and after the policy at issue in this case was purchased, we find it instructive.
Appellant makes a general reference to the case of Twaiten v. Tanke, 466 N.W.2d 31 (Minn.App.1991), pet. for rev. denied (Minn. Apr. 29, 1991) in support of its argument that First Insurance is not a party in privity. Twaiten, however, does not address the issue presented here. That case holds that an insured need not sue an insurer in order to recover on a claim against a broker or agent, which is not determinative of the issue before us. Id. at 34-35.

Same cause of action.
Two causes of action are the same when they each involve the same factual circumstances or when the same evidence would support both judgments. Myers, 463 N.W.2d at 777. A change in theory of liability cannot be used to avoid the application of res judicata. Nitz v. Nitz, 456 N.W.2d 450, 452 (Minn.App.1990).
When a given state of facts is susceptible of alternative interpretations and analysis, plaintiff must seek and exhaust all alternative grounds or theories for recovery in one action.
Sundberg v. Abbott, 423 N.W.2d 686, 690 (Minn.App.1988) (emphasis in original), pet. for rev. denied (Minn. June 29, 1988).
*123 Porta-Mix's answer in the prior declaratory judgment action brought by Western alleged, in part, that the policy issued by Western provided coverage for Porta-Mix for the third party claim brought against it by Vigen. Porta-Mix also alleged, in part, that even if it did not provide such coverage, Porta-Mix could have reasonably expected such coverage under the policy and, under the doctrine of reasonable expectations, Porta-Mix was entitled to coverage.
In the prior action, the trial court determined that the standard comprehensive general liability policy excluded coverage for Porta-Mix's own defective products. The trial court also determined, in the prior action, that "there is no basis for finding that Porta-Mix could reasonably expect coverage under these circumstances." In support of its conclusion, the trial court specifically found (in the prior action) that the language of the policy involved, which is a general liability policy excluding coverage for the insured's own products,[2] is not ambiguous.
In concluding the two actions involve the same cause of action, the trial court stated:
[I]n the declaratory judgment action Porta-Mix alleged at least two alternative theories in its defense (coverage and reasonable expectation of coverage). In addition, the court notes that the two suits arose out of the same set of factual circumstances.
We conclude that one of Porta-Mix's theories of liability asserted in this action has already been alleged, litigated, and decided, namely, the doctrine of reasonable expectations. Thus, all of the elements of res judicata are present regarding the doctrine of reasonable expectations and that theory may not be relitigated.
We do not agree with the trial court that a theory of negligence was litigated in the prior action. Appellant's claim for negligence is a separate and distinct claim from its prior claim for coverage pursuant to the doctrine of reasonable expectations. We acknowledge the trial court's finding in the prior action that the agent for First Insurance had informed appellant that the policy did not provide coverage for appellant's defective products. However, this finding addresses a theory of coverage under the doctrine of reasonable expectations. This finding does not necessarily preclude a negligence cause of action by Porta-Mix for failure to discover or anticipate Porta-Mix's insurance needs. A negligence cause of action would involve the litigation of different facts than are involved in determining whether coverage exists. For example, it has not been determined whether Porta-Mix and First Insurance had a "special relationship" which could heighten the duty owed by First Insurance. See, e.g., Johnson v. Urie, 405 N.W.2d 887, 889 (Minn.1987) (a duty to "offer, advise or furnish insurance coverage" may arise from the "circumstances of the transaction and the relationship of the agent vis-a-vis the insured"); Atwater Creamery Co. v. Western Nat'l Mut. Ins. Co., 366 N.W.2d 271, 279 (Minn.1985) (facts may give rise to a duty to offer additional coverage). Our decision makes no comment on the strength, if any, of appellant's negligence claim. We merely find that it is still open.

DECISION
The trial court properly concluded that appellant's claim for coverage based on the doctrine of reasonable expectations is barred by res judicata. We hold, however, that appellant's claim alleging respondents were negligent in failing to obtain and provide coverage for appellant is not so barred.
Affirmed in part, reversed in part.
NOTES
[1]  The trial court appears to have made an inadvertent mistake where it stated that Porta-Mix was insured by First Insurance by a policy obtained by Western.
[2]  See Bor-Son Bldg. Corp. v. Employers Commercial Union Ins. Co., 323 N.W.2d 58 (Minn.1982) for an analysis of comprehensive general liability policies in relation to construction projects.
