12.2 Cost Type Codes, Auto-Costs, and Allocation Methods

Key Takeaways

  • Cost type codes categorize landed expenses and dictate general ledger integration via Debit (Item, Ledger, Cust/Vend) and Credit (Vendor, Ledger, Item) posting categories.
  • Auto-costs automate cost estimations at the Voyage, Container, Folio, or Item level using dimension-matching rules based on shipping carriers, delivery terms, and ports.
  • Apportionment methods distribute header-level costs down to item lines using Percent, Quantity, Amount, Volume, Weight, or Measurement formulas.
  • Estimated landed costs are posted during Goods in Transit invoice processing, debiting inventory and crediting a landed cost clearing accrual account.
  • When actual freight invoices are matched via Cost invoice matching, variances are calculated and posted to item inventory valuation or price variance accounts based on costing models.
Last updated: September 2026

12.2 Cost Type Codes, Auto-Costs, and Allocation Methods

Quick Answer: The financial engine of the Landed Cost module in Dynamics 365 Supply Chain Management (D365 SCM) manages the accurate capitalization of ancillary import expenditures into item inventory valuation. Cost type codes classify expense types (ocean freight, customs duty, port handling) and define Debit/Credit posting paths. The Auto-costs engine automatically attaches estimated costs to voyages, containers, folios, or items based on logistics criteria. These shared costs are allocated down to item lines using six distinct Apportionment methods (Quantity, Amount, Volume, Weight, Percent, Measurement). Finally, Cost invoice matching compares actual carrier invoices to estimated accruals, automatically posting variances to inventory or general ledger variance accounts.


1. Cost Type Codes: Definition and Ledger Posting Setup

A Cost type code identifies and categorizes a specific type of landed cost expenditure incurred during the transportation and importation of goods.

  • Navigation: Landed cost > Setup > Costing setup > Cost type codes

Core Parameters and Posting Categories

Each cost type code establishes fundamental accounting behavior when estimated or actual costs are posted:

  • Cost category: Defines how the cost is entered or calculated:
    • Fixed: A flat monetary amount regardless of shipment size.
    • Pcs.: A rate applied per inventory piece/unit.
    • Percent: A percentage applied against purchase order line amounts.
    • Rate: A rate applied against physical measurements (e.g., rate per kg, rate per cubic meter).
  • Debit posting category: Dictates where the cost is charged:
    • Item: The cost is capitalized directly into the inventory valuation (or Goods in Transit asset value) of the item. This ensures true landed valuation on the balance sheet.
    • Ledger account: The cost is expensed immediately to a designated General Ledger expense account rather than capitalized.
    • Cust/Vend: Billed directly to a customer or vendor account.
  • Credit posting category: Dictates the offsetting financial credit:
    • Ledger account: The credit posts to a Landed cost clearing / accrual account. This is the standard setting for estimated costs, holding the liability until the actual invoice arrives.
    • Vendor: The credit posts directly to a Vendor accounts payable balance (used when posting actual invoices directly from third-party logistics providers).
    • Item: Credits inventory (rarely used, typically for rebates or allowances).
  • Cost classification: Groups cost types for reporting and analysis (e.g., Freight, Duty, Insurance, Handling, Demurrage).
  • Preferred vendor: Links the default carrier, customs broker, or port authority associated with this charge.

Typical Cost Type Code Configuration Matrix

Cost Type CodeDescriptionCost CategoryDebit CategoryCredit CategoryFinancial Impact
FRT-OCEANOcean Container FreightFixedItemLedger accountCapitalizes estimated ocean freight into item inventory; credits freight accrual.
DUTY-HTSImport Tariff / Customs DutyPercentItemLedger accountCapitalizes estimated customs duty based on line value; credits customs accrual.
INS-CARGOMarine Transit InsurancePercentItemLedger accountCapitalizes insurance into inventory; credits insurance accrual account.
PORT-DEMPort Demurrage SurchargeFixedLedger accountVendorExpenses unexpected container demurrage directly to P&L; credits shipping line vendor.
DOC-BROKERCustoms Brokerage FeeFixedItemLedger accountCapitalizes administrative customs filing fee into inventory; credits clearing.

2. The Auto-Costs Engine

Manually keying estimated freight, duty, and handling rates for every incoming purchase order line is inefficient and prone to human error. The Auto-costs engine automates cost generation based on defined commercial and logistics criteria.

  • Navigation: Landed cost > Setup > Costing setup > Auto-costs

Hierarchy Levels for Auto-Costs

Auto-costs can be defined at four structural levels, matching the Landed Cost hierarchy:

  1. Voyage Level: Costs applied to the entire voyage, such as harbor pilotage fees or whole-vessel charter charges.
  2. Shipping Container Level: Costs applied per physical container, such as standard 40ft container ocean freight rates or container drayage fees.
  3. Folio Level: Costs applied per customs declaration or commercial invoice, such as customs brokerage documentation filing fees.
  4. Item Level: Costs applied directly to specific items or commodities, such as ad valorem customs tariffs based on tariff codes or fumigation fees on agricultural items.

Rule Evaluation and Criteria Matching

The Auto-cost engine evaluates rules using standard Dynamics 365 Table / Group / All dimension-matching logic across multiple criteria:

  • Shipping carrier: Specific carrier (Table), carrier group (Group), or any carrier (All).
  • Delivery terms (Incoterms): e.g., FOB, CIF, EXW, DDP.
  • From port (Port of Origin) and To port (Port of Destination): e.g., From Port of Shanghai to Port of Long Beach.
  • Vendor: Specific merchandise vendor, vendor group, or all vendors.
  • Item / Cost group: Specific released item, landed cost group, or all items.
+-------------------------------------------------------------------------+
|                           AUTO-COST ENGINE                              |
+------------------------------------+------------------------------------+
|        EVALUATION CRITERIA         |         MATCHING ATTRIBUTES        |
|  - Shipping Carrier: MAERSK        |  - Cost Type Code: FRT-OCEAN       |
|  - Delivery Terms: FOB             |  - Level: Shipping Container       |
|  - From Port: SHG (Shanghai)       |  - Cost Category: Fixed            |
|  - To Port: LAX (Long Beach)       |  - Amount: $4,500.00 USD           |
|  - Vendor Group: OVERSEAS          |  - Apportionment: Volume (CBM)     |
+------------------------------------+------------------------------------+
                                     │ (Applies to)
                                     ▼
          Every 40ft Container moving on the Shanghai -> LAX leg

[!NOTE] When a voyage is created or lines are added to containers, D365 SCM scans the Auto-cost table, finds all matching rule records, calculates the estimated costs, and populates the Voyage costs, Container costs, Folio costs, and Item costs tables automatically.


3. Apportionment (Cost Allocation) Methods

When an estimated cost is applied at the Voyage, Shipping Container, or Folio level, it represents a lump-sum expenditure covering multiple diverse inventory items. To capitalize these costs into item valuation, the system must apportion (allocate) the total charge down to individual purchase order lines.

D365 SCM Landed Cost provides six Apportionment Methods configured on Cost Type Codes and Auto-cost rules:

1. Percent

  • Formula: $\text{Line Allocated Cost} = \text{Total Cost} \times \text{Specified Line Percentage}$
  • Operational Use Case: Specialized contracts where joint costs are pre-split by negotiated fixed ratios.

2. Quantity

  • Formula: $\text{Line Allocated Cost} = \text{Total Cost} \times \left( \frac{\text{Line Item Quantity}}{\text{Total Container / Voyage Quantity}} \right)$
  • Operational Use Case: Shipments consisting of homogeneous items with uniform size and weight (e.g., 10,000 identical steel bolts or standardized carton packages), where handling effort correlates directly with piece count.

3. Amount

  • Formula: $\text{Line Allocated Cost} = \text{Total Cost} \times \left( \frac{\text{Line Net Purchase Amount}}{\text{Total Container / Voyage Purchase Amount}} \right)$
  • Operational Use Case: Costs that vary directly with merchandise value, specifically Cargo Insurance and Ad Valorem Customs Duties. Higher-value goods legitimately absorb a proportionally larger share of insurance premiums and import tariffs.

4. Volume (Cubic Volume)

  • Formula: $\text{Line Allocated Cost} = \text{Total Cost} \times \left( \frac{\text{Line Total Volume (CBM)}}{\text{Total Container / Voyage Volume (CBM)}} \right)$
  • Operational Use Case: Ocean container freight. Ocean shipping carriers charge by physical container capacity ($20\text{ft}$, $40\text{ft}$, $40\text{ft HC}$). Bulky goods (such as furniture or plastic moldings) consume container space rapidly while weighing relatively little. Allocating by volume ensures space-consuming items absorb their fair share of ocean freight.

5. Weight (Gross or Net Weight)

  • Formula: $\text{Line Allocated Cost} = \text{Total Cost} \times \left( \frac{\text{Line Total Weight (kg/lb)}}{\text{Total Container / Voyage Weight (kg/lb)}} \right)$
  • Operational Use Case: Air freight and heavy industrial bulk materials (such as raw minerals, steel plate, or machinery). Air cargo carriers bill based on weight or volumetric weight; allocating by physical weight accurately reflects cargo freight impact.

6. Measurement

  • Formula: $\text{Line Allocated Cost} = \text{Total Cost} \times \left( \frac{\text{Line Measurement Factor}}{\text{Total Measurement Factor}} \right)$
  • Operational Use Case: Custom dimensions defined on released products, such as length, surface area, or custom dimensional pallet equivalents.

Comparison of Apportionment Methods

MethodAllocation BasisRequired Master DataPrimary Logistical Scenario
QuantityUnit piece countInventory Units of MeasureHomogeneous items, palletized uniform goods
AmountLine monetary valuePurchase Order unit price & line currencyCargo insurance, customs brokerage ad valorem fees
VolumeCubic measurements ($m^3 / ft^3$)Physical dimensions (Height, Width, Depth on Released Product)Ocean container freight, LCL (Less than Container Load) shipping
WeightMass ($kg / lbs$)Gross/Net weight on Released Product masterAir freight, heavy metallurgy, weight-constrained trucking
PercentExplicit percentageManual percentage assignmentMulti-party joint venture cost splits
MeasurementCustom volumetric/linear metricUser-defined measurement dimensionsSpecialized structural beams, piping, textiles

4. Estimated Landed Costs vs. Actual Landed Costs and Variance Accounting

The fundamental accounting lifecycle in Landed Cost separates cost estimation from final invoice settlement, ensuring financial statements remain balanced across extended international transit periods.

[1. Voyage Creation / Auto-Costs]
       │
       ▼
[2. Post Vendor Invoice / Goods in Transit]
       │  Debit: Goods in Transit Inventory ($5,000 Estimated Freight)
       │  Credit: Landed Cost Accrual Account ($5,000 Liability)
       ▼
[3. Carrier Submits Actual Invoice: $5,400]
       │
       ▼
[4. Cost Invoice Matching Workbench]
       │  Debit: Landed Cost Accrual Account ($5,000 Cleared)
       │  Credit: Accounts Payable - Carrier ($5,400 Actual Payable)
       │  Debit: Landed Cost Purchase Price Variance ($400 Expense Variance)

Phase 1: Posting Estimated Landed Costs

When the merchandise vendor's invoice is posted at the port of origin (FOB shipping point), D365 SCM calculates all estimated auto-costs attached to the voyage lines:

  • Debit: Goods in Transit Inventory Asset (capitalizing estimated freight, duty, and insurance into the in-transit balance sheet asset).
  • Credit: Landed Cost Accrual / Clearing Account (recording the estimated liability for upcoming logistics bills).

Phase 2: Invoicing Actual Costs via Cost Invoice Matching

Weeks or months later, third-party logistics providers (freight forwarders, customs brokers, ocean carriers) submit their actual commercial invoices.

  • Navigation: Landed cost > Invoices > Cost invoice matching
  • The accounts payable clerk opens the Cost invoice matching form, selects the relevant voyage, container, or folio, and highlights the corresponding estimated cost lines.
  • The clerk enters the actual invoiced amounts from the carrier bill.

Phase 3: Variance Ledger Settlement

Discrepancies between estimated landed costs and actual billed amounts are common due to fuel surcharges (BAF), currency fluctuations, demurrage, or port congestion fees. D365 SCM processes variances based on the item's Inventory Model Group and inventory status:

  1. Standard Cost Items:

    • Under standard costing, item on-hand inventory valuation is strictly immutable between revaluation journals.
    • Any variance between estimated landed cost and actual invoice cost posts immediately to the Landed Cost Purchase Price Variance ledger account in the General Ledger.
  2. Moving Average / FIFO / Weighted Average Items:

    • Goods Still In Transit or In Stock: If the inventory is still in transit or on hand at the warehouse, Landed Cost can adjust the inventory asset valuation directly, absorbing the variance into the unit cost of the remaining items.
    • Goods Already Sold or Consumed: If the inventory has already been picked, packed, and sold to customers (or consumed in production work orders), the system posts the variance directly to the Cost of Goods Sold (COGS) adjustment / Landed cost variance account.

5. Implementation Scenarios and Common Exam Traps

[!TIP] Exam Tip — Missing Dimensional Master Data: If an Auto-cost rule configured with the Volume apportionment method fails to allocate freight across purchase order lines, inspect the Released product master. Under the Manage inventory FastTab, the physical dimensions (Height, Width, Depth, and Gross Volume) must be populated. If gross volume is zero, D365 SCM cannot calculate the proportional denominator and throws an allocation error.

[!IMPORTANT] Exam Tip — Debit Item vs. Debit Ledger: When reviewing cost type codes on the MB-330 exam, verify the debit category. To capitalize logistics charges into product valuation (balance sheet asset), the Debit posting category must be set to Item. Setting Debit to Ledger account bypasses inventory valuation and expenses the cost immediately to the P&L.

[!WARNING] Exam Trap — Multi-Currency Cost Invoice Matching: International ocean freight is frequently quoted and invoiced in US Dollars (USD), while local customs duties are billed in local currency (e.g., EUR or GBP). Landed Cost handles multi-currency transactions natively. When matching cost invoices, exchange rate variances are tracked separately from operational cost variances.

Test Your Knowledge

An enterprise imports bulky consumer furniture alongside small, high-value electronic accessories inside standard 40-foot ocean shipping containers. The ocean freight carrier charges a flat fee of $6,000 per container. The financial controller mandates that the ocean freight expense must be capitalized into the unit cost of each item based on the physical space the items occupy inside the container, ensuring that large sofa units absorb a proportionally higher freight charge than compact electronics. Which apportionment method should the functional consultant assign to the ocean freight cost type code?

A
B
C
D
Test Your Knowledge

A manufacturing company wants to capitalize estimated ocean freight charges directly into the inventory valuation of purchased raw materials when an inbound voyage departs the overseas port. However, the freight invoice from the shipping carrier will not arrive until weeks later. How should the functional consultant configure the debit and credit posting categories on the ocean freight Cost Type Code to ensure proper balance sheet accounting?

A
B
C
D
Test Your Knowledge

An organization estimates customs clearance fees at $1,200 for an inbound voyage container. When the customs broker submits their actual commercial invoice, the fee is $1,450 due to unexpected port inspection surcharges. The inventory was purchased under a Standard Cost item model group. How does Dynamics 365 Supply Chain Management process this financial difference when the invoice is matched in Landed Cost?

A
B
C
D