DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
- Created by Swapnil Shah, last modified on Sep 25, 2025
1. Introduction
In our skateboard manufacturing journey, we've explored how to create a multi-level Bill of Materials (BOM), set up routing and routing tasks, execute Material Requirements Planning (MRP) to generate requirements, manage purchase orders for procurement, and execute production runs to manufacture inventory. Now comes a critical question every manufacturer must answer: What does it actually cost to produce each skateboard?
Before moving further, it is important to understand the types of costs that Apache OFBiz supports. There are two main categories:
- Actual Costs: These are the real expenses incurred during production, covering materials, labor, and overhead. They are calculated after production is complete and reflect what was truly consumed to manufacture the product.
- Standard Costs: These are predetermined estimates set before production begins. They are based on expected material, labor, and overhead costs and serve as a benchmark for measuring efficiency.
This guide focuses only on actual manufacturing costs. We will show how to configure and calculate them in Apache OFBiz using the example of manufacturing a skateboard and its components.
2. Understanding Fixed and Variable Costs
Fixed Costs:
Fixed Costs are expenses that remain constant in total, irrespective of the quantity produced.
These costs would stay the same no matter how many skateboards you produce. Examples include equipment depreciation, facility rent, and base operator wages.
Variable Costs:
Variable Costs are expenses that change in total in direct proportion to the quantity produced.
These costs vary based on units of skateboards produced. Examples include raw materials, energy consumption, and piece-rate labor. Making more skateboards means higher total variable costs.
3. Where to add Costs in Apache OFBiz
Apache OFBiz allows adding the costs at multiple levels to ensure precise tracking and flexibility in cost computation.
3.1 Operation / Routing Task-Level Cost Setup
In a manufacturing process, each operation or routing task involves resources such as labor, machinery, and utilities. These steps contribute to the overall production cost beyond just the raw materials. Apache OFBiz allows you to define formulas for actual costs computation at the task level, providing a more granular and accurate view of production expenses.
By setting cost formulas per task and considering the time taken for each, manufacturers can better track how each step impacts the total cost of production. These values are determined during the execution of each Routing Task in a Production Run, enabling accurate task-level costing.
3.2 Product-Level Cost Setup
In manufacturing, the total cost of a product often includes more than just the raw materials and operational cost. For example, a manufacturer may want to include additional costs like packing, labeling, or quality checks. These are neither part of the material cost fetched from inventory nor included in the routing tasks, but are still essential to calculate the true cost of producing the item.
Apache OFBiz allows manufacturers to add such extra costs at the product level. This means once the system retrieves the base material cost, based on inventory values, the manufacturer can manually or programmatically apply any additional costs that are specific to the product. These costs are then included in the final cost calculation, ensuring accurate pricing, margin analysis, and profitability tracking.
4. Our Skateboard Manufacturing Process
Let’s review our skateboard structure and manufacturing steps:
Product and Components:
- Skateboard (STC1005) - our finished product
- Deck (STC1004) - intermediate product made from Glue, Face, Ply, Core
- Sticker (STC1001), Warranty Card (STC1002), Transfer (STC1003)
Manufacturing Steps (routing tasks):
- Lamination: Bond Glue, Face, Ply, Core together to make the Deck
- Shape Deck: Cut and shape the laminated Deck
- Final Assembly: Attach Sticker, Warranty Card, Transfer to the Deck
4.1 Material Cost Structure Overview
Let's start by addressing the material cost of each component, as this forms the base for calculating both total and unit-level production costs.
Apache OFBiz automatically fetches the material cost for each item from the inventory. The inventory item cost is determined at the time of receiving, based either on the purchase cost from a supplier or the manufacturing cost if the item was produced internally.
For illustration purposes, below is the material cost data for each component of the skateboard:
Component | Cost | Notes | |
Deck Components | Glue | $10 | |
Face | $30 | ||
Core | $100 | ||
Ply | $53 | ||
Deck Subtotal | $193 | ||
Individual Components | Sticker | $4 | 2 pieces @ $2 each |
Warranty Card | $1 | ||
Transfer | $2 | ||
Total Material Cost | $200 |
4.2 Define and Create Cost Component Calcs
In Apache OFBiz, a Cost Component Calc is a formula used to determine a component of the total product cost. It is defined before production begins and applied either at the routing task level or the product level. Once production runs are executed, these formulas generate Cost Components, which represent the actual costs incurred.
Broadly, there are two categories of cost formulas we need to define:
- Operational (Routing Task) Cost Calc: Covering labor, machine time, or other production activity expenses.
- Product Cost Calc: Covering the raw materials used to build the product.
4.2.1 Creating Cost Component Calc for Routing Tasks
In Apache OFBiz, formulas can be defined by specifying a fixed cost per task and a variable cost per time slot. Once the actual task time is logged, the system calculates the task cost using the formula:
Fixed Cost + (Variable Cost per Time Slot ÷ Time Slot) × Actual Task Time Where:
|
We now create Cost Component Calcs to represent operational costs of each routing task.
Cost Component Calc ID | Task | Time Slot (ms) | Fixed Cost | Variable Cost per Time Slot |
Costing - Lamination | Deck Lamination | 45,000 | $0 | $5 |
Costing - Shape Deck | Deck Shaping | 45,000 | $0 | $5 |
Costing - Final Assembly | Final Assembly | 1,800,000 | $0 | $10 |
Steps to Create:
- Navigate to: Manufacturing > Cost Calculation

- Create Cost Component Calcs from the above table, fill all the details and click Submit

Similarly create other cost component calcs.
4.2.2 Product-Level Cost Component Calc
For the product-level cost component, you can create a similar cost component calc record like explained above or edit the existing ones.
Here, in the skateboard example, we are using the pre-existing GEN_COST_CALC formula available in Apache OFBiz which represents an overhead cost of 5% of total cost. This is a special example that leverages a custom formula by specifying it in the “Cost Custom Method ID” field (see previous screenshot).
- Skateboard Packaging and Shipping Cost: GEN_COST_CALC

4.3 Assign Cost Component Calc to Routing Tasks
Connect each cost component calc to a routing task.
Steps:
- Navigate to Manufacturing > Routing Tasks

- Enter the Routing Task ID and click Find

- Click on the Task ID

- On the Routing Task Details Page, go to the Routing Task Costs tab

- Select respective values in the following fields:
- Cost Component Type ID: Other Cost from dropdown
- Cost Component Calc ID: Costing - Final Assembly from dropdown
- From Date: The date when the cost component calc becomes effective.
- Through Date : The date after which the added cost component calc is no longer effective (Optional).
- Through Date : The date after which the added cost component calc is no longer effective (Optional).
- Click Submit

Similarly find other Routing Tasks and link the cost component calc to each.
4.4 Assign Cost Component Calc to Products
At the product level, overhead and additional cost formulas are attached to products.
Example – Skateboard Packaging and Shipping:
- Navigate to Catalog > Products

- Enter the Product ID (STC1005), and click Find

- Click on the Product ID

- On Skateboard (STC1005) Details Page, go to the Costs tab

- Go to the Add Product Cost Component Calc screenlet
- Select respective values in the following fields:
- Cost Component Type ID: Other Cost from the dropdown
- From Date: The date when the cost component calc becomes effective.
- Cost Component Calc ID: Overhead Cost (5 percent of total cost) for general costs from the dropdown
- Sequence Num: (if needed)
- Through Date : The date after which the added cost component calc is no longer effective (Optional).
Click Submit.

5. View Costs in Production
Once the production run is executed in Apache OFBiz, the system automatically calculates the cost components. It captures the actual unit cost of each material consumed from inventory, it computes the actual costs associated with each routing task and it determines the total actual cost of producing 100 skateboards and thus the actual unit cost of the finished skateboard.
Now we will review the cost components after the production runs are finished, starting with the Deck and then moving to the Skateboard. Since the Deck is produced first, the Skateboard cost components are calculated based on it.
For Deck
- Go to the Production Run Details page for Deck:

- Check the Actual Materials and Actual Costs screenlets.


For Skateboard
- Go to the Production Run Details page for Skateboard:

- Go to the Actual Materials screenlet to see the Material cost.

- This shows the actual material unit cost of each item, along with the Deck actual cost.

- Then go to the Actual Costs screenlet, to see routing task level cost breakdown.


Cost Breakdown Per Unit
- Deck Costs
- Material: $193.00
- Lamination Task: $5.00
- Shaping Task: $5.00
Total Deck Cost: $203.00
- Skateboard Costs
- Skateboard Material (Sticker, warranty card, Transfer): $7.00
- Deck: $203.00
- Final Assembly Task: $10.00
- Packaging and Shipping: $11.00
Total Skateboard Cost: $231.00
Cost per Skateboard (Summary Table)
Cost Component | Amount ($) |
Material (Deck + Skateboard) | 200 |
Lamination Task | 5 |
Shaping Task | 5 |
Final Assembly Task | 10 |
Packaging and Shipping | 11 |
Total Production Cost of skateboard | 231 |
Conclusion
Production cost calculation in Apache OFBiz helps you understand exactly what it costs to manufacture your products. With our skateboard example, you've learned how to set up costs for manufacturing tasks and calculate the total and unit production cost.
With manufacturing complete, you’re ready to deliver the skateboards to customers to fulfill sales orders. To explore the process of picking, packing, and shipping finished products in Apache OFBiz, refer to the order fulfillment guide.