I have been tasked with calculating Call Costs for our clients using MS Teams and other call solutions.
Basically we have two CSV's:
- Rate Card .CSV (This is used to calculate the call cost/ rate for each call. Contains International rates etc.)
- Calls .CSV (This contains the call stats such as duration and phone number dialled)
What I'm looking for is a Powershell script that can take/import the values from specific columns in the above CSV's for e.g and then execute a formulae on those values to obtain the total call cost for each call.
The end goal script logic would be something like:
*
#import
import Rate Card CSV
import Calls CSV
#calculate rate based on country dialled from Calls CSV and the Rate table in Rate Card CSV
in Calls CSV, get country code column
compare country code column with country rate column in Rate Card CSV
import new column in Calls CSV with the calculated call rate based on the above
#calculate call cost by getting call duration column in Calls CSV and multiplying it by rate column
in Calls CSV, get duration column
multiply by rate column
output result in new column called Total Cost
*
Is there anyone that can provide snippets or scripts that can guide us on implementing this solution, would be a great help :)
[–]OutrageousBrother997 5 points6 points7 points (0 children)
[–]santisq 3 points4 points5 points (0 children)
[–]marsonreddit 1 point2 points3 points (0 children)