We affirm. “The essential inquiry in any action for unjust enrichment ... is whether it is against equity and good conscience to permit the defendant to retain what is sought to be recovered” (Mandarin Trading Ltd. v Wildenstein, 16 NY3d 173, 182 [2011] [internal quotation marks and citation omitted]). However, a showing that the plaintiff’s actions have benefitted the defendant will not suffice to establish a cause of action for unjust enrichment (see Mandarin Trading Ltd. v Wildenstein, 16 NY3d at 182; Sperry v Crompton Corp., 8 NY3d 204, 215-216 [2007]; Clark v Daby, 300 AD2d 732, 732 [2002], lv denied 100 NY2d 503 [2003]). The plaintiff must also demonstrate an existing relationship with, or an inducement by, the defendant (see Sperry v Crompton Corp., 8 NY3d at 215-216; compare ARB Upstate Communications LLC v R.J. Reuter, L.L.C., 93 AD3d 929, 933-934 [2012]).
Here, it is undisputed that defendant was never a customer of plaintiff and did not request that plaintiff deliver oil to him. Moreover, plaintiffs delivery tag demonstrates that the oil was supposed to be delivered to an address on a different street from defendant’s residence, and neither the description of the house nor the location of the fuel intake set forth on the tag matched that of defendant’s home. Thus, plaintiff is unable to demonstrate that its error was induced by defendant. In addition, defendant’s refusal to compensate plaintiff was not against *1571equity and good conscience, as defendant stated on the record before Supreme Court that plaintiff would not match the oil price for which defendant had contracted with a different distributor and defendant was forced to forfeit his ability to take advantage of the lower contract price because his fuel oil tank was full. Defendant further alleged that plaintiffs fuel oil caused his furnace to malfunction, necessitating repair by a service contractor. Finally, as both defendant and Supreme Court noted, pumping out the oil from defendant’s fuel tank could result in further damages to defendant due to the possibility of an oil spill. Under these circumstances, we find no error in Supreme Court’s determination that defendant was not unjustly enriched by his retention of plaintiffs fuel oil.
Nor do we find merit to plaintiffs argument that Supreme Court erred in dismissing its complaint, sua sponte. While such a dismissal is rarely permitted due to the potential for prejudice to the plaintiff, no prejudice was suffered by plaintiff here. Specifically, a sufficient record was developed at the pretrial conference demonstrating that there was no dispute as to the underlying facts. Inasmuch as only a legal question was presented and plaintiffs theory of unjust enrichment was merit-less, for the reasons already set forth herein, it was not improper for Supreme Court to dismiss the complaint in the absence of a formal motion for such relief (see generally Martocci v Bowaskie Ice House, LLC, 31 AD3d 1021, 1022 [2006], lv dismissed 7 NY3d 916 [2006], cert denied 552 US 918 [2007]; compare Hurd v Hurd, 66 AD3d 1492, 1493 [2009]).
Mercure, J.P., Rose and Egan Jr., JJ., concur. Ordered that the order is affirmed, with costs.