Digital Goods Prices Automatically कैसे Sync करें
संक्षिप्त उत्तर
Digital goods wholesale prices बदलती हैं — खासकर FX exposure वाले region-specific products के लिए। Automatic price sync का मतलब है supplier के price endpoint को schedule पर query करना, current retail prices से compare करना, और target margin बनाए रखने के लिए retail prices adjust करना। Sync के बिना wholesale price increase चुपचाप margin खा जाती है; wholesale price decrease का मतलब है unnecessary margin छूटना।
परिभाषा: Digital goods के लिए automatic price sync एक scheduled process है जो supplier API से current wholesale prices query करता है और store में retail prices update करता है ताकि बिना manual intervention के defined margin band maintain हो।
मुख्य निष्कर्ष: Manual price management 10 SKUs के लिए काम करता है। 100+ के लिए fail होता है, और FX-linked pricing वाले products (Steam Turkey, regional cards) के लिए completely fail होता है। Price sync को जल्दी automate करें।
यह Guide किसके लिए है
- Developers जो digital goods store build कर रहे हैं और price management implement करना है
- Store operators जो बड़े catalogs manage करते हैं और currently manually prices update करते हैं
- Marketplace operators जो अपने platform पर digital goods add कर रहे हैं
Prices क्यों बदलती हैं
| कारण | Frequency | Affected Products |
|---|---|---|
| Supplier wholesale rates adjust करता है | Occasional (monthly या कम) | सभी products |
| FX rate changes | Daily (volatile pairs के लिए) | TRY, BRL, regional cards |
| Platform policy game pricing बदलती है | Rare | Game-specific SKUs |
| Supplier promotional pricing | Occasional | Varies |
| नए product additions | Ongoing | New SKUs |
USD-denominated products (US Steam, US PSN) के लिए price changes infrequent हैं। TRY-denominated products (Turkey Steam) के लिए prices week to week significantly shift हो सकती हैं।
Price Sync Architecture
Option A: Full Price Pull (Simple)
Scheduled job (daily या twice daily):
1. GET /prices — सभी current wholesale prices fetch करें
2. Catalog में हर SKU के लिए:
a. Current wholesale price को stored price से compare करें
b. अगर बदली: target margin पर retail price recalculate करें
c. Store में retail price update करें
3. Audit के लिए सभी price changes log करें
Option B: Per-Order Price Query (Accurate but Expensive)
Order creation time पर:
1. GET /prices/:sku — इस SKU के लिए current wholesale price fetch करें
2. Verify करें कि customer को charged retail price wholesale + margin cover करती है
3. अगर wholesale price retail − margin से ऊपर बढ़ी: review के लिए flag करें
यह सबसे accurate है लेकिन हर order पर API load create करता है। Option A के साथ safety check के रूप में use करें, primary sync mechanism के रूप में नहीं।
Option C: Webhook-Triggered Sync (Ideal)
अगर supplier price change webhooks offer करता है:
Webhook: price.changed
→ Affected SKU retail prices immediately update करें
सभी suppliers price webhooks offer नहीं करते। इस पर design करने से पहले check करें।
Retail Price Recalculation Formula
Wholesale price बदलने पर target margin formula से retail recalculate करें:
New retail price = New wholesale cost ÷ (1 − Payment fee% − FX buffer% − Target margin%)
फिर business rules apply करें:
- Market-friendly price point पर round up करें (जैसे $9.99, $9.87 नहीं)
- Retail को floor price से नीचे न जाने दें (competitive minimum)
- Alert अगर new retail competitors से X% से अधिक higher होनी पड़े
Price Change Alert Thresholds
जब wholesale price defined thresholds से अधिक बदले तो alerts set करें:
| Change | Alert Level |
|---|---|
| Wholesale up ≤1% | Log only |
| Wholesale up 1–3% | Retail silently update करें; log |
| Wholesale up >3% | Retail update करें; ops alert भेजें |
| Wholesale down >3% | Retail update करें; competitive position review करें |
| Wholesale down >10% | Alert — possible catalog error या supplier change |
FX-Linked Products: Special Handling
Volatile currencies (TRY, BRL) में priced products के लिए:
- Price endpoint minimum daily poll करें — FX-linked prices 24 hours में significantly बदल सकती हैं
- FX-implicit price separately store करें — wholesale cost को TRY और USD दोनों में track करें
- Wider FX buffer set करें — TRY के लिए 6–10%, BRL के लिए 2–4%
- Large moves पर alert करें — अगर TRY/USD एक week में >5% move करे तो सभी TRY-linked prices audit करें
Implementation Checklist
- Supplier का price endpoint identify करें (GET /prices या per-SKU)
- Scheduled price pull job setup करें (minimum daily; FX-volatile products के लिए twice daily)
- Database में SKU per wholesale price timestamp के साथ store करें
- Margin formula use करके retail price recalculation implement करें
- Rounding rules apply करें (market-friendly price points)
- Minimum floor prices set करें (competitive minimum से नीचे न जाएं)
- सभी price changes timestamp और before/after values के साथ log करें
- Large wholesale price changes (>3%) पर alert करें
- FX-linked products के लिए: daily poll और larger FX buffer
- Production से पहले staging में price update flow test करें
