Automating Gold & Diamond Jewelry Pricing in Shopify - A Smarter Approach for Indian Retailers

Problem Statement for Gold & Diamond Jewelry Retailers in India

Gold and diamond jewelry retailers in India face a recurring challenge: daily price fluctuations in raw materials like gold, silver, and diamonds. Traditional jewelry businesses usually compute the final price using:

Shopify by default does not support:

This leads to manual work for Indian jewelry retailers and risks inaccurate pricing in a highly competitive online jewelry market.

Existing Third-Party Shopify Tools

Several Shopify apps help automate jewelry pricing, but they come with limitations.

🔎 Comparison of Popular Shopify Apps

App NameFeaturesPricing (Approx)Limitations for Indian Market
Gold Price UpdaterFetches live gold prices, updates product prices$49–$99/monthLimited customization, INR rates not always supported
Dynamic Product PricingFormula-based pricing, bulk update features$29–$79/monthComplicated setup, limited support for jewelry categories
Discount Manager AppsRun store-wide discounts, time-based sales$19–$49/monthNot integrated with real-time gold prices
Jewelry Pricing PluginsTailored for gold/silver jewelry pricing in western markets$99–$199/monthExpensive, not optimized for Indian jewelry pricing rules

Issues:

Our Smarter Solution (India-Focused)

Instead of relying on expensive third-party apps, we built a lightweight, customizable solution using:

✅ Hosting & Features

Cost savings of >80% compared to commercial Shopify apps.

Implementation Details

Fetching Real-Time Gold/Silver Prices with MetalAPI

function fetchMetalRates() {
  const url = "https://metals-api.com/api/latest?access_key=YOUR_KEY&base=INR&symbols=XAU,XAG";
  const response = UrlFetchApp.fetch(url);
  const data = JSON.parse(response.getContentText());

  const goldRate = data.rates.XAU; // Gold price in INR per ounce
  const silverRate = data.rates.XAG; // Silver price in INR per ounce

  return { goldRate, silverRate };
}

(Note: Conversion from ounce → gram can be done: 1 troy ounce = 31.1035 grams)

Shopify GraphQL Integration

  const url = 'https://yourstore.myshopify.com/admin/api/2025-01/graphql.json';
  function updateShopifyProductPrice(productId, newPrice) {
  const payload = {
    query: `mutation productVariantUpdate($input: ProductVariantInput!) {
      productVariantUpdate(input: $input) {
        productVariant { id price }
      }
    }`,
    variables: { input: { id: productId, price: newPrice } }
  };

  const options = {
    method: 'post',
    contentType: 'application/json',
    payload: JSON.stringify(payload),
    headers: { 'X-Shopify-Access-Token': 'YOUR_ACCESS_TOKEN' }
  };

  UrlFetchApp.fetch(url, options);
}

Product Data Structure in Google Sheets

| SKU | Category | Metal | Purity | Weight (g) | Wastage % | Making % | Flat Charge | Offer % |

Completely customizable and this acts as the master control panel for your entire jewelry store.

Price Computation with Offers

function calculateFinalPrice(weight, ratePerGram, wastagePct, makingPct, flatCharge, discount) {
  const base = weight * ratePerGram;
  const wastageVal = base * (wastagePct / 100);
  const makingVal = makingPct ? base * (makingPct / 100) : flatCharge;
  const grossPrice = base + wastageVal + makingVal;
  return grossPrice - (grossPrice * (discount / 100));
}

Again completely customizable as per your store stragegy.

Category-Based Offer Rules (Google Sheets)

const offerList = offerData.slice(1).map(row => ({
  category: row[0]?.toLowerCase(),
  metal: row[1]?.toLowerCase(),
  purity: row[2]?.toLowerCase(),
  minWeight: Number(row[3]),
  discount: Number(row[4])
}));

This structure makes it easy to apply rules such as:

Conclusion

By replacing costly Shopify jewelry pricing apps with a Google Sheets + MetalAPI + Shopify GraphQL approach, Indian jewelry retailers gain:

👉 For Indian jewelers, this solution is cost-effective, flexible, and future-ready, enabling them to compete with both offline and online jewelry businesses while maintaining transparent and accurate pricing.

NP

© 2025 Nirav Parikh

Instagram 𝕏 GitHub