Automating Cost Calculations: The Cost Generation Tool for HFN

Home Furnishing Nordic (HFN) wanted to move away from manual cost calculations and introduce a solution that would automatically calculate and update the final cost of their products. Forbytes developed a cost generation tool that made this possible. It calculates costs based on various data points and updates prices when changes occur.

500,000+

products with automated cost calculations

15

dynamic triggers for real-time cost recalculations

8

cost types considered per product

Context and Challenge

Before this project, HFN’s team managed cost data manually using spreadsheets. This was time-consuming and error-prone, especially as the product catalog kept growing. 

There were three major challenges in calculating the product costs via spreadsheets: 

  • Manual processes: Calculating the full cost for every product manually became unsustainable when the product catalog grew. The manual approach was not only time-consuming but also prone to errors, making automation a critical requirement for HFN. 
  • Data inaccuracy: HFN needed precise and consistently updated cost data to support internal decision-making and financial operations. As different departments relied on this data, even small discrepancies led to miscommunication and incorrect planning.  
  • Lack of real-time insights: With manual data processing, it took longer for managers to retrieve insightful data from their spreadsheets. The Business Intelligence team required access to clean, well-structured cost information for analysis, trend forecasting, and performance monitoring.  

With nearly 500,000 products in HFN’s catalog, multiple currencies available, and numerous cost types to track, it became clear that automation was a must.

Client’s Objectives

HFN needed a reliable, automated solution to calculate and display the full cost of their products. Key objectives for the project included: 

  • Automate the cost calculation process. The client wanted to eliminate manual calculations and ensure that every cost component, such as base price, delivery fees, and extra feature fees, was automatically included in the final product cost. 
  • Ensure accuracy and up-to-date data. Costs change frequently due to internal and external factors. HFN needed a system that could reflect those changes and ensure that both managers and end users see the most current cost information. 
  • Create a configurable tool. Managers needed the flexibility to include or exclude specific cost types depending on their reporting and pricing strategy. 
  • Support analytics and reporting. All cost data had to be stored in a single place and made accessible for HFN’s business intelligence (BI) tools. This would help managers track pricing changes and analyze how different costs impact profit margins. 
  • Preserve historical data. For auditing and analysis, HFN wanted to store historical records of all cost changes. This data would help them traceback data modifications, understand trends, and make better strategic decisions in the future. 
  • Deliver data in multiple currencies. HFN operates in different markets, so the tool had to support cost display in four different currencies, depending on the customer’s location.

How We Approached the Project

We started by studying HFN’s internal workflows and understanding how costs were calculated manually. Our goal was to mirror this logic, then improve it with an automated cost generation solution. 

Forbytes’ approach included the following stages: 

  1. Planning and collecting requirements
    We analyzed how different cost types were used and how data changed over time. Our team identified 15 cost-related triggers, such as changes in product weight, status, or manufacturer price, that should prompt recalculations. 
  2. Solution’s development
    Forbytes’ data engineers designed a backend system using MongoDB to manage cost data. We created a special table to store a queue of products needing recalculation. On average, 100–200 products are updated at any time. Costs are recalculated either every two weeks or once a trigger occurs. 
  3. Algorithm optimization We optimized the tool to ensure it could handle large data volumes efficiently. Each product can have 7–8 cost types, and cost calculations must work in four different currencies. 
  4. Testing and deployment
    After several iterations, the Forbytes team launched the tool. We also added flexibility for managers — they can configure which costs are included in the final price and which are used for internal analytics only. 
  5. Ongoing support
    As HFN’s needs evolved, our team kept updating the tool, offering quality support and maintenance services. For example, we expanded from 4 cost types to 8, and from 3 triggers to 15, all without interrupting the client’s operations. 

Solution Overview

The solution we built is a cost generation tool connected to internal data tables. These tables calculate costs based on product attributes such as purchase price, logistics, and more. 

Once calculated, the final cost is displayed to end users via HFN’s central admin system. All costs are updated regularly and recalculated when a trigger occurs. We made the tool flexible: managers can include or exclude certain cost types in the final calculation depending on business needs. 

Here’s how it works:

  1. Data is pulled from cost tables, calculated based on purchase price and product features. 
  2. Triggers (15 in total) monitor changes and start recalculations when needed. 
  3. A special MongoDB queue manages recalculation jobs to avoid overload. 
  4. Calculated data is sent to central admin systems and shown to both managers and end users. 
  5. The system handles 4 currencies, keeps historical records, and gives managers the power to choose which cost types to include in reports and pricing.

cost-generation-tool

Additional improvements: 

  • We moved core cost calculations to the admin system 
  • Shared calculated data with Price Edge and Icore 
  • Stored unified cost data for Business Intelligence tools

Detailed Execution Timeline

  • Business analysis (requirements collection, cost triggers list): 40 hours  
  • Solution design (architecture design, MongoDB logic): 30 hours 
  • Development phase 1 (tables setup, initial 3 triggers): 60 hours 
  • Development phase 2 (scaling to 15 triggers, currency support): 70 hours 
  • Testing and optimization (load testing, algorithm optimization): 40 hours 
  • Deployment (production deployment, team onboarding): 20 hours  
  • Support and maintenance (ongoing improvements, data monitoring): ongoing

Results and Impact

The cost generation tool we’ve designed for HFN ensures that the final product costs are always up to date, accurate, and consistent across their systems and websites. 

Here are the key project outcomes: 

  • Cost generation automation: The tool eliminated the need for manual updates and reduced the risk of human errors for HFN. 
  • Increased accuracy of cost data: Managers gain access only to accurate cost data, as all cost components are now updated automatically based on triggers and data changes. 
  • Optimized efforts: Managers’ work became easier and faster, thanks to a configurable interface and centralized tables that can be adjusted to business needs. 
  • Better customer service: Customer satisfaction improved, as clients always see the correct final cost, which includes all applicable expenses. 
  • Performance optimization: Critical calculations (average purchase price, calculated purchase price) were moved to BO, improving system efficiency and back-office processes. 
  • Insightful and accurate reporting: Cost data became easily accessible for BI reporting, helping HFN make better, data-driven decisions. 
  • Real-time data synchronization: We configured real-time sharing of cost data with Icore. This ensures that updated cost information is reflected instantly across platforms.

Key Takeaways and Lessons Learned

Success factors:

  • Forbytes’ ability to adjust to evolving client needs: Throughout the project, our team demonstrated the ability to quickly adapt to changing requirements. Our flexible architecture and agile approach made it possible to adjust the tool without delays or disruptions. 
  • System optimization for large-scale data processing: We continuously optimized the logic and architecture to ensure efficient calculations and reliable data handling, even as the load on the system increased. 
  • Close collaboration and deep domain knowledge: Over the years of cooperation, our team gained a deep understanding of HFN’s internal operations, pricing models, and strategic goals. This helped us make informed technical decisions that aligned with their broader business objectives. 
  • Effective management of dynamic development cycles: The project was developed iteratively, with frequent adjustments based on new insights and client feedback. Our ability to organize and execute in short, agile iterations allowed us to implement changes efficiently and deliver a solution that met the client’s expectations at every stage. 

These success factors helped Forbytes deliver a scalable and future-ready cost calculation system that continues to bring value to HFN. 

Challenges overcome:

  • Managing large-scale product data: Nearly 500,000 items required cost generation. Designing a structure that could handle this volume efficiently without performance issues required thoughtful planning and continuous optimization from our team. 
  • Multi-currency cost calculations: The system needed to support cost display and calculations in four different currencies, depending on the end user’s settings. Our team ensured the tool could accurately convert and display cost data in real time, providing up-to-date and localized financial information. 
  • Preservation of historical data: HFN required historical data on all cost changes to support strategic analysis and decision-making. We built a mechanism that preserved historical versions of each record, enabling the business to trace changes over time. 
  • Scaling the number of cost types: Initially, the system was designed to handle three types of costs per product. However, as the client’s needs evolved, this number grew to seven or eight. We managed to integrate additional cost types without restructuring the system or interrupting operations. 
  • Ensuring flexibility and configurability for managers: Not every cost type needed to be included in final cost calculations, but all cost data was important for analytics and reporting. The tool we’ve built is highly configurable so that managers can choose which cost types to include or exclude based on their current goals.  

Thanks to this solution, Gymgrossisten improved their delivery process, saved money, and gave customers a smoother shopping experience. The module works fast, quietly, and accurately, helping the business achieve better results.

Related Services

Magento Development

Magento development helps companies meet all tech and market requirements with a powerful online store. With the help of certified Magento developers, you maximize user satisfaction, increasing your chances for big profit and market recognition.

Read More

E-commerce Development Services

Forbytes builds e-commerce solutions that solve challenges and meet user needs. From responsive online shops to automation tools, we ensure your venture is scalable, secure, and positioned for success.

Read More

eCommerce Consulting Services

Refer to ecommerce consulting services for professional advice and expert assistance. Our ecommerce consultants will answer all questions and prepare the action plan for your success in the digital space.

Read More

Let’s Get in Touch

    The Forbytes team was very professional and demonstrated a great understanding of the business aspects. All tasks were completed above expectations. Their experts were always available, and we never needed to wait for a response or a suggested solution.

    Valentin Berg CTO at GardenStore

    Valentin Berg

    CTO, GardenStore

    Forbytes has a strong process-oriented way of leading the company, with good respect for themselves and their managers. They made a choice not to become too big but build slowly on more qualified people, which is paying off.

    Niklas Hammar COO & Business Development at Offerta.se

    Niklas Hammar

    COO & Business
    Development at Offerta.se

    Forbytes’ engineers and team leads worked as part of our RnD group and were directly managed by our company directors. They were both proactive and adaptable, qualities that perfectly match our needs in our fast-growing and constantly evolving environment.

    Nazar Lytvynenko Group Manager in Guesty

    Nazar Lytvynenko

    Group Manager, Guesty

    The Forbytes team has been loyal and dedicated in their partnership. The team provides management as needed but allows flexibility for direct work with developers.

    Thomas Andersson Ecommerce Manager & CTO Trademax

    Thomas Andersson

    E-commerce Manager & CTO, Trademax

    Forbytes has established strong project management. Their entire team is knowledgeable about appropriate processes and project expectations.

    Julia Noack eCommerce Manager Motorsweden & Swebike

    Julia Noack

    E-commerce Manager Motorsweden & Swebike


    Scroll Up

    This website is using cookies to give you the best experience.
    Continue using this site you agree with our Privacy and Cookies Policy.