Cal. Penal Code § 1001.81
(c) If a county creates a diversion or deferred entry of judgment program for individuals committing a theft offense or repeat theft offenses, on receipt of a case or at arraignment, the prosecuting attorney shall either refer the case to the county probation department to conduct a prefiling investigation report to assess the appropriateness of program placement or, if the prosecuting attorney’s office operates the program, determine if the case is one that is appropriate to be referred to the program. In determining whether to refer a case to the program, the probation department or prosecuting attorney shall consider, but is not limited to, all of the following factors:
(d) On referral of a case to the program, a notice shall be provided, or forwarded by mail, to the person alleged to have committed the offense with both of the following:
(e) The prosecuting attorney may enter into a written agreement with the person to refrain from, or defer, prosecution on the offense or offenses on the following conditions: