Variable Costs
How to set up variable costs like shipping cost, payment fees, etc.
What Are Variable Costs
Variable costs are expenses that scale with your orders — things like shipping fees, payment processing fees, and fulfillment costs. Unlike fixed costs, they change based on how many orders you process and what’s in them.
Variable Cost Types
Most apps force you into rigid categories like “shipping costs” or “payment costs,” which is easier to begin with, but creates problems if your needs are even just a little non-standard.
Kleio takes a different approach by letting you create different types of variable costs that are triggered by specific events or calculated using various methods:
- Per Order: A flat fee applied to every order.
- Per Line Item: A fee for every individual item in an order.
- Per refund in order: Triggered when an order is refunded.
- Per refunded line item: Applied for each specific item that is refunded.
- Percentage of sales: Calculated as a percentage of the total sales value.
- Percentage of gross sales: Calculated as a percentage of gross sales.
- Percentage of COGS: Calculated as a percentage of the Cost of Goods Sold.
- By Order weight: Set a cost based on the weight of the order.
- By LineItem quantity: Set a cost based on the quantity of items in the order.
- Percentage of ad spend: Calculated as a percentage of ad spend.
- Percentage of shipping cost: Calculated as a percentage of your shipping cost.
These types of variable costs can be combined in many ways to create a very flexible and accurate representation of your P&L.
Categories
Each variable cost can be assigned to a category. The category name is how the cost appears as a line item on your P&L page — for example, costs in the “Shipping” category are grouped and shown as a single “Shipping” row. This keeps your P&L clean and easy to read, even if you have many individual cost rules behind the scenes.
Filters
You can customize variable costs in many ways, so they’re a correct representation of your P&L:
- Channel Allocation: You can allocate a variable cost to a specific sales channel, such as POS, so the cost only applies to POS orders.
- Start and End Dates: Set specific periods for costs. This is useful if your shipping rates change or if you have seasonal fulfillment adjustments.
Depending on the cost type, you can apply filters to target specific scenarios:
Skip Filters
- Skip for Shopify Payments: Skip this cost for orders paid via Shopify Payments. Useful when creating transaction fee costs for other payment gateways — since Kleio already pulls Shopify Payments fees automatically, this prevents double-counting.
- Skip for imported shipping cost: Skip this cost when an actual shipping cost has been imported from a 3PL (e.g., ShipHero). This lets you estimate shipping with a variable cost rule as a baseline, and automatically defer to the real cost once it’s imported.
Order Filters
- Shipping Rate Title: Create costs for specific carriers or shipping methods.
- Country: Apply costs only to specific shipping destinations.
- Payment Gateway: Apply costs only to orders paid through specific payment gateways.
- Order Tags: Apply costs only to orders with specific Shopify tags.
Product Filters
- Vendor: Apply costs only to products from certain suppliers.
- Type: Filter by product category or type.
- Tag: Use Shopify product tags to precisely target products for specific costs.
- Products/Variants: Target specific products or individual variants directly.
Recommended Setup
To get the most accurate profit tracking, we recommend setting up at least the following four variable costs:
- Shipping: What you’re paying for shipping. Set either an average per order (Per Order type) or set the precise cost by weight (By Order Weight type).
- Fulfillment: What you’re paying for picking and packing your orders. Typically an average per order (Per Order type) or something more advanced based on how your 3PL bills you.
- Return Costs: Fees associated with processing returns and handling.
- Transaction Fees: Typically a percentage of sales and a flat fee per order.
Note: Transaction fees for orders paid via Shopify Payments are automatically pulled into Kleio, so you don’t need to create a manual variable cost for them.