toga-ai 1.0.87 → 1.0.89
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.
- package/knowledge/1.0/apps/walmarttechservices/INDEX.md +5 -0
- package/knowledge/1.0/apps/walmarttechservices/architecture.md +141 -0
- package/knowledge/INDEX.md +1 -0
- package/knowledge/clients/compass-usa/features/asn-to-item-fulfillment.md +13 -0
- package/knowledge/registry.json +2 -1
- package/package.json +1 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# walmarttechservices (Walmart Tech Services) — 1.0 knowledge
|
|
2
|
+
|
|
3
|
+
| Doc | Summary | Files |
|
|
4
|
+
|-----|---------|-------|
|
|
5
|
+
| [Walmart Tech Services Architecture](architecture.md) | Small public-facing PHP marketing + warranty-registration site for **Walmart Tech Services**, the consumer tech-support / device-repair program. | index.php, _.php, app/template.php, app/menu.php, app/content/home.php, app/content/warrantyregistrations/view.php, app/content/warrantyregistrations/iframe.php, app/content/warrantyregistrations/action.php, config.prod.ini, composer.json, .ebextensions/, ebs/git.json |
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Walmart Tech Services Architecture
|
|
3
|
+
framework: "1.0"
|
|
4
|
+
repo: walmarttechservices
|
|
5
|
+
project: Walmart Tech Services
|
|
6
|
+
client: shared
|
|
7
|
+
type: architecture
|
|
8
|
+
status: active
|
|
9
|
+
updated: 2026-06-15
|
|
10
|
+
owners: [mhammontree]
|
|
11
|
+
files:
|
|
12
|
+
- index.php
|
|
13
|
+
- _.php
|
|
14
|
+
- app/template.php
|
|
15
|
+
- app/menu.php
|
|
16
|
+
- app/content/home.php
|
|
17
|
+
- app/content/warrantyregistrations/view.php
|
|
18
|
+
- app/content/warrantyregistrations/iframe.php
|
|
19
|
+
- app/content/warrantyregistrations/action.php
|
|
20
|
+
- config.prod.ini
|
|
21
|
+
- composer.json
|
|
22
|
+
- .ebextensions/
|
|
23
|
+
- ebs/git.json
|
|
24
|
+
related: []
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
# Walmart Tech Services Architecture
|
|
28
|
+
|
|
29
|
+
Small public-facing PHP marketing + warranty-registration site for **Walmart Tech
|
|
30
|
+
Services**, the consumer tech-support / device-repair program. The site is operated under
|
|
31
|
+
the **True Network Solutions (TNS)** brand (an Agilant business) and is co-branded with
|
|
32
|
+
Walmart. It is **Framework 1.0** (`App_` classes) running on the **TOGa Commerce 1.0**
|
|
33
|
+
platform and deployed to **AWS Elastic Beanstalk**; it leans on the shared `library` core
|
|
34
|
+
and the back-office **ASI / Vision** platform (`vision.asisystem.com`) for its data.
|
|
35
|
+
|
|
36
|
+
- Repo: `github.com/agilantsolutions/walmarttechservices`. Composer package name is
|
|
37
|
+
`agilantsolutions/togacommerce1` ("TOGa Commerce 1.0").
|
|
38
|
+
- Local path on dev machines is tracked in Claude memory (`repo-path-walmarttechservices`).
|
|
39
|
+
- Public URL: `https://www.walmarttechservices.com/`.
|
|
40
|
+
|
|
41
|
+
## Purpose / what the site does
|
|
42
|
+
|
|
43
|
+
1. **Marketing landing page** — describes the tech-support offerings (Tech Support, Device
|
|
44
|
+
Repair, Device Setup, In-Home), a "Premium Tech Support & Security" plan ($89/yr,
|
|
45
|
+
bundles McAfee Total Protection), testimonials, and contact info. Support phone is
|
|
46
|
+
`(888) 725-4544`; contact emails are `InHomeSupport@TrueNetworkSolutions.com` and
|
|
47
|
+
`WalmartSupport@TrueNetworkSolutions.com`. Content lives in `app/menu.php`.
|
|
48
|
+
2. **Warranty / service registration** — a customer who purchased a service registers it
|
|
49
|
+
via a form (first/last name, email, phone, date of purchase, receipt number, and a
|
|
50
|
+
receipt file upload). On submit it confirms the customer's existing `ServiceRequest`
|
|
51
|
+
and emails a branded confirmation. This is the only interactive feature.
|
|
52
|
+
|
|
53
|
+
## Stack
|
|
54
|
+
|
|
55
|
+
- **PHP 7.2.33** (pinned in `composer.json` `config.platform`).
|
|
56
|
+
- **Framework 1.0** — uses `App_`-prefixed classes from the `library` core (`App_Page`,
|
|
57
|
+
`App_Registry`, `App_Model_ServiceRequest`, `App_Model_Toga_Contact`, `App_Database`,
|
|
58
|
+
`App_String`, `App_Client_Walmart`, `App_Email_WalmartB2C`, `Browser_Form` and its
|
|
59
|
+
`Browser_Form_Input_*` elements, `Browser_Form_Validator`).
|
|
60
|
+
- **Sentry** (`sentry/sentry ^4.9`) for error tracking.
|
|
61
|
+
- Server-rendered HTML (table-based templates); no SPA/JS framework. Assets in `assets/`.
|
|
62
|
+
|
|
63
|
+
## Application bootstrap & routing
|
|
64
|
+
|
|
65
|
+
`index.php` → `require('_.php')` (bootstrap/autoloader, wires the `library` core) →
|
|
66
|
+
`App_Framework_WalmartTechServices::initialize()` then `::renderIndex()`.
|
|
67
|
+
|
|
68
|
+
- `app/template.php` is the page chrome. It branches **mobile vs. desktop**
|
|
69
|
+
(`App_Page::isOnMobileDevice()`) and renders a content file chosen by the `content`
|
|
70
|
+
request var: `app/content/<content>.php` (underscores in the var map to directory
|
|
71
|
+
separators, e.g. `warrantyregistrations_iframe` → `warrantyregistrations/iframe.php`).
|
|
72
|
+
Unknown `content` throws `Invalid content destination`.
|
|
73
|
+
- Default content is `home` (`app/content/home.php`), which just requires
|
|
74
|
+
`warrantyregistrations/view.php`.
|
|
75
|
+
|
|
76
|
+
## Warranty-registration flow
|
|
77
|
+
|
|
78
|
+
- **Form** (`app/content/warrantyregistrations/iframe.php`) — a `Browser_Form` posting to
|
|
79
|
+
the `warrantyregistrations_action` content via an iframe target. Fields: `firstName`,
|
|
80
|
+
`lastName`, `emailAddress` (email-validated), `primaryPhone` (phone-validated),
|
|
81
|
+
`dateOfPurchase` (datepicker), `receiptNumber` (numeric, 5–10 chars), `fileReceipt`
|
|
82
|
+
(file upload). A success state shows a "Thank You" message.
|
|
83
|
+
- **Handler** (`app/content/warrantyregistrations/action.php`, `MODE_NEW`) —
|
|
84
|
+
1. Sanitizes input (`App_Page::htmlProtect`, `App_String::filterCharactersAlphaOnly`,
|
|
85
|
+
`cleanPhoneNumber`, `cleanEmailAddress`).
|
|
86
|
+
2. Decrypts an `id` request var (`App_String::decrypt`) into a `serviceRequestId`.
|
|
87
|
+
3. Loads the linked `App_Model_Toga_Contact`, updates name/phone/email, saves.
|
|
88
|
+
4. Marks the `App_Model_ServiceRequest` `confirmed = true`.
|
|
89
|
+
5. Looks up the service(s) on the request and sends a branded confirmation email
|
|
90
|
+
(`App_Email_WalmartB2C`). Two variants by `Services.requiresAgentDownload`: an
|
|
91
|
+
"agent download" email (link built from `App_Client_Walmart::AGENTDOWNLOADURLPREFIX`
|
|
92
|
+
+ the contact email) or a "call us" email.
|
|
93
|
+
|
|
94
|
+
## Data / back-office
|
|
95
|
+
|
|
96
|
+
Configured per-environment in `config.<env>.ini` (`[database_*]`), pointing at the ASI
|
|
97
|
+
Vision RDS cluster (`*.cluster-clwbyqvxdm4q.us-west-2.rds.amazonaws.com`). Logical DBs:
|
|
98
|
+
`Vision` (main), `Logs`, `Vision_Log`, `TOGA` (`db_toga` — `ServiceRequest*`, `Services`,
|
|
99
|
+
`Contact`), `Common`. The site is essentially a thin consumer front-end over service
|
|
100
|
+
requests created elsewhere in the Vision platform.
|
|
101
|
+
|
|
102
|
+
## External integrations
|
|
103
|
+
|
|
104
|
+
Set in `config.<env>.ini`:
|
|
105
|
+
|
|
106
|
+
- **AWS SES** SMTP (`[email]`) for outbound mail; from-name branded "Office Depot" on some
|
|
107
|
+
envs. Confirmation-email HTML is built with a Stripo template.
|
|
108
|
+
- **OptimumDesk / Easeedesk** (`[optimumdesk]`) — `promo_support_order/create` endpoint.
|
|
109
|
+
- **HP PQWS** (`[hp_pqws]`) — HPE/HPI warranty product/serial lookup web services (mutual
|
|
110
|
+
TLS client certs).
|
|
111
|
+
- **Vision portal / ITAD portal / punchout** (`[portal]`, `[punchout]`) URLs.
|
|
112
|
+
|
|
113
|
+
## Build, environments & deploy
|
|
114
|
+
|
|
115
|
+
- **AWS Elastic Beanstalk** (PHP platform). `.ebextensions/` configures: HTTP→HTTPS
|
|
116
|
+
redirect, export/cache folders, custom `php.ini`, **Redis sessions**, request-timeout
|
|
117
|
+
fix, **Composer install**, **git-based pull of the `library` core** (`020_setup_git_libraries.config`
|
|
118
|
+
+ `ebs/git.json`), and **registration to a shared Application Load Balancer**.
|
|
119
|
+
- Many environments: `config.alpha|beta|demo|stage|test|hotfix|prod.ini` plus per-dev
|
|
120
|
+
`config.dev-*.ini`.
|
|
121
|
+
- Recent work (2025): Sentry integration, composer.json added, EB shared-ALB + name
|
|
122
|
+
truncation, alpha RDS endpoint fix.
|
|
123
|
+
|
|
124
|
+
## Gotchas / known issues
|
|
125
|
+
|
|
126
|
+
- **`config.*.ini` are committed to git** (`.gitignore` only excludes `.DS_Store`), and
|
|
127
|
+
they contain live credentials (RDS, AWS SES SMTP keys, OptimumDesk, HP cert passwords).
|
|
128
|
+
Treat them as committed secrets — see the constant/section names in `config.prod.ini`
|
|
129
|
+
for *where* a credential lives; never copy values out. If the repo is/was public, rotate.
|
|
130
|
+
- The warranty form's datepicker is hard-coded to a **2017-07-23 → 2018-12-31** purchase
|
|
131
|
+
window (`iframe.php`) — a leftover from the original promo that makes the live form look
|
|
132
|
+
stale; revisit if the form is reused.
|
|
133
|
+
- The desktop footer in `app/template.php` embeds a verbatim copy of Walmart.com's global
|
|
134
|
+
footer markup (Walmart CSS classes, nav links, `© Walmart. All Rights Reserved.`). It is
|
|
135
|
+
decorative/co-branding, not a live Walmart integration.
|
|
136
|
+
- `library` is **not** vendored — it is pulled at deploy via `ebs/git.json`. Local dev
|
|
137
|
+
needs the `library` core checked out alongside.
|
|
138
|
+
|
|
139
|
+
## Change history
|
|
140
|
+
|
|
141
|
+
- 2026-06-15 — Initial architecture doc; repo onboarded to registry (1.0 app, dependsOn library) (mhammontree)
|
package/knowledge/INDEX.md
CHANGED
|
@@ -9,6 +9,7 @@ _Auto-generated by `knowledge.js index`. Do not hand-edit._
|
|
|
9
9
|
- **togadesk** (TOGa Desk) — 7 doc(s) → [1.0/apps/togadesk/INDEX.md](1.0/apps/togadesk/INDEX.md)
|
|
10
10
|
- **togaview** (TOGa View) — 5 doc(s) → [1.0/apps/togaview/INDEX.md](1.0/apps/togaview/INDEX.md)
|
|
11
11
|
- **webhook** (Webhook) — 1 doc(s) → [1.0/apps/webhook/INDEX.md](1.0/apps/webhook/INDEX.md)
|
|
12
|
+
- **walmarttechservices** (Walmart Tech Services) — 1 doc(s) → [1.0/apps/walmarttechservices/INDEX.md](1.0/apps/walmarttechservices/INDEX.md)
|
|
12
13
|
|
|
13
14
|
## 2.0 framework
|
|
14
15
|
|
|
@@ -114,6 +114,15 @@ Compass Canada (`Model/Compass/Canada/`) is a separate sub-client. The Compass c
|
|
|
114
114
|
- **Idempotency:** every tracking attach is guarded by a SELECT-before-POST on the bridge table,
|
|
115
115
|
so re-POSTing the same ASN does not duplicate `ItemFulfillment(s|Items|ItemUnits)_TrackingNumbers`
|
|
116
116
|
rows. New attach helpers depend on this — keep the guard if extending.
|
|
117
|
+
- **UUID is the reference field between helpers — never the API-returned `id` (refactored
|
|
118
|
+
2026-06-15).** `internalApiRequest` create/lookup responses do **not** reliably include the
|
|
119
|
+
integer `id` (only `uuid`), so `resolveOrCreateItemFulfillment` / `createItemFulfillmentItem`
|
|
120
|
+
return `['uuid' => …]` only, and the in-method maps (`$trackingTargets`, keyed by IFI uuid;
|
|
121
|
+
`$packageTrackingByItemFulfillment`, keyed by IF uuid) are uuid-keyed. The integer PK needed
|
|
122
|
+
for a bridge-existence check is resolved **locally** inside each attach helper via
|
|
123
|
+
`SELECT id … WHERE uuid = '…'` (uuid run through `_Database::escape()`), mirroring the existing
|
|
124
|
+
`attachUnitTrackingIfMissing` pattern. When extending: pass uuids between helpers; resolve the
|
|
125
|
+
id only where a bridge `SELECT` needs it — do not reintroduce reliance on a returned `id`.
|
|
117
126
|
- **Record 217 ACL gap (fixed 2026-06-11):** `AdvanceShippingNoticeItems_TrackingNumbers`
|
|
118
127
|
(Record 217) had **zero** `AclRecordPermissions` and its `advanceShippingNoticeItemId`
|
|
119
128
|
(RecordField 1440) / `trackingNumberId` (1441) fields had **zero** `AclFieldPermissions`,
|
|
@@ -137,6 +146,10 @@ Compass Canada (`Model/Compass/Canada/`) is a separate sub-client. The Compass c
|
|
|
137
146
|
|
|
138
147
|
## Change history
|
|
139
148
|
Dated one-liners, newest first.
|
|
149
|
+
- 2026-06-15 — `postPost` + helpers refactored so **UUID is the reference field**, dropping all
|
|
150
|
+
reliance on the integer `id` returned from `internalApiRequest` (not always present). Helper
|
|
151
|
+
returns are uuid-only; `$trackingTargets`/`$packageTrackingByItemFulfillment` are uuid-keyed;
|
|
152
|
+
attach helpers resolve the bridge-check PK locally from the uuid. No behavior change. (jcardinal)
|
|
140
153
|
- 2026-06-15 — `postPost` rewritten to reconcile ASN tracking onto **existing** fulfillment
|
|
141
154
|
(not just newly-created IFs), idempotently; fixes lost tracking when the SO was fulfilled
|
|
142
155
|
out-of-band before the ASN (e.g. SA132781). Confirmed NULL `unitId` is by-design for Office
|
package/knowledge/registry.json
CHANGED
|
@@ -12,5 +12,6 @@
|
|
|
12
12
|
{ "repo": "togaview", "project": "TOGa View", "framework": "1.0", "role": "app", "dependsOn": [] },
|
|
13
13
|
{ "repo": "toga2-hub", "project": "TOGa Hub", "framework": "2.0", "role": "app", "dependsOn": ["api2"] },
|
|
14
14
|
{ "repo": "togatech", "project": "TOGA Technology Website", "framework": "standalone", "role": "app", "dependsOn": [] },
|
|
15
|
-
{ "repo": "webhook", "project": "Webhook", "framework": "1.0", "role": "app", "dependsOn": ["library"] }
|
|
15
|
+
{ "repo": "webhook", "project": "Webhook", "framework": "1.0", "role": "app", "dependsOn": ["library"] },
|
|
16
|
+
{ "repo": "walmarttechservices", "project": "Walmart Tech Services", "framework": "1.0", "role": "app", "dependsOn": ["library"] }
|
|
16
17
|
]
|
package/package.json
CHANGED