ferrero-opentext/Python-Version/scripts/shared
DJP 8ee165a0c1 Add A5→A6 rework workflow automation (Python)
Completes all 4 Python automation scripts for Ferrero DAM workflows.

New Features:
- A5→A6 script for rework asset downloads
- Separate Box folder for revisions (349441822875)
- Folder naming with -Revisions suffix
- Smart tracking ID lookup/reuse for existing assets
- Email notifications for success and partial completion

Changes:
1. NEW: scripts/a5_to_a6_download.py
   - Downloads rework assets from campaigns with status A5
   - Uploads to Box Revisions folder with tracking IDs
   - Updates status A5→A6 when all assets succeed
   - No webhook (rework workflow)
   - Logs to logs/a5_to_a6.log

2. EDIT: shared/database.py
   - Added find_or_create_tracking_id() method
   - Searches by opentext_id + local_campaign_id
   - Reuses existing tracking IDs from A1→A2 workflow
   - Prevents duplicate entries for same asset/campaign

3. EDIT: shared/notifier.py
   - Added a5_to_a6_complete email template
   - Added a5_to_a6_partial email template
   - Shows "(Updated existing)" indicator for reused IDs

Tested:
✓ All connections working (DAM, Box, Database)
✓ Script executes correctly
✓ Log file created successfully
✓ Found 2 A5 campaigns in test

All 4 Python workflows now complete:
✓ A1→A2 (Master Assets)
✓ A2→A3 (Upload from Box)
✓ A5→A6 (Rework Assets)
✓ B1→B2 (Global Masters)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-04 13:36:35 -05:00
..
__pycache__ Add HANDOFF_NEXT_SESSION.md - Complete session handoff document 2025-11-04 12:30:36 -05:00
__init__.py Start Python automation - Foundation components 2025-10-30 16:38:26 -04:00
box_client.py Fix Box metadata template name - Use correct lowercase name and field names 2025-11-03 14:34:17 -05:00
config_loader.py Start Python automation - Foundation components 2025-10-30 16:38:26 -04:00
dam_client.py Fix B1→B2 workflow - Correct function name and search for Global comm campaigns 2025-11-03 13:47:20 -05:00
database.py Add A5→A6 rework workflow automation (Python) 2025-11-04 13:36:35 -05:00
filename_parser.py Complete Python automation implementation - All components built 2025-10-30 16:49:14 -04:00
metadata_extractor_mvp.py Add Box metadata extraction for CreativeX fields in A2→A3 workflow 2025-11-03 14:26:00 -05:00
notifier.py Add A5→A6 rework workflow automation (Python) 2025-11-04 13:36:35 -05:00