# Features — superbowl_daily_2 (RGBC Superbowl Daily 2)

Evidence date: 2026-10-02.

Source: `git@bitbucket.org:overdrive/superbowl_daily_2.git`, `master` at `30eb35e` (2026-06-10).

Status labels:

- **Current** — wired into `frmMain.Run` and reachable on a normal run.
- **Current, opt-in** — wired, checkbox unchecked by default.
- **Manual only** — code and a button exist; the batch does not call it.
- **Disabled UI** — control is on the form and does nothing.
- **Unused** — method or setting exists with no caller.
- **Documented only** — SQL script or comment describes it; application code at HEAD does not do it.
- **Removed from code** — an older commit message describes it; HEAD does not contain it.

Git history does not show a deleted feature as a revert commit except where a later commit replaced the behaviour. "Removed" below means the symbol is absent at HEAD.

## Shell

| Feature | Status | Evidence |
|---|---|---|
| Windows Forms shell titled Superbowl Daily 2 | Current | `frmMain.Designer.vb` |
| Version label `RGBC Superbowl Daily Version 2.{build}.{revision} - 03 February 2026` | Current | `frmMain_Load`, `AssemblyInfo.vb` version `2.0.1.5` |
| Imports / Imported / Exports paths under the exe directory | Current | `frmMain_Load` overwrites `My.Settings` dirs |
| Run button | Current | `btnRun` |
| Auto-run and close when `My.Settings.Debug` is false | Current | `frmMain_Load` |
| Stay open when Debug is true | Current | Same. Checked-in default is true |
| Partial Import checkbox, default checked | Current | `chkPartialImport` |
| Progress bar per process | Current | `bar{ProcessId}` |

## Imports

| Feature | Status | Default | Evidence |
|---|---|---|---|
| 2Way off-con promo CSV (`OffPremisePromoSurvey.csv`) | Current | On | `OffconPromo_Process`, `sysQuery` 25, 26 |
| Adv off-con survey CSV (`OffPremiseSurvey.csv`) | Current | On | `OffconSurvey_Process`, `sysQuery` 21, 22 |
| Adv on-con promo CSV (`OnPromoSurvey.csv`) | Current | On | `OnconPromo_Process`, `sysQuery` 27, 28 |
| Adv on-con survey CSV (`OnPremiseSurvey.csv`), including `blnBobVisibility` | Current | On | `OnconSurvey_Process`, `sysQuery` 23, 24 |
| Mint rep calls CSV (`eSalesCharter_CallsAndOrders.csv`) | Current, opt-in | Off | `RepCalls_Process`, `sysQuery` 29, 30 |
| Por vendor import from `vwAPVendors` | Current | On | `VendorImport_Process`, `sysQuery` 53, 44, 45 |
| Por GL code import from `vwGLAccounts` | Current | On | `GLCodeImport_Process`, `sysQuery` 52, 50, 51 |
| Call cycle data CSV | Current | On | `CallCycleDataReport_Process`, `sysQuery` 82, 83. Git `881a817`, `8d22383` |
| Older off-con promo filenames `OffconPromos.csv`, `OffPromoSurvey.csv` | Documented only | — | Commented constructors in `frmMain_Load` |
| Older on-con promo file `OnconPromos.csv` | Documented only | — | Commented constructor |
| Mint customer segmentation | Disabled UI | — | `chkCustomerSegmentation.Enabled = False`. No process class |
| Monday backup tables `xOffconPromo_yyyyMMdd` and `xOnconPromo_yyyyMMdd` | Unused | — | `BackupMintPromos` exists. Call in `Run` is commented |

## File exports

| Feature | Status | Default | Evidence |
|---|---|---|---|
| 2Way CRM export `pda_crm.csv` | Current | On | `Export_Process`, `sysQuery` 35 |
| 2Way CRM inactive export `pda_crm_inactive.csv` | Current | On | `sysQuery` 60. Comment 2020-09-09 |
| Adv exposure CRM export `exposure_pda_crm.csv` | Current | On | `sysQuery` 37 |
| Adv PROD export `pda_prod.csv` | Current | On | `sysQuery` 36 |
| Planned promotions export `PlannedPromotions.csv` | Current | On | `sysQuery` 59. Comment 2019-02-19 |
| BFBE export generation and email | Documented only | — | Comments in `Run`. `EmailBfbe` has no caller |

Query bodies for IDs 21–30, 35–37, 44–45, 50–53, 59–60, 82–83 are not in Git.

## Repsly

| Feature | Status | Default | Evidence |
|---|---|---|---|
| Product export to `POST /import/productList`, XLSX, FTP, batches of 200 | Current | On | `RepslyProductExport.process.vb`. Git from `32e6df6` |
| Product `Active` follows `blnDataTransfer`, including a push that turns a previously sent product inactive | Current | On | Header comment and queue SQL. Git `48845c0` |
| Re-queue when `blnDataTransfer` differs from `blnLastSentDataTransfer` | Current | On | `InitializeQueue`. Script `15_Add_LastSentDataTransfer_To_Product_Queue.sql` |
| Promotion activities exported as Repsly products (`PR` + 4-digit activity id) | Current | On | `RepslyPromotionExport.process.vb`. Git `20845a7`. UI case is not commented |
| Promotions on the old schedule endpoint `/import/scheduleList` and queue `sysCronJobPromotions` | Documented only | — | Cursor plan describes that as the previous shape. Script `01` still creates `sysCronJobPromotions`. No VB caller at HEAD |
| Customer export to `POST /import/clientList` | Current | On | `RepslyCustomerExport.process.vb`. Git `4d0d625` |
| Inactive customers included (`blnActive` sent as Active, not used as a filter) | Current | On | Git `9fce61f`. Queue insert has no `blnActive` predicate |
| Territory = rep manager, re-queue when it drifts from `strLastSentTerritory` | Current | On | Git `30eb35e`. Script 16 |
| Tags on products and customers (`|` to comma) | Current | On | Git `083efec` |
| Package and size appended to Repsly product name | Current | On | Git `c89fc02` |
| Non-RGBC customers (`mstNot_RGBC_Customer`, `CustomerType = NonRGBC`) | Removed from code; still in SQL script 13 | — | Last Git touch `083efec` / `a3e8011`. No symbol at HEAD |
| Import job status poll `GET /export/importStatus/{id}` | Unused | — | `RepslyAPIClient.GetImportStatus` |
| Basic auth, 60 second HTTP timeout, JSON accept header | Current | — | `RepslyAPIClient` |
| FTP upload of the XLSX before the API call, non-blocking on FTP failure | Current | — | Each Repsly `Run` |

The 2025-12-04 commit subject says promotions export was disabled. At HEAD the promotions checkbox is checked and the `Select Case` calls `RepslyPromotionExport_Process`. Treat the commit subject as history, not current behaviour.

## Track it All

| Feature | Status | Default | Evidence |
|---|---|---|---|
| Outlet XLSX from active `mstCustomer` | Current | On | `TrackItAllOutletExport.process.vb`. Git `c89fc02` |
| Sales manager from `mstRepManager` | Current | — | Git `e2d82f6` |
| Wednesday push, Thursday retry, state row `StateID = 1` | Current | — | `sysTrackItAllOutletSyncState`. Script `14_Create_TrackItAll_OutletSync_State_Table.sql` |
| Failure email on the Thursday failure only | Current | — | `SendTrackItAllFailureNotification` |
| Preview mode (`mode=preview`) when Debug is true and the preview box is checked | Current | Preview box checked; panel hidden unless Debug | `Panel19` |
| `TrackItAllAllowTestRun` bypass of the weekday gate | Current if the setting exists | — | Read in `Run`. Setting is not in `Settings.settings` |
| Preview response saved to `TrackItAllPreviewResult.json` | Current | — | Preview success branch |

## Operations around the batch

| Feature | Status | Evidence |
|---|---|---|
| Extend `mstPeriod` to 30 months, six rows at a time, RGBC fiscal start | Current | `CheckPeriods`, `Duodecimal` |
| Daily `dlyDataWarehouse` customer and product counts | Current | `LogDWD` |
| Staging log then copy to `logSuperbowl` | Current | `Run` end |
| HTML log email to `EmailRgbc` | Current | `EmailLog` |
| Email Log button | Current | `btnEmailLog` |
| Un-invoiced approved requisitions, Monday, older than 14 days | Manual only | `EmailUnIinvoicedRequisitions`. Batch call commented since the 2016 note |
| Email Requisitions button | Manual only | `btnEmailRequisitions` |

## Database scripts as features of the repo

These scripts do not run inside the application. They are the change history for integration tables. `Database_Scripts/README.md` gives an order. There is no script 10 or 11. Two files share the number 14.

| Script | What it changes | Status of the object relative to app code |
|---|---|---|
| 01 | `sysCronJobProducts`, `sysCronJobPromotions` | Products table is used. Promotions table is not used by VB at HEAD |
| 02 | `blnDataTransfer` on `mstProduct` and `dwdProduct` | Used by product export |
| 03 | Checks `dtStamp` on `mstProduct` and `dwfPromo` | Product code uses `mstProduct.dtStamp`. Promotion code uses `promoActivity.dtStamp` |
| 04 | Repair products queue; also ensures `sysCronJobPromotions` | Products path matches the app |
| 05 | `RequestPayload` on products and on `sysCronJobPromotions` | Products code expects it. Promotions export writes `RequestPayload` on `sysCronJobPromotionActivities`, which script 05 does not alter |
| 06 | One-time reset of `Processing` rows on products and `sysCronJobPromotions` | App does not set `Processing` |
| 07 | Drop `RepslyProductID`, `RepslyPromotionID` | Columns not referenced in VB |
| 08 | Optional test products `TEST001F`–`TEST100F` | Not referenced by the app. README marks it optional |
| 09 | `sysCronJobCustomers` | Used |
| 12 | Check `mstCustomer.dtStamp` | Used by customer change detection |
| 13 | `CustomerType` on the customer queue; documents `NonRGBC` | App writes `RGBC` only |
| 14 promotions | `sysCronJobPromotionActivities` | Used |
| 14 Track it All | `sysTrackItAllOutletSyncState` plus seed `StateID = 1` | Used |
| 15 | `blnLastSentDataTransfer` | Used, with a fallback if missing |
| 16 | `strLastSentTerritory` | Used, with a warning if missing |

## Not in this revision

| Item | Status |
|---|---|
| SonarQube project file and `sonarqube_scan.bat` | Not in the Git tree. Named only on the onboarding task snapshot |
| `Database_Scripts_20260403`, `Superbowl Daily 2_20260403` | Not in the Git tree |
| Automated test project | Not present |
| Bitbucket Pipelines or other CI yaml | Not present |
| User login, roles, or row-level security | Not present |
