created createDerivedVars_main to combine cust level and txn level derived vars