This would be the basic form, assuming OPEN is water level low and CLOSED is water level high.
Also assumes ON is solenoid open water flow and OFF is solenoid closed.
Fallback OFF
If SumpLo OPEN Then ON
If SumpHi CLOSED Then OFF
This will cycle between the low level and the high level continuously.
You might want to add some extra statements for safety, for example
When On > 003:00 Then OFF
This will shut your ATO off (and keep it off until turned back on in the dashboard) if it runs for more than 3 minutes continuously. (Adjust the time for the size of your reservoir and water inflow rate. ) Keeps you from flooding water everywhere if the high level float switch fails.
You could also add a leak detector on the floor next to the reservoir and code the ATO to stop if that switch gets wet, as another safeguard.