Understanding Your Order Data
When calculating shipping rates, your Liquid template has access to detailed information about the order through theshopify_rate_check object. This page explains what data is available and how to use it.
The rate check object
In the top right panel of Rate Lab, you’ll see a JSON object containing all the order information Shopify provides. Your Liquid template accesses this data to make shipping decisions.Basic structure
Line items (products in cart)
Access products usingshopify_rate_check.items or shopify_rate_check.line_items:
Common patterns with items
Calculate total weight:Destination (shipping address)
Access shipping address details:Geographic logic examples
Charge more for Alaska/Hawaii:Currency
The order’s currency is available at:Product properties and metafields
Items can have custom properties and metafields that you can use in your logic:Advanced: Working with variants
Some rate checks include variant information:Testing different scenarios
In Rate Lab’s top right panel, you can edit this data to test how your rates respond: Test heavier orders: Change"grams": 500 to "grams": 5000 on an item
Test international shipping:
Change "country_code": "US" to "country_code": "CA"
Test high-value orders:
Change item prices or quantities to create a large cart total
Test specific products:
Add or remove items, change SKUs, modify vendor names
Prices are always in cents
Remember: all price values in Rate Lab are in cents (or smallest currency unit):"price": 1995= $19.95"price": 50= $0.50- Your
total_priceshould also be in cents
Next steps
Now that you understand what data is available, explore how to use it:- Shipping Examples - See real-world examples using this data
- Cart & Pricing - Calculate rates based on cart value and weight
- Destination Controls - Adjust rates by geography
- Product Qualifiers - Use SKUs, vendors, and properties