The skill scans a bot with subagents (never runs it) and writes HANDOVER.md, an 11-section ops guide in the operator's order: where is what, how to run, how long to wait, after the run, how to see an exception, exception list, how you will know, how to tell us, don'ts, issues seen before. Dev material (check against 12 failure classes from Tebra Auto Post, gaps with file:line, incidents) goes to HANDOVER-DEV.md. Also adds ADR-0004, glossary terms, five fixture bots and a handoff eval runner (--resume, --regrade) with results from 47 runs of the earlier 13-section version. The grader still expects that structure and must be updated before the next eval run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
16 KiB
Payer portal downloader - ops handover
Version: not versioned (the project has no version number) · Written 2026-10-23 · Escalation: raise a ticket in the RPA Support queue
1. What the bot does
Every day at 07:00 (Windows Task Scheduler) the bot opens Chrome, signs in to the payer web portal and, for each provider in the input Excel, opens the provider's remittance page and exports the remittance report as a CSV file. Input: data/input/providers.xlsx with two sheets - Login (portal username and password) and Providers (NPI, provider name, active flag). Output: one result workbook data/output/Download_Report_<YYYYMMDD>.xlsx with a Status and Remarks per provider, the CSV files in data/downloads/, and a screenshot in data/screens/ when a provider's report page does not load. The only app it drives is Google Chrome (a Chrome window it opens itself).
2. How it works
Windows Task Scheduler (07:00 daily)
└─ starts → Downloader (runs in a console window, no screens of its own)
│
├─ drives ──> Chrome window → payer web portal
│ (do not touch this Chrome window while it runs)
├─ reads ──> data/input/providers.xlsx
├─ saves ──> data/downloads/*.csv (one CSV per downloaded provider)
├─ saves ──> data/screens/<NPI>.png (only when a report page did not load)
└─ writes ──> data/output/Download_Report_<YYYYMMDD>.xlsx (at the very end)
- Task Scheduler starts the bot once a day; nothing else starts it.
- Downloader is the bot itself. It has no window of its own besides a console.
- Chrome window is opened and closed by the bot. Everything the bot does in the portal happens there.
- Result workbook is written once, when the run ends (also when the run crashes part-way). Until then nothing is in
data/output/.
One run, step by step:
- Read the input Excel: the login from the Login sheet, the provider list from the Providers sheet.
- Open Chrome and sign in to the portal. It waits up to 30 s for the portal dashboard.
- For each provider, in input order:
- inactive provider (Active =
N) → skipped, nothing opened; - open the provider's remittance page;
- if the portal sent it back to the login page (session expired) → sign in again and retry the provider;
- if a maintenance banner shows → no file, but marked Downloaded (see E05);
- wait up to 30 s for the report grid; "no results" → No Data;
- click Export CSV and wait up to 60 s for a new CSV in
data/downloads/.
- inactive provider (Active =
- Close Chrome and save the result workbook.
3. Before a run
- Google Chrome is installed on the machine, and the bot's Python packages are installed (the dev team's setup).
- These folders exist next to the bot:
data/input,data/output,data/downloads,data/screens,logs. Ifdata/outputis missing the run works but the result workbook is not saved. Iflogsis missing the bot does not start at all. data/input/providers.xlsxis in place and closed (not open in Excel).- Login sheet: username in cell A2, password in cell B2. When the portal password changes, update B2 before 07:00.
- Providers sheet: one provider per row from row 2. Column A = NPI, column B = provider name, column C = active flag.
- To skip a provider put exactly a capital
Nin column C. Good:N. Bad:n,No,Inactive- these are treated as active and the bot will try them. - A row with an empty column A is ignored silently, even if a name is filled in.
- The same NPI on two rows is processed twice.
- To skip a provider put exactly a capital
- Today's result workbook
Download_Report_<today>.xlsxis not open in Excel. If it is, the bot cannot save the new one and the result is lost. - A second run on the same day overwrites that day's result workbook. Copy it first if you need the earlier one.
4. During a run
- Don't click, type in, or close the Chrome window the bot opened. Closing it crashes the run (see E09).
- Don't move, rename or open files in
data/downloads/while it runs. The bot decides "downloaded" by spotting a new CSV there. - To stop the bot: end the task in Windows Task Scheduler (or close its console window). There is no Stop button. Stopping this way does not save a result workbook, and the Chrome window may stay open - close it afterwards.
- A run looks stuck when the Chrome window sits on the same page for several minutes. Normal waits are at most 30 s per page and 60 s per download, so one provider takes about 1.5 minutes at worst. The bot has no watchdog of its own; if nothing changes for 10 minutes, stop it and raise a ticket.
5. Where to look when something goes wrong
| Question | Where to look |
|---|---|
| Did the run finish? | data/output/Download_Report_<today>.xlsx exists and has one row per provider in the input. Fewer rows = the run crashed part-way (E09). No file = the run never started or was stopped (E10). |
| Which providers failed? | Result workbook → Status column: red cells (Error), and every "Login Failed" row (these have no colour). Also check green "Downloaded" rows whose Remarks say "portal maintenance - no file" (E05). |
| Why did one provider fail? | Result workbook → Remarks column. For "Report grid did not load" also open data/screens/<NPI>.png. |
| Did the bot already retry? | Not visible to ops. Only a session expiry is retried (section 8); everything else is not retried. |
| Did the CSV really arrive? | data/downloads/ - sort by time. The CSV names come from the portal and do not include the NPI, so match by time order. |
| Which version is running? | Not shown anywhere (no version number). |
6. Statuses
The result workbook has columns Provider, NPI, Status, Remarks. Statuses and their Remarks:
| Status (Remarks) | Colour | Meaning | What ops does |
|---|---|---|---|
| Downloaded ("Report saved") | green | A new CSV arrived in data/downloads/ after Export |
nothing |
| Downloaded ("portal maintenance - no file") | green | Nothing was downloaded. The portal showed a maintenance banner. Needs follow-up. | Re-run later or download by hand (E05) |
| No Data ("No remittances in the date range") | green | Portal shows no remittances for this provider | nothing |
| Skipped - inactive provider ("Marked N in the input") | green | Column C was N; the portal was not opened for this provider |
nothing, unless the provider should be active |
| Login Failed ("Check the portal username/password") | no colour (meant to be red) | The first sign-in failed; every provider gets this row and nothing was downloaded | E01 |
| Error ("Report grid did not load") | red | Report page did not load within 30 s; screenshot saved | E03 |
| Error ("Download did not finish") | red | No new CSV within 60 s of Export. The file may still have arrived late. | E04 |
| Error ("Session expired") | red | Portal logged the bot out 3 times in a row for this provider | E02 |
| (provider missing from the workbook) | - | The run crashed before reaching this provider | E09 |
7. Exception catalogue
| ID | What you see | How the bot identifies it | Where it is recorded | Type | Who acts | What to do | Escalate when |
|---|---|---|---|---|---|---|---|
| E01 | Every row "Login Failed" - "Check the portal username/password" (no colour) | After clicking Sign in it waits 30 s for the portal dashboard; if it never appears, sign-in counts as failed. A slow portal looks the same as a wrong password. | Result workbook, Status/Remarks | Business (or System if the portal is slow) | Ops | Sign in to the portal by hand with the Login sheet's A2/B2. If it fails, fix the password in B2. If it works, the portal was slow - re-run. | Manual sign-in works and the re-run still gives Login Failed |
| E02 | Error - "Session expired" | The provider page bounced back to the portal login page; the bot signed in again and retried, 3 tries in total | Result workbook | System | Bot, then Ops | Re-run later, or download that provider by hand | Several providers show it in the same run, or on 2 days running |
| E03 | Error - "Report grid did not load" | It waits 30 s for the remittance grid on the provider's page | Result workbook; screenshot data/screens/<NPI>.png |
System | Ops | Open the screenshot. Portal error or blank page → re-run or download by hand. Page looks normal but slow → re-run. | The screenshot shows a normal page on 2 runs in a row (the portal page may have changed) - attach the screenshot |
| E04 | Error - "Download did not finish" | After clicking Export CSV it watches data/downloads/ for 60 s for a new CSV |
Result workbook | System | Ops | Check data/downloads/ first - the file may have arrived after 60 s. If it arrived, use it and don't re-download. A late file can also be credited to the next provider in the list - check the time order. |
It happens for most providers in one run |
| E05 | Green "Downloaded" but Remarks "portal maintenance - no file" | The portal page shows a maintenance banner; the bot writes Downloaded without exporting anything | Result workbook (Remarks only - the status looks like success) | Business | Ops | Filter Remarks for "maintenance". Re-run after the maintenance window, or download by hand. | - (dev fix listed in section 13) |
| E06 | Provider you expected is "Skipped - inactive provider", or a provider you deactivated was processed | Only a capital N in column C counts as inactive |
Result workbook | Business | Ops | Fix column C (N to skip, blank to process) and re-run if needed |
- |
| E07 | A provider from the input is missing from the workbook, but the workbook has later providers | The row had no NPI in column A and was ignored | Nowhere | Business | Ops | Fill column A | - |
| E08 | Rows look fine but data/downloads/ has no matching CSV, or two CSVs for one provider |
The bot counts any new CSV in the folder as this provider's download; it does not check the file content | Nothing records the file name | System | Ops, then Dev | Don't touch the downloads folder during a run. Match CSVs by time. | Downloads keep mismatching |
| E09 | Workbook has fewer rows than the input, or only the header row | An unexpected problem stopped the run: a sign-in page or Export button the bot couldn't find, a failed re-login after a session expiry, Chrome closed by someone. The bot saves what it had and stops. | Workbook stops at the last provider done; the cause is only in the console/log, which ops cannot open | System | Dev | Re-run once (it starts from the first provider again, so already-downloaded CSVs are downloaded again). | It happens again - send the time of the run, the result workbook, the last provider shown, and what the Chrome window showed |
| E10 | No Download_Report_<today>.xlsx at all |
The bot could not start: input file missing or open, Chrome would not start, logs folder missing, today's workbook open in Excel, or data/output missing |
Nowhere ops can see | System | Ops, then Dev | Check the "Before a run" list (input closed, folders present, yesterday's workbook closed), then re-run | Still no workbook after the checklist - send the time of the run and a Task Scheduler "Last Run Result" screenshot |
8. What the bot recovers by itself
| Problem | What the bot does | Limit | After the limit |
|---|---|---|---|
| Portal session expired on a provider page | Signs in again, retries the same provider | 3 tries per provider | "Error - Session expired", next provider. If the re-login itself fails, the run stops (E09). |
| Report grid slow | Waits | 30 s, no retry | "Error - Report grid did not load" + screenshot, next provider |
| Download slow | Waits | 60 s, no retry | "Error - Download did not finish", next provider |
| First sign-in slow | Waits | 30 s, no retry | Every provider "Login Failed", run ends |
Nothing else is retried. There is no restart and no resume: a re-run always starts from the first provider.
9. Known incidents
There is no change history (no git history, bug log or release notes) for this bot. The log file has one run on record:
| When / version | What ops saw | Cause | What to do now | Ops could handle? |
|---|---|---|---|---|
| 2026-09-02 / unversioned | One provider "Error" right after a portal session expiry; other providers downloaded | Not recorded - the log keeps the status only, not the reason | Check the Remarks column (E02-E04) | Partly |
10. Releases and version check
- How an update arrives: there is no updater; a developer replaces the bot's files on the machine.
- How to confirm it applied: not possible today - the bot shows no version. Ask the developer to confirm in the ticket.
- If the version did not change: raise a ticket in the RPA Support queue.
11. Escalating to dev
Raise a ticket in the RPA Support queue. Send: the exception ID from section 7, the date and time of the run, the result workbook Download_Report_<date>.xlsx, the NPI of the affected provider, and the screenshot from data/screens/ if there is one.
Never send: the portal password, the input Excel (it contains the password), the settings file, or remittance CSV contents in chat.
12. Failure-class check
- F1 covered in section 3 (Chrome, folders, closed files) and E10.
- F2 covered in section 4 (don't touch the bot's Chrome window). The bot drives Chrome directly, not by window title, so wrong-window grabbing does not apply.
- F3 covered in E01, E03, E04 and section 8 (30 s / 30 s / 60 s waits, no retries).
- F4 covered in section 3 input rules (
Nflag, empty NPI, duplicates, login cells) and E06, E07. - F5 covered in E05 and E08; dev items 1 and 4.
- F6 covered in E04 (check
data/downloads/before re-running); dev item 4. - F7 covered in section 6 and E05; dev item 1.
- F8 not applicable: no auto-rerun loop or watchdog; the only loop (re-login) is capped at 3 tries. No-watchdog risk noted in section 4.
- F9 covered in section 4 (end the task in Task Scheduler; result not saved, close Chrome after).
- F10 not applicable: no batches, locks or completion gates; each run is independent. Same-day overwrite noted in section 3.
- F11 covered in section 5 and E09; dev items 3, 5.
- F12 covered in section 10; dev item 6.
13. Fix before handover (dev team)
| # | Gap | Why it hurts ops | Where (file:line) |
|---|---|---|---|
| 1 | Maintenance banner returns status "Downloaded" (green) although no file was exported | Ops thinks the report was downloaded | bot.py:54-55 |
| 2 | "Login Failed" rows get no colour; the colour fill is only applied in the provider loop | Failed rows don't stand out | bot.py:89-90 (vs bot.py:107) |
| 3 | The log file is in logs/, which ops cannot open, and it records only the status, not the Remarks or crash reasons; uncaught errors go to the console only |
The cause of E09/E10 is invisible to ops | bot.py:30-31, bot.py:105, bot.py:113-114 |
| 4 | "Downloaded" means any new CSV appeared in data/downloads/; a late file from the previous provider is credited to the next one; CSV not renamed to the NPI |
Wrong attribution; ops can't tie a CSV to a provider | bot.py:63-70 |
| 5 | A failed re-login after session expiry, a missing sign-in field, or a missing Export button stops the whole run; remaining providers get no row at all | Silent partial results (E09) | bot.py:41-43, bot.py:64, bot.py:102 |
| 6 | No version number anywhere | Ops can't confirm which build is running | project-wide |
| 7 | Result workbook saved only at the very end, into a folder that must already exist; same-day re-run overwrites; open workbook = lost result | Whole day's result can be lost | bot.py:108-110 |
| 8 | Active flag accepts only exact capital N |
n / No are processed as active |
bot.py:77 |
| 9 | Portal password stored in plain text in the input Excel (Login sheet) | Password travels with every copy of the input | bot.py:76 |
| 10 | config.yaml contains a live-looking API token that the code never uses |
Secret committed with the bot; rotate and remove | config.yaml:2 |
| 11 | Chrome driver and packages are unpinned (no versions) | A Chrome or package update can break the bot overnight | requirements.txt:1-3 |
| 12 | Marker file BOT_WAS_RUN written to the bot folder on every run, never read |
Noise; unclear purpose | bot.py:74 |