+61 430 996 622
contact@qhdlearning.com
4/33-35 Albert Street
Hornsby, NSW 2077
8:00AM - 6:00PM
Monday to Saturday

7 steps to master AWS CDK

Step 1. Download this

const skuListFilePath=’./inventory/dsz_sku_list.csv’
const asinListFilePath=’./inventory/AmazonASIN.csv’
const csv = require(‘csvtojson’)
const CalculateRRP = require(‘./utils/CalculateRRP’)
const ASIN = ‘B07YMLMQJC’
const generateRRP = async (asin) => {
let asinList = await csv().fromFile(asinListFilePath)
let SKU
let cost
let RRP
for (let a of asinList) {
if (a.ASIN === asin) {
SKU = a.SKU
}
}
if (!SKU) {
  return console.error(`Cannot find the SKU for ${asin} in AmazonASIN.csv file`)
}

let skuList = await csv().fromFile(skuListFilePath)

for (let product of skuList) {

if (product.SKU === SKU) {

cost = product.price

}

}

console.log(‘cost: ‘, cost)

if (!cost) {

return console.error(`Cannot find the ${SKU} in dsz_sku_list.csv file`)

}

RRP = await CalculateRRP(asin, cost, ‘competitive’)

console.log(`The RRP for ${asin} is ${RRP}`)

}

Have a question?

Reach out to our friendly professional trainer.

Reach out now!

+61 430 996 622

Start the collaboration with us while figuring out the best solution based on your needs.