← back to Designer Wallcoverings

COMPLETED-PROCESSES.md

251 lines

# Completed Processes & Learnings

**Last Updated:** 2026-02-01 19:40:00 UTC

---

## Summary

| Metric | Value |
|--------|-------|
| Total Processes | 5 |
| Total Products Updated | 3,107+ |
| Completed | 2 |
| Ongoing | 2 |
| Partial | 1 |
| Active Vendors | Thibaut, Koroseal, Maya Romanoff, Ralph Lauren |

---

## Process Reference (IDs for API calls)

| ID | Name | Vendor |
|----|------|--------|
| `thibaut-bulk-update` | Thibaut Wallcoverings Bulk Update | Thibaut |
| `koroseal-enhanced-update` | Koroseal Enhanced Product Update | Koroseal |
| `koroseal-activation` | Koroseal Product Activation | Koroseal |
| `architectural-wallcoverings-update` | Architectural Wallcoverings Bulk Update | Multiple |
| `ralph-lauren-fabric-update` | Ralph Lauren Fabric Update | Ralph Lauren |

---

## Process History

### 1. Thibaut Wallcoverings Bulk Update

| Property | Value |
|----------|-------|
| **ID** | `thibaut-bulk-update` |
| **Status** | ✅ COMPLETED |
| **Vendor** | Thibaut |
| **Products Updated** | 2,539 |
| **Duration** | ~10 hours |
| **Completed At** | 2026-01-31 06:01:55 UTC |
| **Agent** | dw-thibaut-updater (Port 9902) |

#### Title Format
```
{Pattern} {Colorway} | Thibaut Wallcoverings
```
Example: `Travelers Palm Green | Thibaut Wallcoverings`

#### SEO Title Format
```
{Pattern} {Colorway} ({MFR-SKU}) | Architectural Wallcoverings
```
Example: `Travelers Palm Green (T10127) | Architectural Wallcoverings`

#### Color Source Priority
1. **Thibaut website `<title>` tag** (most reliable)
   - Format: `PATTERN Wallcoverings (SKU) – COLORWAY | Thibaut`
2. Fallback to handle parsing
3. AI color analysis (Gemini 3.0) for tags only

#### Key Learnings
- Extract colorways from `<title>` tag, NOT from img alt attributes
- Use pagination (20 pages max, 250 per page) to fetch all 3,371 Thibaut products
- Skip already-updated SKUs using local JSON tracking file
- Convert "all" batch size to 10000 limit in API handler
- Title Case all pattern names and colorways
- Gemini 3.0 for AI color/style analysis
- Playwright for website scraping

#### Metafields Updated
- `custom.manufacturer_sku`
- `dwc.manufacturer_sku`
- `dwc.pattern_name`
- `dwc.color`
- `dwc.background_color`
- `global.title_tag`
- `global.description_tag`
- `dwc.ai_generated_colors` (list)
- `dwc.ai_generated_tags` (list)
- `dwc.ai_generated_description`

#### Errors
- 4 products failed (network timeouts/scrape failures)

---

### 2. Koroseal Enhanced Product Update

| Property | Value |
|----------|-------|
| **ID** | `koroseal-enhanced-update` |
| **Status** | 🔄 ONGOING (Cron) |
| **Vendor** | Koroseal |
| **Products Updated** | Varies |
| **Schedule** | Every 20 minutes |
| **Agent** | koroseal-enhanced-update (Port 9897) |

#### Title Format
```
{Pattern} {Color} ({MFR-SKU}) | Architectural Wallcoverings
```

#### Color Source Priority (CRITICAL)
1. **TAK Specialty Spreadsheet** (for TAK-* SKUs) - ALWAYS FIRST
2. **Type II Vinyl Spreadsheet** (for other SKUs)
3. Scraped colorName from Koroseal website
4. AI analysis (ONLY if no spreadsheet data exists)

#### Spreadsheet URLs
- **TAK Specialty**: https://docs.google.com/spreadsheets/d/1EjqtPSo9hqTai_UHW-iLVzaglOTHUdQxDmbjz3vnU8A
- **Type II Vinyl**: https://docs.google.com/spreadsheets/d/1FYG7TGUUiim_RL25YJx5R9tBcgL3ilFlLy3dQISVSMo

#### Key Learnings
- NEVER use AI/Gemini for colors when spreadsheet has the data
- Prefix search fallback: `SG13-02` not found → search `SG13`
- Add "Review" tag if SKU not found on Koroseal website
- Title Case conversion for all pattern/color names
- Save skipped/failed products to PostgreSQL for review

---

### 3. Koroseal Product Activation

| Property | Value |
|----------|-------|
| **ID** | `koroseal-activation` |
| **Status** | 🔄 ONGOING |
| **Vendor** | Koroseal |
| **Products Activated** | 91 |
| **Progress** | 91/91 |
| **Schedule** | Cron (every 20 min) |

#### Key Learnings
- Activate draft Koroseal products after verification
- Check against TAK/Type II spreadsheets before activation
- Add to active collection after activation

---

### 4. Architectural Wallcoverings Bulk Update

| Property | Value |
|----------|-------|
| **ID** | `architectural-wallcoverings-update` |
| **Status** | 🔄 ONGOING |
| **Vendor** | Multiple (Koroseal, etc.) |
| **Products Updated** | 244 |

#### Title Format
```
{Pattern} {Color} ({MFR-SKU}) | Architectural Wallcoverings
```

#### Key Learnings
- Handle parsing priority: Tags > SKU patterns
- Use Google Spreadsheets for TAK/Type II colors
- Add "Review" tag for products not found on vendor site

---

### 5. Ralph Lauren Fabric Update

| Property | Value |
|----------|-------|
| **ID** | `ralph-lauren-fabric-update` |
| **Status** | ✅ COMPLETED |
| **Vendor** | Ralph Lauren |
| **Products Updated** | 233 |
| **User Stories** | US-001 through US-010 completed |

#### Title Format
```
{Pattern} {Color} | Ralph Lauren Fabrics
```

#### Key Learnings
- Extract fabric specifications from Ralph Lauren website
- Handle wide-width and narrow-width fabric variants
- Update content/material composition metafields

---

## Technical Reference

### Gemini 3.0 Configuration
```typescript
const GEMINI_API_KEY = '${GOOGLE_API_KEY}';
const GEMINI_MODEL = 'gemini-3.5-flash';
const GEMINI_ENDPOINT = 'https://generativelanguage.googleapis.com/v1beta/models/gemini-3.5-flash:generateContent';
```

### Shopify Configuration
```typescript
const SHOPIFY_STORE = 'designer-laboratory-sandbox.myshopify.com';
const SHOPIFY_API_VERSION = '2024-01';
```

### PostgreSQL Database
```
Host: 127.0.0.1
Database: dw_unified
User: dw_admin
```

---

## Agent Ports Reference

| Agent | Port | URL |
|-------|------|-----|
| Thibaut Updater | 9902 | http://45.61.58.125:9902 |
| Koroseal Enhanced | 9897 | http://45.61.58.125:9897 |
| Maya Romanoff | 9903 | http://45.61.58.125:9903 |
| Architectural Updater | 9897 | http://45.61.58.125:9897 |

**Auth:** admin / see `BASIC_AUTH` env var (secrets-manager)

---

## API Endpoint

**View All Completed Processes:**
```bash
curl http://45.61.58.125:7400/api/completed-processes
```

**Response Fields:**
- `processes[]` - Array of process objects
- `processes[].id` - Unique process ID (use for reference)
- `processes[].name` - Human-readable name
- `processes[].vendor` - Vendor name
- `processes[].status` - completed | ongoing | partial
- `processes[].progress` - X/Y format for ongoing processes
- `processes[].productsUpdated` - Count of products updated
- `processes[].learnings[]` - Array of key learnings
- `totals` - Summary statistics

---

## Dashboard

View all completed processes in DW Central:
**http://45.61.58.125:7400** → "Completed Processes & Learnings" section

---

*This file is auto-generated and updated when processes complete.*