Customizing with Liquid

Partial.ly allows you to customize certain content, such as emails, contracts, or tracking scripts, with the liquid templating language. Liquid allows you to insert dynamic content into your emails or contracts, such as customer information and payment plan information.

See here for an introduction to liquid syntax

Partial.ly makes all the standard filters available, plus a few additional filters.

Objects

The following objects may be available in your liquid templates, depending on the context. Wherever you can customize content with liquid, you should see a list of available items in that context. In addition to the below properties, all objects will also have an id and inserted_at (date and time the object was created) property.

customer

The customer variable has the following properties:

  • first_name
  • last_name
  • email
  • phone
  • shipto_name
  • shipto_address
  • shipto_address2
  • shipto_city
  • shipto_state
  • shipto_postal_code
  • shipto_country
  • timezone

payment_plan

The payment_plan variable represents the payment plan, and has the following properties:

  • amount - the total amount of the payment plan
  • subtotal - subtotal of line_items before shipping, taxes, or fees
  • currency
  • status
  • number
  • integration - if the plan is part of an integration outside of Partial.ly, it will be here. Such as shopify, quickbooks, or woocommerce
  • integration_id - if integrated, the id of the associated object in the integrated system. For example the shopify order id
  • amount_paid
  • meta - meta information about the plan. May contain the description key
  • ip_address - ip address of user that created the plan
  • is_reopened - true if the payment plan has been reopened

payment_schedule

The payment_schedule variable represents the schedule the payment plan will be paid with:

  • amount - the amount the payment schedule is for, may be different than the payment_plan amount if multiple schedules have been created
  • auto_process - whether or not payments are automatically scheduled and processed
  • down_payment_amount - the down payment due
  • description - description of payment schedule for manually processed plans
  • repay_by_date - date payment schedule complete
  • payment_amount - amount of scheduled payments
  • num_payments - number of scheduled payment
  • balance - balance after down payment
  • frequency_units - units of the payment frequency, ex months
  • frequency - the frequency of payments, ex 1
  • term_units - units of payment term
  • term - number of payment term
  • starts_auto - whether or not the schedule automatically calculates when to start
  • starts_date - a manually set starting date

installments

A list of installments in a payment_schedule. Each installment has the following properties:

  • scheduled - the date the installment is scheduled to be paid
  • amount
  • retry_number - if the original scheduled installment failed, this is the number of retries

merchant

  • name
  • email
  • logo_custom - true if merchant has uploaded a logo
  • logo_name - full url to the uploaded logo

payment_method

  • type - either card for credit/debit card or bank_account

line_items

A list of line_items (products) associated with an order. Each line_item has the following properties:

  • description
  • amount
  • quantity
  • meta - map of meta information for the line item, integration specific. For Shopify and Woocommerce it will contain the sku, if sent, as well as product_id and variation_id

dynamic_items

A list of line_items which have been dynamically calculated and added to the plan, such as shipping, taxes, and fees. Same properties as line_item above, plus the following:

  • dynamic - true
  • dynamic_type - type of line_item, either shipping, tax, or generic

Filters

In addition to all the standard liquid filters, Partial.ly also makes the following filters available

json

json encodes an object. Useful in custom checkout tracking and conversion scripts for encoding Partial.ly data to use with javascript.

example input:
{{ merchant | json }}

example output:
{"name": "sample merchant", "email": "sample@example.co"}

currency

Formats a number using format for the supplied currency

example input:
{{ payment.amount | currency: payment_plan.currency }}

example output:
$500.00

humanize_full_date

detailed human friendly date formatting

example input:
{{ installment.scheduled | humanize_full_date }}

example output:
Sunday June 3, 2018

humanize_date

human friendly date formatting

example input:
{{ installment.scheduled | humanize_date }}

*date format determined by merchant location

MMDDYYYY example output:
June 3, 2018

DDMMYYYY example output:
3 June, 2018

humanize_short_date

abbreviated human friendly date formatting

example input:
{{ installment.scheduled | humanize_short_date }}

example output:
June 3, 2018