Customizing with Liquid
Customizing with Liquid
Partial.ly allows you to customize certain content, such as emails, contracts, or tracking scripts, with the Liquid templating language. Liquid lets you insert dynamic content into your emails or contracts, such as customer information and payment plan information.
See an introduction to Liquid syntax for the basics.
Partial.ly makes all the standard Liquid filters available, plus a few additional filters (see below).
Objects
The following objects may be available in your Liquid templates, depending on context. Wherever you can customize content with Liquid, you should see a list of available items in that context. In addition to the properties below, all objects also have an id and inserted_at (date/time created) property.
customer
- first_name
- last_name
- phone
- shipto_name
- shipto_address
- shipto_address2
- shipto_city
- shipto_state
- shipto_postal_code
- shipto_country
- timezone
payment_plan
- amount — total amount of the payment plan
- subtotal — subtotal of line_items before shipping, taxes, or fees
- currency
- status
- number
- integration — if part of an integration outside Partial.ly (e.g., shopify, quickbooks, woocommerce)
- integration_id — the id of the associated object in the integrated system (e.g., the Shopify order id)
- amount_paid
- meta — meta information about the plan; may contain a description key
- ip_address — IP address of the user who created the plan
- is_reopened — true if the payment plan has been reopened
payment_schedule
- amount — amount the schedule is for (may differ from payment_plan amount if multiple schedules created)
- auto_process — whether payments are automatically scheduled and processed
- down_payment_amount
- description — for manually processed plans
- repay_by_date — date the schedule completes
- payment_amount — amount of scheduled payments
- num_payments
- balance — balance after down payment
- frequency_units / frequency — e.g., months / 1
- term_units / term
- starts_auto — whether the schedule automatically calculates when to start
- starts_date — a manually set starting date
installments (list, each with):
- scheduled — date the installment is scheduled to be paid
- amount
- retry_number — number of retries, if the original scheduled installment failed
merchant
- name
- logo_custom — true if merchant has uploaded a logo
- logo_name — full URL to the uploaded logo
payment_method
- type —
cardorbank_account
line_items (list, each with):
- description
- amount
- quantity
- meta — integration-specific info; for Shopify/WooCommerce, may contain sku, product_id, and variation_id
dynamic_items — line_items that were dynamically calculated and added to the plan (shipping, taxes, fees). Same properties as line_item, plus:
- dynamic — true
- dynamic_type —
shipping,tax, orgeneric
Filters
In addition to all standard Liquid filters, Partial.ly also provides:
json — encodes an object. Useful for custom checkout tracking/conversion scripts.
- Input:
{{ merchant | json }} - Output:
{"name": "sample merchant", "email": "sample@example.co"}
currency — formats a number using the supplied currency.
- Input:
{{ payment.amount | currency: payment_plan.currency }} - Output:
$500.00
humanize_full_date — detailed human-friendly date formatting.
- Input:
{{ installment.scheduled | humanize_full_date }} - Output:
Sunday June 3, 2018
humanize_date — human-friendly date formatting (format depends on merchant location).
- Input:
{{ installment.scheduled | humanize_date }} - Output (MMDDYYYY):
June 3, 2018 - Output (DDMMYYYY):
3 June, 2018
humanize_short_date — abbreviated human-friendly date formatting.
- Input:
{{ installment.scheduled | humanize_short_date }} - Output:
June 3, 2018