Wolters Kluwer - Basecone

Modified on Thu, 01 Jun 2023 at 10:52 AM

General Info:


It is under Wolters Kluver, so they have "Support" included in their package.




Connectors: None



Person of contact:

wim.van.soest@wolterskluwer.com



Tally: Yes




Templates


SummarySpecification
Yes
Yes


Basecone price rule dump:

function stripDecimal(d){
    return d.toString().replace("NumberDecimal(\"", "").replace("\")","")
}
var opMap = {1: "PRICE", 3: "ADJUSTPERCENTAGE", 4: "ADJUSTFIXED", 5: "SUM", 6:"GROUPPRICE", 7:"LADDER", 8: "MAXPRICE", 9:"MINPRICE"}
var botCount = 8;
var sbotCount = 6;
var ccMap = {}
db.CustomerCluster.find({tn: 1}).forEach(cc => ccMap[cc._id] = cc.tn)
var pcMap = {}
db.ProductCluster.find({tn: 1}).forEach(pc => pcMap[pc._id] = pc.tn)
var rnMap = {}
db.PricingRule.find({}, {rn: 1}).forEach(pr => rnMap[pr._id] = pr.rn)
var out = "Rule Name,Customer Cluster,Product Cluster,Order,Operator,Value,Valid From,Valid To,Separate Line item,Simple Summing,Rule Condition,Bot1,Bot2,Bot3,Bot4,Bot5,Bot6,Bot7,Bot8,Separate Bot1,Separate Bot2,Separate Bot3,Separate Bot4,Separate Bot5,Separate Bot6,Override Rule";
db.PricingRule.find().forEach(pr => {
    var vf = (pr.vf == null || pr.vf.pd == null) ? "" : pr.vf.pd.toISOString();
    var vt = (pr.vt == null || pr.vt.pd == null) ? "" : pr.vt.pd.toISOString();
    out += "\"" + pr.rn + "\",\"" + ccMap[pr.cid] + "\",\"" + pcMap[pr.pcid] + "\",\"" + pr.ro + "\",\"" + opMap[pr.op] + "\",\"" + stripDecimal(pr.ov) + "\",\"" + vf + "\",\"" + vt + "\",\"" + pr.sdv + "\",\"" + pr.sqs + "\",\"" + pr.rco;
    for(var i=0; i<botCount;i++){
        out += "\",\"" + (pr.bot[i] || "")
    }
    for(var i=0; i<sbotCount;i++){
        out += "\",\"" + (pr.sbot[i] || "")
    }
    out += "\",\"" + (pr.orid == null ? "" : rnMap[pr.orid]) + "\"\n";
})

print(out)
  • Copy the output into a .csv file (by for example using Sublime)
  • Send this to Wim asking if this is what he needs :D

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article