toga-ai 1.0.852 → 1.0.853
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
| [OneUptime external uptime monitoring for 1.0 workers](features/oneuptime-worker-uptime-monitoring.md) | Per-minute external OneUptime "Incoming Request" heartbeat from every 1.0 worker box (Degraded 3 min / Offline 5 min); open for the heartbeat push, monitor prov |
|
|
17
17
|
| [Prudential: Send Shipments for the Day report (daily cron)](features/send-shipments-for-the-day.md) | Daily 9:00 PM Prudential/Dell cron emailing an Excel of every device shipped today (tracking, serial, XID, FedEx status, vendor); open for the ASN join chain an |
|
|
18
18
|
| [Staples cXML Order Import (SFTP → NetSuite)](features/staples-cxml-order-import.md) | Hourly cron importing Staples cXML POs from SFTP into NetSuite Sales Orders (writes 855 ack back); open for the per-file flow, saved-search-8412 Location resolu |
|
|
19
|
+
| [Walmart Daily Sales Report (send_toga_walmart_report.php)](features/walmart-daily-sales-report.md) | The two Walmart sales workbooks (summary + details) built from `TOGA_Walmart` (in-store) and `TOGA_WalmartEComm` (.COM); open for the pseudo-store 1472 channel |
|
|
19
20
|
| [Diagnosing frozen 1.0 worker cron check-ins (Sentry "missed" flood)](workflows/diagnosing-frozen-cron-checkins.md) | Ordered path to diagnose frozen 1.0 worker cron timestamps + a Sentry `worker1` "missed" flood; open when check-ins stall and you suspect a wedged lock. |
|
|
20
21
|
| [isFulfillable Multi-Client Backfill (all togasupply clients)](workflows/isfulfillable-multi-client-backfill.md) | One-time backfill catching up `Items.isFulfillable` on existing items across all 17 togasupply clients; open when running/re-running it or deciding whether rema |
|
|
21
22
|
| [Deduplicating NetSuite duplicate Items across client DBs (recursive MERGE)](workflows/netsuite-duplicate-items-dedup.md) | Per-client cleanup collapsing duplicate `Items` rows (same `partNumber`) to one canonical via recursive MERGE; open before running it — and read the catalog-bli |
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Walmart Daily Sales Report (send_toga_walmart_report.php)
|
|
3
|
+
framework: "1.0"
|
|
4
|
+
repo: worker
|
|
5
|
+
project: Worker
|
|
6
|
+
client: walmart
|
|
7
|
+
type: feature
|
|
8
|
+
status: active
|
|
9
|
+
updated: 2026-09-21
|
|
10
|
+
owners: ["mhammontree"]
|
|
11
|
+
files:
|
|
12
|
+
- worker/crons/notifications/reports/send_toga_walmart_report.php
|
|
13
|
+
- worker/crons/notifications/reports/send_incomm_report.php
|
|
14
|
+
related:
|
|
15
|
+
- ../../../clients/walmart/profile.md
|
|
16
|
+
- ../workflows/tracing-a-worker-cron-run-in-production.md
|
|
17
|
+
- ../../library/features/email-test-mode-and-write-free-sends.md
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
The two Walmart sales workbooks (summary + details) built from `TOGA_Walmart` (in-store) and `TOGA_WalmartEComm` (.COM); open for the pseudo-store 1472 channel trap, the registration-not-sale counting rule, and the unmapped-category hole.
|
|
21
|
+
|
|
22
|
+
## Summary
|
|
23
|
+
|
|
24
|
+
`send_toga_walmart_report.php` emails two Excel workbooks:
|
|
25
|
+
|
|
26
|
+
- `WalmartTOGaSales_<date>.xlsx` — "Stores *" summary tabs (Weekly / Prior Week / YTD), categories in columns.
|
|
27
|
+
- `WalmartTOGaSalesDetails_<date>.xlsx` — item-level tabs, one row per paid sale.
|
|
28
|
+
|
|
29
|
+
Data comes from two databases, unioned: **`TOGA_Walmart`** (in-store) and
|
|
30
|
+
**`TOGA_WalmartEComm`** (online, rendered as a pseudo-store `.COM`). The report reads
|
|
31
|
+
`togaClientId = 6` with database `TOGA_Walmart` — **not** the `TOGA.Clients.id = 7` on the
|
|
32
|
+
[Walmart profile](../../../clients/walmart/profile.md). Both identifiers are live; do not
|
|
33
|
+
"correct" one to the other.
|
|
34
|
+
|
|
35
|
+
## How it works
|
|
36
|
+
|
|
37
|
+
1. `$storeNumberSql` (defined once at the top) is the shared channel-label expression, reused
|
|
38
|
+
by the item-level query and both store-level queries so every tab labels a sale the same way.
|
|
39
|
+
Named constants: `$multiChannelStoreId = 1472`, `$areaNumberNoStoreArea = '998'`,
|
|
40
|
+
`$areaNumberEComm = '999'`.
|
|
41
|
+
2. Store-level tabs: `UNION ALL` of the `TOGA_Walmart` in-store leg and the
|
|
42
|
+
`TOGA_WalmartEComm` `.COM` leg, in both the "get stores" and "get data" queries. The store
|
|
43
|
+
list is scoped to stores that **actually sold in the reporting period**, so the ~29 dormant
|
|
44
|
+
stores stay off the tab.
|
|
45
|
+
3. Item-level tabs: `LEFT OUTER JOIN Stores ON Stores.id = ServiceRequests.storeId`, grouped by
|
|
46
|
+
`$storeNumberSql` (not `Stores.id`).
|
|
47
|
+
4. Rows are bucketed into columns by `$cntCategoryMapping` / `$amountCategoryMapping`.
|
|
48
|
+
|
|
49
|
+
## Gotchas
|
|
50
|
+
|
|
51
|
+
- **`TOGA_Walmart.Stores.id = 1472` is a pseudo-store catch-all, and its own `storeNumber` is
|
|
52
|
+
wrong.** Every non-store sale hangs off id 1472. The real channel lives on
|
|
53
|
+
**`ServiceRequests.storeNumber`**, not `Stores.storeNumber`. Verified in prod: id 1472 carries
|
|
54
|
+
`WB` (219 rows, 2023-06-29 → 2026-09-20), `WM+` (118 rows, ended 2023-09-27), and one NULL
|
|
55
|
+
(2025-02-13) — while `Stores.storeNumber` for id 1472 says `WM+`. Reading the Stores row
|
|
56
|
+
mislabels every current sale. Store 1472 also has no `Addresses` row, so City/State render blank.
|
|
57
|
+
- **Never `INNER JOIN Stores` off `ServiceRequests.storeId`** — `storeId` is nullable and the
|
|
58
|
+
inner join silently deletes paid sales (4 lost since 2026-07-01, incl. the 2026-09-13 sale the
|
|
59
|
+
business flagged missing from `WalmartTOGaSalesDetails_20260915.xlsx`).
|
|
60
|
+
- **The report counts registrations, not sales.** `ServiceRequests` rows are created when a
|
|
61
|
+
customer registers the card, never when Walmart rings it up. The InComm SFTP feed is **never
|
|
62
|
+
imported**: `send_incomm_report.php` only downloads the day's files and emails them as
|
|
63
|
+
attachments — no DB write anywhere. So the report's in-store count is structurally lower than
|
|
64
|
+
the InComm file. Investigated under TRUE-81324; **no importer is being built** because Mike
|
|
65
|
+
confirmed Walmart no longer does in-store sales. Do not re-investigate this gap.
|
|
66
|
+
(InComm product: `TOGA_Walmart.Services` id 43558, SKU 302010001, UPC 643570190193,
|
|
67
|
+
`reportingCategory` 'Support'; FY26-to-date 44 units / $3,996.)
|
|
68
|
+
- **Open defect — unmapped categories vanish from the Stores tabs.** The category mappings cover
|
|
69
|
+
only Phone Repair, Tablet Repair, Set-up, Repair, Support, In-Home, Associate Performed.
|
|
70
|
+
Anything else lands in no column and is excluded from the Total. Verified: `TOGA_WalmartEComm`
|
|
71
|
+
has 181 items / $14,118 YTD with `reportingCategory = '0'` that are invisible on the report;
|
|
72
|
+
`TOGA_Walmart` has 6 such services. Fix for a future ticket: add an "Other" catch-all column.
|
|
73
|
+
|
|
74
|
+
## Change history
|
|
75
|
+
|
|
76
|
+
- 2026-09-21 — Restored the in-store `TOGA_Walmart` leg on the Stores tabs (deleted by 4d8e48803 / TRUE-60157 in 2025-03), switched the item query to `LEFT OUTER JOIN Stores`, and extracted the shared `$storeNumberSql` label expression (TRUE-81324). (mhammontree)
|
package/knowledge/INDEX.md
CHANGED
|
@@ -5,7 +5,7 @@ _Auto-generated by `knowledge.js index`. Do not hand-edit._
|
|
|
5
5
|
## 1.0 framework
|
|
6
6
|
|
|
7
7
|
- **library** (Library) _(framework core)_ — 26 doc(s) → [1.0/apps/library/INDEX.md](1.0/apps/library/INDEX.md)
|
|
8
|
-
- **worker** (Worker) —
|
|
8
|
+
- **worker** (Worker) — 37 doc(s) → [1.0/apps/worker/INDEX.md](1.0/apps/worker/INDEX.md)
|
|
9
9
|
- **dbchanges** (Database Changes) _(framework core)_ — 1 doc(s) → [1.0/apps/dbchanges/INDEX.md](1.0/apps/dbchanges/INDEX.md)
|
|
10
10
|
- **worker1.5** (Worker 1.5) — 0 doc(s) → [1.0/apps/worker1.5/INDEX.md](1.0/apps/worker1.5/INDEX.md)
|
|
11
11
|
- **togadesk** (TOGa Desk) — 13 doc(s) → [1.0/apps/togadesk/INDEX.md](1.0/apps/togadesk/INDEX.md)
|
|
@@ -9,7 +9,7 @@ apps:
|
|
|
9
9
|
client: walmart
|
|
10
10
|
type: client-feature
|
|
11
11
|
status: active
|
|
12
|
-
updated: 2026-09-
|
|
12
|
+
updated: 2026-09-21
|
|
13
13
|
owners: ["mhammontree"]
|
|
14
14
|
files:
|
|
15
15
|
- library/app/client/walmart.php
|
|
@@ -19,6 +19,7 @@ related:
|
|
|
19
19
|
- clients/walmart/features/domain-migration.md
|
|
20
20
|
- clients/walmart/features/registration-route.md
|
|
21
21
|
- clients/walmart/features/customer-email-lifecycle.md
|
|
22
|
+
- 1.0/apps/worker/features/walmart-daily-sales-report.md
|
|
22
23
|
---
|
|
23
24
|
|
|
24
25
|
Walmart B2C tech-services tenant (client id 7); open for its identifiers, key files, and the `requireRegistrationUrl` DB rule.
|
package/package.json
CHANGED