Templates: Liquid Reference Guide
Postsale specific Liquid objects, collections, properties, and filters
This guide lists the Liquid objects, collections, and properties you can use in your Postsale templates. It also includes the Postsale-specific Liquid filters. Check out our Advanced Template Editing help article for more information on using Liquid template language in Postsale.
Objects, Collections, and Properties
Order Objects
| OBJECT |
|---|
| order.id |
| order.number |
| order.import_id |
| order.status |
| order.requested_shipping |
| order.source |
| order.archived |
| order.bill_address.id |
| order.bill_address.name |
| order.bill_address.company |
| order.bill_address.street_line_1 |
| order.bill_address.city |
| order.bill_address.state |
| order.bill_address.postal_code |
| order.bill_address.country_code |
| order.bill_address.phone |
| order.bill_address.email |
| order.bill_address.street_line_2 |
| order.bill_address.street_line_3 |
| order.ship_address.id |
| order.ship_address.name |
| order.ship_address.company |
| order.ship_address.street_line_1 |
| order.ship_address.city |
| order.ship_address.state |
| order.ship_address.postal_code |
| order.ship_address.country_code |
| order.ship_address.phone |
| order.ship_address.email |
| order.ship_address.street_line_2 |
| order.ship_address.street_line_3 |
| order.payment.id |
| order.payment.name |
| order.payment.amount |
Order Collections
| COLLECTION | PROPERTIES |
|---|---|
| order.items | |
| item.id | |
| item.name | |
| item.quantity | |
| item.sku | |
| item.price | |
| item.weight | |
| item.weight_unit | |
| item.harmonized_code | |
| item.country_of_origin | |
| order.charges | |
| charge.id | |
| charge.description | |
| charge.amount | |
| charge.type | |
| order.notes | |
| note.id | |
| note.content | |
| note.date | |
| note.updated_at | |
| order.payment |
Shipment Objects
How to return values for each shipment when an order has more than one shipment associated with it.
| OBJECT |
|---|
| General Shipment Information |
| shipment.id |
| shipment.ship_date |
| shipment.reference |
| shipment.rate_selection |
| shipment.status |
| shipment.confirmation |
| shipment.created_at |
| shipment.updated_at |
| shipment.carrier |
| shipment.service |
| Insurance |
| shipment.insurance.apply_insurance |
| shipment.insurance.amount |
| shipment.insurance.amount_source |
| shipment.insurance.insurance_provider |
| Ship To/From Address |
| shipment.from_address_type |
| shipment.from_address.name |
| shipment.from_address.company |
| shipment.from_address.street_line_1 |
| shipment.from_address.street_line_2 |
| shipment.from_address.street_line_3 |
| shipment.from_address.city |
| shipment.from_address.state |
| shipment.from_address.postal_code |
| shipment.from_address.country_code |
| shipment.from_address.phone |
| shipment.from_address.email |
| shipment.domestic |
| shipment.residential |
| shipment.to_address.name |
| shipment.to_address.company |
| shipment.to_address.street_line_1 |
| shipment.to_address.street_line_2 |
| shipment.to_address.street_line_3 |
| shipment.to_address.city |
| shipment.to_address.state |
| shipment.to_address.postal_code |
| shipment.to_address.country_code |
| shipment.to_address.phone |
| shipment.to_address.email |
| shipment.to_address.id |
| shipment.to_address.residential |
| Label References |
| shipment.reference_1 |
| shipment.reference_2 |
| shipment.reference_3 |
| Customs |
| shipment.customs.broker_select |
| shipment.customs.customs_items |
| shipment.customs.aes_itn_exemption |
| shipment.customs.returns_clearance |
| shipment.customs.customs_content_type |
| shipment.customs.third_party_consignee |
| shipment.customs.submit_commercial_invoice_electronically |
| Return Shipment |
| shipment.return_shipment_type |
| shipment.return_shipment_data.carrier |
| shipment.return_shipment_data.service |
| shipment.hazardous_materials |
| shipment.hazardous_materials_type |
| FedEx Specific |
| shipment.battery.contains_batteries |
| shipment.battery.material |
| shipment.battery.packing |
| shipment.battery.regulatorySubType |
| shipment.hold_at_location.send_to_location |
| shipment.saturday_delivery |
| shipment.non_standard_container |
| shipment.home_delivery_premium.type |
Shipment Collections
| COLLECTION | PROPERTIES |
|---|---|
| shipment.packages | |
| package_id | |
| package.shipment_id | |
| package.length | |
| package.width | |
| package.height | |
| package.dim_unit | |
| package.weight | |
| package.weight_unit | |
| package.package_type | |
| package.sequence | |
| package.options | |
| shipment.labels | |
| label.carrier_reference | |
| label.tracking_number | |
| label.tracking_status | |
| label.total_cost |
Use to call specific images that have been uploaded to Postsale in Account Settings > Templates > Images.
plain
{{images.image_name}}Postsale Specific Liquid Filters
| FILTERS | DESCRIPTION | EXAMPLES |
|---|---|---|
| money | Returns a string formatted as currency with a dollar sign. Pass an optional currency sign to use instead of the dollar sign. | {{ 8.99 | money }} returns '$8.99' {{ 8.99 | money: '€' }} returns '€8.99' |
| parse_name | Parses the given string and outputs an object containing first, last, middle, suffix and title properties. | {{ "Mr. John Franklin Doe II" | parse_name | json }} returns {"first":"John","last":"Doe","middle":"Franklin","suffix":"II","title":"Mr."} |
| first_name middle_name last_name suffix title | Returns the specified name piece. | {{ "Mr. John Franklin Doe I" | last_name }} returns Doe |
| shipping_carrier | Returns the name of the carrier associated with a shipment. | {{ shipment | shipping_carrier }} returns FedEx |
| shipping_service | Returns the carrier service name associated with a shipment. | {{ shipment | shipping_service }} returns FedEx 2Day® |
| snake_case_to_label | Removes any underscores and capitalizes the first letter of each word in a string. | {{ "carrier_awaiting_package" | snake_case_to_label }} returns Carrier Awaiting Package |
| csv | Creates a CSV document with columns for each property of the specified object. | {{ shipments | csv }} returns A CSV file for the shipment object. There is a column for each property. |
On this page
Related