In configuration systems, and especially in Constraint Satisfaction Problems (CSP), heuristics are widely used and commonly referred to as variable and value ordering heuristics. The main challenges of those systems are: producing high quality configuration results and performing real-time recommendations. This paper addresses both challenges in the context of CSP based configuration tasks. We propose a novel learning approach to determine transaction-specific variable and value ordering heuristics to solve configuration tasks with high quality configuration results in real-time. Our approach employs matrix factorization techniques and historical transactions (past purchases) to learn accurate variable and value ordering heuristics. Using all historical transactions, we build a sparse matrix and then apply matrix factorization to find transaction-specific variable and value ordering heuristics. Thereafter, these heuristics are used to solve the configuration task with a high prediction quality in a short runtime. A series of experiments on real-world datasets has shown that our approach outperforms existing heuristics in terms of runtime efficiency and prediction quality.