Tony Johnson and Mike Nichols, d/b/a J & N Holdings, Appellants filed an action on April 29, 2008 seeking recovery for damages from several defendants, including RLI Insurance Company Appellee, for violations of the Georgia RICO Act, bad faith, fraud, negligence, breach of legal duty, breach of contract, and punitive damages. On June 26, 2008, Appellee filed a motion to dismiss pursuant to OCGA § 9-11-12 b 6. Both parties presented evidence to the court, including responses to interrogatories and affidavits. An oral hearing was held on January 8, 2009. On March 19, 2009, the trial court entered an order entitled “Order Granting RLI’s Motion to Dismiss” and stated the following: After hearing argument of counsel, considering the Plaintiffs’ responses to Grange Insurance Company’s Request for Admissions, Plaintiffs’ response to Defendant RLI Insurance Company’s Motion to Dismiss, Plaintiffs’ answers to Gray Thacker’s Interrogatories, the pleadings and the entire court record, . . . the motion to Dismiss . . . is hereby GRANTED. Appellants appealed from this order directly to the Court of Appeals. Citing Johnson v. Hosp. Corp. of America , 192 Ga. App. 628, 629 385 SE2d 731 1989, the Court of Appeals, treating the trial court’s order as a motion to dismiss, dismissed the appeal as premature because claims remained pending in the case, and, thus, the trial court’s order was not a final judgment. Having granted certiorari to review this holding, we conclude that the language of OCGA § 9-11-12 b requires a reviewing court to treat a motion to dismiss for failure to state a claim upon which relief can be granted as a motion for summary judgment if “matters outside the pleading are presented to and not excluded by the court.” In Thompson v. Avion Systems , 284 Ga. 15, 16-17 663 SE2d 236 2008, this Court set forth the procedure that a reviewing court must follow when complying with the mandate in OCGA § 9-11-12 b. On an appeal of a trial court’s order that dismisses a cause of action for failure to state a claim upon which relief can be granted, “the reviewing court must determine whether either party has presented matters outside the pleading to the trial court, . . . and if so whether the trial court excluded . . . or considered such matters. . . . Cits.” Thompson v. Avion Systems , supra. Therefore, if matters outside the pleadings were presented to the trial court, which then considered these matters as it resolved the case, then a reviewing court is required to treat the resulting trial court’s order as a ruling on a motion for summary judgment. See City of Demorest v. Town of Mount Airy , 282 Ga. 653, 654, fn. 1 653 SE2d 43 2007; Cox Enterprises v. Nix , 273 Ga. 152, 154 538 SE2d 449 2000; Hoffman v. PMC Development Co. , 238 Ga. 258 232 SE2d 541 1977; Lamb v. Fulton-DeKalb Hosp. Auth. , 297 Ga. App. 529, 532 1 677 SE2d 328 2009; Peeples v. City of Atlanta , 189 Ga. App. 888-889 1 377 SE2d 889 1989.