Skip to content

Instantly share code, notes, and snippets.

View ARSHADKHAN615's full-sized avatar
🎯
Focusing

Arshad Ali ARSHADKHAN615

🎯
Focusing
View GitHub Profile
---
name: Per-day price campaigns
overview: Shift Google price automation from one batch-wide campaign (cheapest day wins) to one campaign per stay night, with daily cron rolling the reach window forward (6 updates + 1 create per run). Property-level Hotel summary keeps the highest discount across the batch; legacy wide campaigns and nights that fall off the window are deactivated.
todos:
- id: finalize-per-day
content: Refactor FinalizePriceAutomationBatch to loop stored logs, call getMinimumPricesByChannel per check_in with exactDate/reachDays=1/log id, aggregate max discount for property summary
status: completed
- id: campaign-per-night
content: Update PriceComparisonService updateOrCreateCampaign/deactivateExistingCampaign + legacy wide-campaign cleanup for stay-date-scoped campaigns
status: completed