7. Set up hierarchical costs and returns
Learn how to configure rules-based fulfillment and return costs for shipping, toll, pick & pack, and transaction fees, along with return thresholds and fallback margins.
Setting up hierarchical cost rules
Dema allows you to define rules-based costs for shipping, toll, pick & pack, and transaction fees, ensuring every order reflects accurate fulfillment costs. These rules can be set as:
- Percentage of order value
- Fixed cost per order
- Fixed cost per item
All costs are calculated automatically based on the rules you set, and fallback logic ensures no order goes unaccounted for.
To set up these rules, navigate to Settings → Fulfillment Costs. Use the hierarchical interface to define specific rules by criteria such as country, payment provider, warehouse, or product category. Refer to the image below for how this setup works hierarchically.
How hierarchical rules work
Dema applies the most specific rule available for each cost type. If no rule matches, it defaults to higher-level rules. For example:
- If you create a rule for transaction fees in the United States with Adyen as the payment provider, that rule will apply first.
- If no payment provider is specified, the rule for United States applies.
- If no country-specific rule exists, it will default to a global rule.
This ensures that all orders have a calculated cost, even if specific details are missing.
Tips for setting up costs
Below are common dimensions typically used for each cost type:
-
Shipping costs
- Usually set by country and shipping provider.
- Example: Shipping with UPS in the US has a fixed cost per order and a percentage of order value.
-
Toll/customs fees
- Typically based on country.
- Example: Import duties for orders shipped to Denmark.
-
Pick & pack costs
- Often defined by warehouse and sometimes by product category.
- Example: Picking fees differ by warehouse or bulky product categories.
-
Transaction fees
- Generally set by payment provider and sometimes by country.
- Example: Adyen in the US charges 3% per order, while all other providers charge 1%.
Setting up return costs
Return costs can also be configured under Settings → Returns → Standard Return Costs. These costs follow the same hierarchical structure as fulfillment costs and are multiplied by the return percentage.
- Before the return threshold (e.g., 25 days), return costs are calculated using estimated return percentages.
- After the return threshold, the system switches to using actual returns.
For example:
- If you set a return shipping cost of USD 40 and the estimated return percentage is 25%, the allocated cost per order would be USD 10 before the threshold.
- After 25 days (or your specified threshold), actual returns are used to calculate costs.
Setting up return percentages
Estimated return percentages can be configured under Settings → Returns → Return Percentage. This allows Dema to estimate return costs before the return threshold is reached.
- You can define return percentages by country, category, or any other dimension relevant to your business.
- Example:
- Electronics in Germany have an estimated return rate of 10%.
- Clothing in the US has an estimated return rate of 25%.
These percentages are used to allocate return costs proportionally across orders.
Configuring return thresholds
To avoid inflated profitability metrics caused by early returns, you can define a return threshold. This threshold determines how many days Dema uses estimated returns before switching to actual returns.
Navigate to Settings → Returns → Return Threshold to configure:
- Review the return rate chart to see when 90% or 99% of returns typically occur.
- Set the threshold (e.g., 25 days) based on your return curve.
- Orders older than the threshold will use actual returns, while newer orders use estimated returns.
Setting up fallback margins
If the Cost of Goods Sold (COGS) is missing in the inventory file, you can configure a fallback margin percentage. This ensures no product goes unaccounted for, even if COGS data is unavailable.
Navigate to Settings → Product Cost to set a fallback margin:
- Configure by product category or brand.
- Example: All products in the “Shoes” category have a fallback margin of 60%.
- Dema uses this margin to calculate estimated COGS when no inventory file data is available.
Best practices:
- Define specific rules for high-volume countries, warehouses, or payment providers.
- Use fallback rules at a global level to avoid gaps in cost calculations.
- Regularly review return thresholds to balance accuracy and real-time insights.