Promotion Archival & Lifecycle
Introduction
Promotions on the Fynd Platform follow an automatic lifecycle that archives expired or stale promotions and cleans up associated caches. This keeps the active promotion list performant and manageable while preserving historical data.
The promotion archival process differs slightly from coupon archival in its timing thresholds and cache cleanup behaviour.
Promotion Lifecycle Stages
┌────────┐ ┌────────┐ ┌──────────┐
│ DRAFT │────▶│ REVIEW │────▶│ APPROVED │
└────────┘ └────────┘ └──────────┘
│ │ │
│ │ │ (expires)
│ │ ▼
│ │ ┌──────────┐
│ ├─────────▶│ REJECTED │
│ │ └──────────┘
│ │ │
│ (30 days) │ (30 days) │ (30 days)
▼ ▼ ▼
┌──────────────────────────────────────┐
│ ARCHIVED │
└──────────────────────────────────────┘
│
│ (1 year)
▼
┌──────────────────────────────────────┐
│ EXPORTED & DELETED │
└───────────────────────── ─────────────┘
Archival Rules
Promotions are automatically archived based on their status and age:
Approved, Review, and Rejected Promotions (Expired)
- Condition: Both the scheduled start date and end date are more than 30 days in the past.
- Trigger: Automatic background job runs periodically.
- What happens: The promotion is moved from the active collection to the archived collection.
Draft Promotions (Stale)
- Condition: The promotion was last modified more than 30 days ago.
- Trigger: Same automatic background job.
- What happens: The promotion is moved to the archived collection.
| Status | Archival Trigger | Threshold |
|---|---|---|
| Approved | Both start and end dates have passed | 30 days after both dates |
| Review | Both start and end dates have passed | 30 days after both dates |
| Rejected | Both start and end dates have passed | 30 days after both dates |
| Draft | Last modified date | 30 days of inactivity |
The archival threshold for promotions (30 days for all statuses) is configurable per application. The default is 30 days, but it can be customised through the admin cart configuration setting promotion_archive_after_days.
What Happens During Archival
When a promotion is archived:
- Data is preserved — The full promotion document is moved to the archived collection.
- Promo keys are cleared — Cached promotion-item mapping keys are removed.
- Promotion count is updated — The cached promotion count for the application is decremented.
- Item-promotion cache is cleaned — If the promotion was approved and had been processed, the system triggers a cache deletion event to remove item-promotion mappings from the preprocessed cache. This is an additional cleanup step that doesn't apply to coupons.
- The promotion is removed from the active listing.
Active Deactivation (Separate Process)
In addition to archival, a separate background job runs to deactivate expired promotions:
- Condition: The promotion's end date has passed (regardless of how recently).
- What happens:
- Promotion-item cache keys are removed from the preprocessed cache.
- The promotion is removed from the active collection.
- Purpose: Ensures expired promotions stop applying to customer carts immediately, without waiting for the 30-day archival window.
Active deactivation is separate from archival. It ensures that expired promotions stop being applied to carts in real-time, while archival handles the longer-term cleanup and data management.
Viewing Archived Promotions
You can view archived promotions by filtering the promotion list:
-
In the platform sidebar, expand your sales channel under SALES CHANNEL, click Marketing, then click Offers. Select the Promotions tab.
-
Use the Status filter and select Archived to view all archived promotions.
Archived promotions are displayed with an Archived badge and are read-only in the listing view.
Restoring an Archived Promotion
An archived promotion can be restored by recreating it with the same identifier:
- The promotion is moved back from the archived collection to the active collection.
- The promotion count cache is updated.
- Item-promotion cache mappings may be rebuilt on the next cart calculation.
- The promotion becomes available in the active listing.
After restoration, update the schedule (start and end dates) to make the promotion active again. The original dates will have passed.
Permanent Deletion
Promotions that have been in the archived state for more than 1 year are permanently deleted:
- The archived promotion data is exported to an encrypted, compressed file.
- The file is uploaded to secure cloud storage.
- After successful upload, the promotion is deleted from the archived collection.
- If the upload fails, the promotion remains in the archived collection.
Differences from Coupon Archival
| Aspect | Coupon Archival | Promotion Archival |
|---|---|---|
| Approved — archival threshold | 1 day after end date | 30 days after both start and end dates |
| Draft/Review/Rejected — threshold | 30 days after last modification | 30 days after last modification |
| Configurable threshold | No | Yes — per-application via promotion_archive_after_days |
| Cache cleanup on archival | Count cache only | Count cache + item-promotion preprocessed cache |
| Active deactivation | Not applicable | Separate process removes expired promotions from cache immediately |
Summary
| Stage | Duration | Data Status | User Access |
|---|---|---|---|
| Active | While valid | In active collection | Full CRUD |
| Deactivated | Immediately after expiry | Removed from active, cache cleaned | Not applicable |
| Archived | Up to 1 year | In archived collection | View and restore |
| Deleted | After 1 year in archive | Exported to cloud storage | Not accessible from platform |