Legacy pricing updates for 10k+ products
The problem
The ask was simple on paper: automate pricing updates for a large catalog so staff could stop chasing SKUs by hand. The reality was messier — prices lived in a Rocket D3 / Pick-style legacy system, while the live storefront ran on Miva with several product setup types (master products, option and unit variants, and volume/quantity breaks). Every change meant manual lookups across systems that did not talk to each other.
How we solved it
We did not rip out Rocket D3 or rebuild Miva. The bridge started in the legacy stack: D3 was configured to write current price changes into a SQL table (base price and quantity-break tiers). That gave us a clean, queryable feed without fighting Pick files directly from the storefront side.
A PowerShell job connects to that table over ODBC (DSN pointed at D3), pulls the open change set, and optionally dumps the raw rows to CSV for audit and replay. Each row’s product ID is parsed into the pieces Miva cares about — full SKU, base product code, option code, and unit of measure.
Then the script asks Miva what kind of product it is dealing with and updates accordingly. Master products get a direct Product_Update. Variant products load their dimensions and match on option and/or unit (strict two-dimension match when both exist, single-dimension fallback when the variant only has one). That same price is applied to both the 10-digit child SKU and the 7-digit parent when variants live at either level.
Volume pricing is a second pass: all quantity tiers for a product are grouped, the script finds which Miva discount_volume price group the product belongs to, and pushes a ProductPricingTable through Miva’s Rest API. When the run finishes, an email summary reports master, variant, and volume successes and failures so ops can trust the batch without watching the console.
Rocket D3
Legacy system
SQL
Price rows
PowerShell
Parse & classify
Miva Paths
Master · variant · volume
Miva Store
Live + email
Master
Product_Update on full SKU
Variants
Option + unit on 7 / 10 digit
Volume
discount_volume tier tables
Rocket D3 → SQL. Rocket D3 writes base prices and quantity-break tiers into a shared SQL table — a clean feed instead of trapped Pick files.
PowerShell → Miva Rest API
function Send-MivaRequest {
param([hashtable]$Body)
$json = $Body | ConvertTo-Json -Depth 5 -Compress
# Pad Base64 key if needed
$remainder = $signingKey.Length % 4
if ($remainder -ne 0) {
$paddedKey = $signingKey + ('=' * (4 - $remainder))
} else {
$paddedKey = $signingKey
}
$keyBytes = [Convert]::FromBase64String($paddedKey)
$hmac = [System.Security.Cryptography.HMACSHA256]::new($keyBytes)
$sig = [Convert]::ToBase64String($hmac.ComputeHash([Text.Encoding]::ASCII.GetBytes($json)))
$headers = @{
"Content-Type" = "application/json"
"X-Miva-API-Authorization" = "MIVA-HMAC-SHA256 $apiToken`:$sig"
}
try {
$response = Invoke-RestMethod -Method Post -Uri "https://www.example.com/mm5/json.mvc" `
-Headers $headers -Body $json -ErrorAction Stop
return $response
}
catch {
Write-Log "API ERROR: $($_.Exception.Message)" "ERROR"
return $null
}
}Results
- Automated pricing for 10,000+ products from D3 → Miva
- One run handles master, variant, and volume pricing setups
- Owners recovered 10–20 hours per week of busywork