Plaintiff is a former employee of defendant. He alleges that defendant was unjustly enriched when it failed to report to the Public Employees Retirement System (PERS) that plaintiff was a police officer, thus reducing the retirement contributions that defendant had to make on his behalf. He seeks to recover the amount of the alleged unjust enrichment. The trial court granted defendant’s ORCP 21 motion to dismiss on the grounds that it did not have jurisdiction over the dispute and that plaintiffs allegations do not bring him within the statutory definition of a police officer that applies to PERS retirement plans. We reverse.
We take the facts from plaintiffs amended complaint, accepting as true all well-pleaded allegations and giving him the benefit of all favorable factual inferences. Granewich v. Harding, 329 Or 47, 51, 985 P2d 788 (1999).1 Plaintiff worked for defendant’s community mental health and developmental disabilities program, in positions that entitled him to PERS coverage, from September 3, 1974 through August 17, 1999. During that period, defendant made payments to PERS on plaintiffs behalf, representing both employee and employer contributions. Plaintiff alleges that, beginning on March 10, 1989, the director of the program authorized plaintiff in writing to exercise police officer powers as authorized by the Lane County Sheriff, which he thereafter began to perform.
Plaintiff further alleges that, under PERS, fully vested employees, whose duties are the regular duties of police officers, are entitled to retire at age 50. Plaintiff reached that age on February 6,1998. On April 21,1999, he notified defendant that he intended to retire; at that time, his employee contributions and accumulated earnings totaled approximately $240,000. Upon plaintiffs retirement, defendant would have been required to match that amount as its contribution to plaintiffs retirement account.2 Plaintiff’s last *362day of work was August 27, 1999. On September 29, defendant notified him that it had not employed him as a peace officer and that he had not been authorized to perform the regular duties of a police officer. Plaintiff alleges that defendant did not disclose those limitations on his duties at any time before his resignation. In October 1999 and March 2000, PERS paid plaintiff the balance of his account as a non-retirement distribution. Plaintiff has received nothing representing defendant’s “money match” share of his retirement pension, and defendant has refused to process his separation as a retirement.
Based on those allegations, plaintiff asserts that defendant has been unjustly enriched in an amount equal to what he should have received from PERS, together with interest, had his retirement been processed as that of a police officer, and that the court should require defendant to disgorge that amount in restitution for the benefits that it received as the result of plaintiffs services.
Plaintiff filed his original complaint in May 2000, after the events that he describes had occurred. In that complaint, he relied on essentially identical factual allegations to state a claim for declaratory relief to require defendant to process his retirement through PERS as the retirement of a police officer. The original complaint also sought alternative supplemental relief that was similar to what plaintiff seeks in his amended complaint. In November 2000, the trial court abated the proceeding and required plaintiff to apply to PERS to exhaust any available administrative remedies before his legal action proceeded. Plaintiff asked PERS about how to pursue a retirement claim and what administrative remedies he would have. In response, PERS stated that, as a result of his withdrawal of his account balance, he had lost all of his membership rights in PERS. It told him that, in order to restore those rights, he would need to be reemployed in a PERS-covered position within five years after he left his employment with defendant. He would also have to repay the amount that he received, together with interest, within a year after his reemployment. It also stated that defendant had not provided any information to PERS that indicated that defendant was employed as a police officer. According to *363PERS, there were no administrative remedies by which defendant could seek to change his status on its records unless he first reestablished his membership.3
After receiving that letter from PERS, plaintiff filed his amended complaint, stating a claim for unjust enrichment. Defendant moved to dismiss the complaint under ORCP 21 A(l) and (8),4 arguing (under ORCP 21 A(l)) that the Public Employees Retirement Board (PERB) had primary jurisdiction over plaintiffs claim for increased retirement benefits and (under ORCP 21 A(8)) that plaintiff had failed to plead adequately that he was a police officer under the pertinent statutes. The trial court granted the motion to dismiss with prejudice without indicating the basis for its ruling. We consider defendant’s arguments in turn.
Primary jurisdiction is a court-created doctrine whose purpose is to guide a court in deciding when to postpone or refrain from exercising its j urisdiction in order to permit an agency to decide a controversy that is within the agency’s jurisdiction. Perla Development Co. v. Pacificorp, 82 Or App 50, 53 n 1, 727 P2d 149 (1986), rev den, 303 Or 74 (1987); see also Boise Cascade Corp. v. Board of Forestry, 325 Or 185, 191-93, 935 P2d 411 (1997); Reinwald v. Dept. of Employment, 148 Or App 75, 81, 939 P2d 86 (1997). The fact that an agency may have primary jurisdiction of a dispute or an issue does not mean that it has exclusive jurisdiction; rather, it means that it is preferable for the agency to act, if it is able to do so, before the court acts. See Boise Cascade Corp., 325 Or at 191 n 8; Lone Oak Racing, Inc. v. Oregon Racing Commission, 162 Or App 111, 119-21, 986 P2d 596 (1999). When an agency has primary jurisdiction over a specific issue but not an entire claim, the court will first permit the agency to exercise its jurisdiction over that issue and will then resolve the rest of the case itself. See Reinwald, 148 Or App at 82-83. Primary jurisdiction thus contrasts with exclusive *364jurisdiction, in which only the agency has authority to resolve the dispute. See Boise Cascade Corp., 325 Or at 191 n 8; Lone Oak Racing, Inc., 162 Or App at 121-22.
ORS 238.655 gives PERB authority, “[i]n order to determine any facts necessary to the administration of the retirement system,” to conduct hearings and to exercise the powers that are necessary to its functions. Under that authority, it may determine whether members of PERS qualify for classification as police officers. See Adams v. PERB, 180 Or App 59, 42 P3d 911 (2002). In this case, however, plaintiff does not seek any benefits from PERS based on the alleged failure to classify him correctly. Rather, he alleges that defendant has been unjustly enriched as the result of the events that he describes and that defendant should pay him the amount of the alleged unjust enrichment. His claim, thus, is against defendant, not against PERS and, therefore, is not within PERB’s exclusive jurisdiction under ORS 238.655.
An essential part of plaintiffs claim for unjust enrichment against defendant, however, is that defendant employed him as a police officer for the purposes of the PERS statutes. The significance of that allegation is that it could trigger primary jurisdiction in PERB under ORS 238.655 to decide that issue. In that case, the trial court would properly treat the issue as being within PERB’s primary jurisdiction and abate the case until PERB’s decision on that issue became final. However, as the letter from PERS indicates, and as defendant does not dispute, when plaintiff withdrew his account balance in PERS, he ceased to be a member of PERS. As a result, whether or not PERS should have classified him as a police officer is no longer relevant to the proper administration of the retirement system. As PERS indicated, it has no jurisdiction under those facts unless plaintiff obtains reemployment in a covered police officer position. The doctrine of primary jurisdiction is irrelevant on those facts because plaintiff does not satisfy the predicate of membership in PERS, and it follows that that doctrine does not impose any impediment to the exercise of subject matter jurisdiction by the trial court.
Defendant also argues that the exclusive method by which plaintiff can seek review of its decision is through a *365writ of review under ORS 34.010 to 34.102. Plaintiff filed his complaint more than 60 days after the alleged decision, so, under defendant’s argument, the case would be time barred if the writ of review statutes apply. ORS 34.030. Defendant did not raise this argument in its original motion to the trial court and made only a brief reference to it in its reply memorandum to that court. However, we will consider the issue because it implicates the trial court’s subject matter jurisdiction.
ORS 34.020 provides that a writ of review is available to review “any process or proceeding before or by any inferior court, officer or tribunal [.]” Actions that local governments take administratively may be quasi-judicial, legislative, or purely ministerial. To be subject to the writ of review process, the action must be judicial or quasi-judicial, which means that it must involve or require an adjudicatory process. Such a process “results in a decision, applies pre-existing criteria to concrete facts [,] and is directed at a closely circumscribed factual situation or a relatively small number of persons.” Koch v. City of Portland, 306 Or 444, 448, 760 P2d 252 (1988). According to plaintiffs complaint, the Lane County Director of Management Services notified him that he had not been employed as a peace officer and had not been authorized at any time to perform the regular duties of a police officer. The director also stated that, because plaintiffs job description did not specifically mention police officer functions, those functions were not encompassed within his job duties.
None of the allegations in plaintiffs amended complaint clearly suggests that the county’s action was the result of an adjudicatory process or that the director had the authority to engage in such a process. Moreover, defendant did not move to dismiss for lack of jurisdiction under ORCP 21 A(l) on that ground. It appears from the complaint that the director was stating defendant’s position in its dispute with plaintiff. His statements can best be described as purely ministerial; as a result, they are not the kind of decision that is subject to a writ of review process. Cf. Sergeant’s Towing, Inc. v. City of Portland, 173 Or App 359, 363-64, 22 P3d 237, rev den, 332 Or 558 (2001) (mayor’s decision to reject association’s request was a refusal to agree to a political solution to *366a legal dispute; it was not a quasi-judicial decision). Defendant’s argument fails for that reason alone.
We turn to whether the amended complaint fails to state a claim because it does not adequately allege that plaintiff was a police officer under the PERS statutes. Defendant and plaintiff agree that the applicable definition of “police officer” is ORS 238.005(16)(d), which provides that the term includes
“[slheriffs and those deputy sheriffs or other employees of a sheriff whose duties, as classified by the sheriff, are the regular duties of police officers or corrections officers [.]”
Defendant argues that “[p]laintiff made no factual allegations that bring him within the [statutory definition].” As defendant correctly observes, plaintiff does not allege that he was a police officer in the precise terms of the statute. However, he does allege that he had the status of a special deputy sheriff who was sworn to perform the duties of that office, that he maintained his status as a qualified police officer, and that he in fact exercised peace officer powers as authorized by the sheriff while engaged in his duties.5 It is reasonable to *367infer from those allegations of fact, read in the light most favorable to plaintiff, that he was an employee of the sheriff, that the sheriff classified his duties, and that they were the regular duties of a police officer as contemplated by ORS 238.005(16)(d).
Nonetheless, defendant argues that our decision in Adams “confirms the jurisdictional basis for the dismissal of this case.” In other words, defendant appears to assert that the facts of this case cannot be distinguished from the facts in Adams, and, therefore, the outcome should be the same. In Adams, mental health therapists employed at the Oregon State Hospital sought judicial review of an order of PERB that concluded that therapists were not “police officers” for purposes of PERS classifications. The petitioners argued that, based on their job duties, that they were corrections officers for purposes of the “police officer” classification. However, that classification was dependent, under the applicable statutes, on petitioners being able to demonstrate that where they worked was a “law enforcement unit” within the meaning of the applicable statutes. One requirement to satisfy that definition was that their primary duties must have encompassed the performance of law enforcement-related tasks, such as investigating crimes, enforcing the criminal laws, and detaining arrestees and persons convicted of crimes. Examining the statutory duties at the unit where the petitioners worked, we discerned no statutory duty that *368would have met that definition and, consequently, affirmed PERB’s ruling. Defendant concludes that here, as with the petitioners in Adams, unless plaintiff is employed as a police officer as the statute specifically defines that term, he has no entitlement to PERS retirement benefits as a police officer.
As we stated above, giving plaintiff the benefit of all reasonable inferences arising from his allegations, it is possible to infer that he was an employee of the sheriff and that his primary duties were the regular duties of a police officer. It may be that plaintiff will be unable to prove his allegations, but he is entitled, based on his amended complaint, to have that opportunity. As we have also held, PERB does not have primary jurisdiction over plaintiffs claim because, after having withdrawn his retirement funds, he is no longer a member. We perceive no other impediment to subject matter jurisdiction. It follows that the trial court erred in dismissing the case on the grounds raised by defendant.
Reversed and remanded.
Some of plaintiffs allegations constitute legal conclusions. We refer to those allegations because they describe plaintiffs legal theories, but we do not treat them as allegations of fact.
Whether plaintiff correctly states the fashion in which the “money match” feature of PERS operates is not relevant to our decision in this case.
Plaintiff sent a copy of the PERS letter to the trial court, but it does not appear in the official case records. Defendant does not assert that any of the statements in the letter fails to state PERS’s position or is otherwise incorrect.
ORCP 21A provides, in part, that a party may move to dismiss a claim on the grounds of “(1) lack of jurisdiction over the subject matter” and “(8) failure to state ultimate facts sufficient to constitute a claimf.]”
Paragraph 2 of plaintiffs amended complaint alleges, in part:
“At all material times Defendant operated a ‘community mental health and developmental disabilities program’ within the meaning of ORS 426.005(2) and ORS 426.070(2)(b). On or about March 10,1989, the Director of the said program gave written direction and authorization to Plaintiff to ‘exercise peace officer powers as authorized, by the Lane County Sheriff while performing duties as a Commitment Investigator.’ The said direction and authorization required empowered Plaintiff to: (1) arrest and take into custody, absent warrant or consent, any person whom Plaintiff had probable cause to believe was dangerous to self or any other person, pursuant to ORS 426.228(1); (2) to arrest and take into custody, absent warrant or consent, any person designated to be so arrested by the Director of Defendant’s community mental health and developmental disabilities program, pursuant to ORS 426.228(2); (3) to arrest and take into custody, absent consent of such person, any person designated for such arrest by a warrant of detention by a judge of the Circuit Court for Lane County, pursuant to ORS 426.070(5)(b), in Plaintiffs capacity as the designee of the Sheriff of Lane County for such arrests; (4) to serve citations and warrants pursuant to ORS 426.080; (5) to perform investigations pursuant to ORS 426.074; and (6) to exercise all other powers and to be subject to all other duties, of peace officers and police officers in carrying out the said powers, including but not limited to: seizing and restraining dangerous and violent mentally-ill persons by the use of force, and defending himself and others against the use or imminently threatened use of force; and providing testimony both in-person and by affidavit injudicial proceedings includingpro-ceedings for the issuance of warrants to search and seize property and persons. In his performance of the said duties, Plaintiff was required to and did *367maintain status as a Special Deputy of the Sheriff of Lane County, being suiom to perform the duties of the said office on a regular basis. Plaintiff was required to and did maintain his status as a qualified police officer under the auspices of the Bureau of Police Standards and Training, and was required to and did carry a firearm on his person and utilized the firearm in the performance of his duties. Plaintiff was required to and did operate and utilize in the performance of his duties a patrol vehicle furnished by Defendant which was equipped with police radio communications and safely rear seat plexiglass, and to wear body armor furnished through the Sheriff of Lane County. All of these duties, powers and activities of Plaintiff were performed by him in good-faith reliance on the aforesaid written directions and authorizations of Defendant through its designated director of community mental health programs. In the performance of the said duties and activities Plaintiff has been assaulted, shot at, attacked with weapons, and has been required to utilize force upon and against dangerous and violent individuals. The said duties, power and activities were the regular duties of police officers as defined in OAR 459-030-0000(2) and ORS 237.620(2).”
(Emphasis added.)