Melton, Presiding Justice.In this matter, Timothy F. Coen filed suit against CDC Software Corporation, Aptean, Inc. (CDC’s successor in interest), and four individuals acting as either a board member or general counsel for CDC, for defamation, false light and disclosure of private facts, intentional infliction of emotional distress, and attorney fees. The trial court dismissed Coen’s action based on both res judicata and failure to state a claim, referencing an earlier lawsuit filed by Coen for breach of his employment contract with CDC. In an unpublished opinion, the Court of Appeals affirmed, holding:Coen contends there was no identity of subject matter because the prior contract action pertained to the breach of an employment contract providing for severance pay regardless of the cause of termination, whereas the instant tort case arose out of the contents of [an] SEC Form 6-K [alleged to have been defamatory]. However both actions arose from the underlying circumstances surrounding the termination of Coen’s employment with the CDC. As such, the trial court properly concluded the two actions concerned the same subject matter. See, e.g., Doman v. Banderas, 231 Ga. App. 229, 232 (1) (499 SE2d 98) (1998).Thereafter, we granted Coen’s petition for certiorari and posed the following question: Did the Court of Appeals err in its formulation and application of the doctrine of res judicata? For the reasons set forth below, we find that the Court of Appeals did err in its formulation, and, accordingly, we reverse the Court of Appeals’ opinion and remand this case for the Court of Appeals to consider the trial court’s alternative holding. Under the proper standard, three prerequisites must be satisfied before res judicata applies- (1) identity of the cause of action, (2) identity of the parties or their privies, and (3) previous adjudication on the merits by a court of competent jurisdiction. See, e.g., Morrison v. Morrison, 284 Ga. 112, 116 (3) (663 SE2d 714) (2008); Karan, Inc. v. Auto-Owners Ins. Co., 280 Ga. 545 (629 SE2d 260) (2006). “Cause of action,” in turn, is “the entire set of facts which give rise to an enforceable claim.” Morrison, supra, 284 Ga. At 116 (3). In considering the “entire set of facts,” we focus on the “wrong” that is asserted. See City of Columbus v. Anglin, 120 Ga. 785, 791 (48 SE 318) (1904) (“Different facts may be alleged, separately or cumulatively, to show the same wrong; and the number and variety of the facts alleged will not make more than one cause of action, so long as but one wrong is shown.”).1. The underlying facts of this matter are generally undisputed. In May 2012, Coen filed a complaint against CDC alleging causes of action for breach of contract, breach of the duty of good faith and fair dealing, attorney fees, and contractual indemnification. In that contract action, Coen alleged that, after CDC fired him, CDC did not provide him with a severance package mandated by the contract.[1] Coen asserted no claims based in tort in the contract action. On April 5, 2014, in response to Coen’s motion for partial summary judgment, the trial court determined that Coen’s employment contract with CDC required that Coen be paid the severance package which he had identified. On July 28, 2014, a final judgment was entered in favor of Coen, and, on August 19, 2014, the court awarded Coen attorney fees under OCGA § 9-15-14 (a).On March 6, 2013, Coen filed a second lawsuit against CDC, Aptean, and four individual CDC executives in federal court. That lawsuit was dismissed for lack of subject matter jurisdiction. On March 24, 2016, Coen re-filed the tort action in the Superior Court of Fulton County. In this second lawsuit, Coen claimed that he had been harmed by malicious and untrue statements made by CDC and its management in a March 8, 2012 Securities and Exchange Commission Form 6-K Report, which stated that CDC placed Coen on administrative leave “pending the completion and results of an internal investigation related to allegations of unethical conduct, violations of Company policy and protocol and attempts to influence the content and consideration of an internal audit report.” Coen maintained that the statements constituted defamation per se. Coen asserted only tort causes of action, seeking a recovery for defamation, false light invasion of privacy and public disclosure of private facts, intentional infliction of emotional distress, and attorney fees.[2] The trial court dismissed this tort action based on res judicata and failure to state a claim. Coen appealed to the Court of Appeals, and the Court of Appeals affirmed on the basis of res judicata, but did not address the alternative ruling of failure to state a claim.2. Res judicata in Georgia began as a common law rule, and we have held that OCGA § 9-12-40 is a codification of Georgia’s basic common law rule of res judicata. See, e.g., Crowe v. Elder, 290 Ga. 686, 687 (723 SE2d 428) (2012). OCGA § 9-12-40 provides:A judgment of a court of competent jurisdiction shall be conclusive between the same parties and their privies as to all matters put in issue or which under the rules of law might have been put in issue in the cause wherein the judgment was rendered until the judgment is reversed or set aside.As our caselaw has developed over the years, however, terminology we have employed appears, at first glance, to have created two lines of opinions- one line requiring an identity of “subject matter” along with the other prerequisites and one requiring an identity of “cause of action.”[3] This tension is evident in Lawson v. Watkins, 261 Ga. 147, 149 (2) (401 SE2d 719) (1991), where we observed that the language used in the [res judicata] statute was drawn from Watkins v. Lawton, 69 Ga. 671 (1882), where this court held: A judgment is conclusive as to all matters put in issue, or which, under the rules of law, might have been put in issue, in a former suit between the same parties concerning the same subject-matter in a court of competent jurisdiction.(Emphasis in original.) In 1882, the Watkins court observed thatthe rule is too well established that an adjudication of the same subject-matter in issue in a former suit between the same parties by a court of competent jurisdiction should be an end of the litigation. See Code of 1882, section 2899 [T]he rule is that judgments are conclusive as to all matters put in issue, or which, under the rules of law, might have been put in issue.(Citations and punctuation omitted.) Id. at 674-675. Based on this, we stated over a century later that “one must assert all claims for relief concerning the same subject matter in one lawsuit and any claims for relief concerning that same subject matter which are not raised will be res judicata pursuant to OCGA § 9-12-40.” (Emphasis in original.) Lawson, supra at 149 (2).[4]The dissent in Lawson, however, questioned the terminology used in the majority’s interpretation of OCGA § 9-12-40. The dissent pointed out thatthe legislature did not incorporate the holding of Watkins, supra, into statute. The statute does not include the critical qualification of Watkins: “concerning the same subject matter.” The Code of Georgia of 1895 provided:§ 3742. Judgment conclusive of what. A judgment of a court of competent jurisdiction is conclusive between the same parties and their privies as to all matters put in issue, or which under the rules of law might have been put in issue in the cause wherein the judgment was rendered.[FN 4: This statute was codified within an article concerning "pendency of another action and former recovery"; a different statute appeared in an article concerning the "effect and lien of judgments." In the Code of Georgia of 1933 this statute was codified in its present form (that is, with the addition of the phrase "until such judgment shall be reversed or set aside") and was titled "Conclusiveness of judgments." In OCGA § 9-12-40, it is titled "Judgment conclusive between which persons and on what issues."] From 1895 until this day, this statute has been re-enacted, without reference to any language limiting its application to “the same subject matter.”(Emphasis in original.) Id. at 152 (4) (b) (Weltner, J., dissenting.).[5] So, in Lawson, alone, there is some confusion regarding this Court’s use of the term “subject matter” in applying the law of res judicata. The majority contended that the “subject matter” terminology was an appropriate standard for res judicata jurisprudence, and the dissent, though ultimately applying a broad “subject matter” test, itself, contended that “subject matter” terminology was not appropriate- at least as far back as 1895.This confusion becomes exacerbated by what appears to be a second line of cases that, rather than requiring an identity of “subject matter,” require an identity of “cause of action.” A case illustrative of this approach is Karan, Inc. v. Auto-Owners Ins. Co., supra. There, we set forth the elements of res judicata as follows:The doctrine of res judicata prevents the re-litigation of all claims which have already been adjudicated, or which could have been adjudicated, between identical parties or their privies in identical causes of action Three prerequisites must be satisfied before res judicata applies- (1) identity of the cause of action, (2) identity of the parties or their privies, and (3) previous adjudication on the merits by a court of competent jurisdiction.(Citation omitted.) Id. at 546.[6] In cases employing “cause of action” terminology, we have explained that a factual linkage in the subject matter of two different lawsuits does not mean that the second lawsuit will automatically be barred by OCGA § 9-12-40. Gunby v. Simon, 277 Ga. 698, 700 (594 SE2d 342) (2004). “For [res judicata] to act as a bar, ‘the cause of action in each suit must be identical.’ [Cits.]” Haley v. Regions Bank, 277 Ga. 85, 91 (2) (586 SE2d 633) (2003). See also Norris v. Atlanta & West Point R. Co., 254 Ga. 684, 685 (333 SE2d 835) (1985); Waldroup v. Greene County Hosp. Auth., 265 Ga. 864, 866 (1) (463 SE2d 5) (1995).In these cases, we have defined “cause of action” as beingthe entire set of facts which give rise to an enforceable claim. Where . . . some of the operative facts necessary to the causes of action are different in the two cases, the later suit is not upon the same cause [of action] as the former, although the subject matter may be the same, and even though the causes [of action] arose out of the same transaction.(Citations and punctuation omitted.) Morrison, supra, 284 Ga. at 116 (3). See also Life & Cas. Ins. Co. v. Webb, 112 Ga. App. 344, 347-348 (145 SE2d 63) (1965); Linder v. Rowland, 122 Ga. 425 (50 SE 124) (1905).When one takes a closer look at the outcomes of our cases, however, it appears that, although we have occasionally been imprecise and inconsistent with the terms “subject matter” and “cause of action,” we have actually been looking to the “entire set of facts which give rise to an enforceable claim” to determine whether res judicata has been triggered.[7]For example, in Lawson, supra, the majority relied on what it called an “identity of subject matter” test for the application of res judicata. There were two lawsuits in that case, the first regarding the repayment of debts and the second regarding ownership of a racetrack. In the first action,Watkins sued Lawson seeking repayment of various loans that Watkins had made to Lawson during their business relationship. Lawson filed a counterclaim seeking to have a promissory note reformed so as to show Watkins as primarily liable on the note with Lawson only secondarily liable as a guarantor. The counterclaim also alleged that the racetrack, which was part of the collateral securing the note, belonged to Lawson and sought to have the holder of the note, a third party defendant, enjoined from foreclosing on the racetrack until the holder had first gone after other collateral which was actually titled in Watkins’ name.Lawson, supra, 261 Ga. at 147. At the trial of this lawsuit, there was a determination that title to the racetrack would not be litigated, as the issue had not been raised in the pleadings, and the judgment in the first action reformed the promissory note and enjoined the holder of the note from foreclosing on the racetrack until other collateral belonging to Watkins, which also secured the note, had been pursued.In a second lawsuit, Watkins directly raised the issue of title to the racetrack, contending that “he conveyed [the racetrack] to Lawson, appellant, in trust in order to quell a controversy concerning operation of the racetrack. Watkins contend[ed] that, at the time of the conveyance, Lawson agreed to reconvey the racetrack to Watkins or to anyone whom Watkins might designate.” Id. Based on these facts, we determined that the second lawsuit was not barred by res judicata, explaining in relevant part:Here, the parties to the two actions are identical, however, the subject matter of the actions is not. The first lawsuit dealt with a series of debts owed Watkins by Lawson. The present lawsuit deals with title to a racetrack. The racetrack was involved in the first lawsuit only to the extent that Lawson’s counterclaim dealt with reformation of a promissory note for which the racetrack property served as collateral. The racetrack was not the subject matter of the complaint in the first action, nor was it the subject matter of the counterclaim in that action. Because the subject matter of the two actions was not identical, the trial court in the present action correctly denied Lawson’s motion to dismiss as to the res judicata issue.Id. at 148 (1).Despite the fact that this holding is set forth using the “subject matter” terminology, it actually represents a narrower consideration of the operative facts required for the claims in the first and second suit. In the first suit, the operative facts required to state a viable claim for enforcement of debts did not encompass the entire set of operative facts required to state a claim for title to the racetrack in question. Therefore, res judicata did not apply, and it is evident that, contrary to the arguments of CDC in this case, we were not employing a broad, wide-ranging subject matter test.[8]So, ultimately, there are not, in fact, two separate lines of res judicata jurisprudence in our law. There has, however, been an inconsistency in terminology that we now clear up. Specifically, three prerequisites must be satisfied before res judicata applies- (1) identity of the cause of action, (2) identity of the parties or their privies, and (3) previous adjudication on the merits by a court of competent jurisdiction. See, e.g., Morrison, supra; Karan, supra. “Cause of action,” in turn, is “the entire set of facts which give rise to an enforceable claim.” Morrison, supra, with special attention given to the “wrong” alleged. Anglin, supra.[9]All of that being said, the standard for res judicata applied by the Court of Appeals in the present case is erroneous, irrespective of the terminology employed. Without considering the “entire set of facts” required for each of Coen’s claims in his two lawsuits, the Court of Appeals found that res judicata barred the second lawsuit because “both actions arose from the underlying circumstances surrounding the termination of Coen’s employment with the CDC.” This represents an application of the incorrect term “subject matter” in its broadest sense. As discussed above, this standard is both unsupported and incompatible with Georgia’s rules of permissive joinder.[10] Although both of Coen’s lawsuits are related to the termination of his employment with CDC, the two suits are based on different wrongs and different sets of operative facts; accordingly, the suits contained different causes of action and the second suit is not barred by res judicata. In his first suit, Coen raised contractual claims against CDC for failing to pay amounts due under his employment contract, and the entire set of facts necessary to support those claims centered on whether CDC breached any terms of that contract. In the first suit, then, the alleged wrong was CDC’s failure to pay amounts contractually owed. In the present suit, the entire set of facts giving rise to Coen’s claims of defamation, false light and disclosure of private facts, intentional infliction of emotional distress, and attorney fees center around CDC’s allegedly defamatory statements made in a SEC Form 6-K filing. The wrong in the present suit is CDC’s allegedly defamatory statements. Although the CDC’s SEC filing preceded Coen’s termination, that filing was not part of the wrong that gave rise to Coen’s contractual claims against CDC. Because the cause of action in the first suit is different than the cause of action in the second suit, the second suit is not barred by res judicata. We do not reach the merits of the trial court’s dismissal of Coen’s action on the alternative grounds of failure to state a claim, which the Court of Appeals has not yet considered and must consider on remand. Judgment reversed and case remanded with direction. All the Justices concur.