← back to Designer Wallcoverings
DW-Agents/dw-agents/ARCHITECTURAL-UPDATE-PROGRESS.md
135 lines
# Architectural Wallcoverings Vendor Update System - Progress Log
## Project Overview
- **Agent Port**: 9897
- **URL**: http://45.61.58.125:9897
- **Auth**: admin / see `BASIC_AUTH` env var (secrets-manager)
- **PM2**: dw-architectural-update
- **Directory**: /root/Projects/Designer-Wallcoverings/DW-Agents/dw-agents/
---
## Session: 2026-01-22
### Key Accomplishments
1. ✅ Created PRD with confirmed specifications
2. ✅ Built web viewer UI with vendor dropdown
3. ✅ Added collections dropdown to UI
4. ✅ Integrated Agent-SKU skill for manufacturer data
5. ✅ Integrated Interior Designer color tag skill
6. ✅ Created product update engine with title formatting
7. ✅ Added batch controls and process history
8. ✅ Fixed update engine to use real manufacturer data from Koroseal website
9. ✅ Added image sync from manufacturer website
10. 🔄 Testing with products that have full manufacturer data in handles
### Critical Learnings
#### Shopify Configuration (CRITICAL - MEMORIZE!)
```
Store: designer-laboratory-sandbox
Admin URL: https://admin.shopify.com/store/designer-laboratory-sandbox/
API Domain: designer-laboratory-sandbox.myshopify.com
Access Token: shpat_REDACTED
API Version: 2024-01
⚠️ NEVER USE: designerwallcoverings.myshopify.com - This domain does NOT work!
✅ ALWAYS USE: designer-laboratory-sandbox.myshopify.com
```
#### Title Format Requirements
```
WITH MFR#: Pattern Name Color (Real-MFR#) | Architectural Wallcoverings
WITHOUT MFR#: Pattern Name Color | Architectural Wallcoverings
WRONG: () | (DWK-31482-Sample) | Architectural Wallcoveri
RIGHT: Rememberance Lite Canfu (2R15-21) | Architectural Wallcoverings
```
#### Data Sources (Priority Order)
1. **Handle** - Primary source for pattern, color, SKU
2. **Tags** - Secondary source for manufacturer data
3. **SKU Mappings** - Fallback only
#### Handle Formats
```
LIVE FORMAT:
dwk-30865-koroseal-koroseal-type-2-vinyl-2r15-21-rememberance-lite-canfu
→ Pattern: Rememberance Lite, Color: Canfu, SKU: 2R15-21
SANDBOX FORMAT:
adalyn-weave-cloud-wallcovering-al21-05-sample-architectural-wallcoverings
→ Pattern: Adalyn Weave, Color: Cloud, SKU: AL21-05
```
#### Koroseal SKU Patterns
- `AL21-15` - Letter-number format
- `C921-10` - Letter-number format
- `2R15-21` - Number-letter-number format
- `TAK-DA01-01` - Letter-letter-number format
### Problems Encountered
1. **Corrupted Sandbox Products**
- Products like DWK-31482 had short handles with no manufacturer data
- Tags were minimal, only contained "Sample", "Koroseal"
- These were corrupted by a previous bad update - cannot be fixed without re-importing
2. **Wrong Shopify Domain**
- `designerwallcoverings.myshopify.com` does NOT work for API calls
- Wasted time trying different tokens before realizing domain was wrong
3. **Title Extraction Failing**
- Original code couldn't extract from corrupted products
- Fixed by adding handle parsing for products with full handles
### Key Code Functions
#### extractDataFromTags()
```typescript
// Extracts manufacturer SKU, pattern name, color from product tags
// SKU patterns: AL21-15, C921-10, 2R15-21, TAK-DA01-01
```
#### parseHandleForPatternAndColor()
```typescript
// Handles TWO formats:
// - LIVE: dwk-XXXXX-vendor-...-sku-pattern-color
// - SANDBOX: pattern-color-wallcovering-sku-sample-...
```
#### extractManufacturerData()
```typescript
// Priority: Handle > Tags > SKU mappings
// Combines data from all sources to get complete manufacturer info
```
### Files Modified
- `/root/claude/agents/dw-agents/architectural-update-agent.ts` - Main agent
- `/root/Projects/Designer-Wallcoverings/CLAUDE.md` - Added Shopify config
- `/root/Projects/Designer-Wallcoverings/DW-Agents/dw-agents/ARCHITECTURAL-UPDATE-PROGRESS.md` - This file
### Next Steps
1. Test on products with full manufacturer data in handles
2. Verify title generation works end-to-end
3. Run batch update on Koroseal products
4. Expand to other vendors
### User Instructions
- "test on live store" - Test the agent on live Shopify store
- "the mfr number is in the tags on shopify!!" - Key discovery about data location
- "NEVER USE designerwallcoverings.myshopify.com" - Critical API domain warning
---
## Notes for Future Sessions
- Always check product handles for manufacturer data FIRST
- Sandbox and Live stores use different handle formats
- The agent is designed to work with products that have complete handles
- Corrupted products (short handles, no tags) cannot be processed
## Related Resources
- Letsbegin UI: http://45.61.58.125:7300
- Ralph Progress: /scripts/ralph/progress.txt
- Interior Designer Tagger: /root/Projects/Designer-Wallcoverings/DW-Programming/ImportNewSkufromURL/dwjs-ai-retag.ts