Select Page
Common searched topics: Manufacturing, Label printing, Sales order
Browse features guide
Managing products
Label printing
Imports, exports & integrations
Sales
Stock level reports
inFlow settings
Manufacturing
Sales
  • Sales orders
  • Purchase orders
Adding HTML/CSS to documents

Designing your inFlow document with HTML/CSS (beta)

Do you need more control over the document you’re designing? Use the Custom HTML block to add a section you can customize using HTML/CSS code.

This block uses both HTML/CSS and Liquid templating language. The HTML/CSS portion allows you to style the block, whereas Liquid is a simple plain text language for referencing your inFlow data. 

Liquid variables in inFlow

Variables are data that are dynamically inserted into the inFlow document. You can think of the variable as a placeholder that gets filled in on a per-order basis.

Here’s a list of variables you can use to design your document. 

Your company information

These variables return all the information you’ve entered into your inFlow settings under Account > Company details.

VariableDescription
{{company.name}} Your company name.
{{company.address1}}The first line of your company address.
{{company.address2}}The second line of your company address.
{{company.city_state}}Your company address’ city and state combined. 
{{company.city}}Your company address’s city.
{{company.state}}Your company address’s state.
{{company.postal_code}}Your company address’s postal code.
{{company.country}}Your company address’s country.
{{company.phone}}Your company address’s phone number.
{{company.fax}}Your company address’s fax number.
{{company.email}}Your company address’s email address.
{{company.website}}Your company address’s website.
{{company.misc_info}}Your company address’s additional information listed in the Misc. info section.
Your inFlow company information variables

Order information

Use these variables to insert the order number and date information about the sales order. 

VariableDescription
{{so.order_number}}The inFlow sales order number.
{{so.order_date}}The sales order date.
{{so.requested_ship_date}}The requested ship date. 
{{so.invoiced_date}}The invoiced date.
{{so.due_date}}The due date.
{{so.date_paid}}The date paid. If there are multiple payments, this only returns the last date paid.
{{so.return_date}}The sales order return date. 
Order information variables


Dates will show in a format following your browser locale, along with the timestamp. If you want to change the way this looks, use a filter ( | ) along with the variable.

{{so.order_date | Date: "MMM dd, yyyy" }}


Customer details and addresses

These variables return the customer details as listed on the sales order. Note that this can be different from what’s stored in the customer record. 

VariableDescription
{{so.customer.name}}The customer’s name as listed in the sales order.
{{so.customer.remarks}}The customer’s remarks as listed in the customer details.
{{so.customer.tax_exempt_number}}The customer’s tax exempt # as listed in the customer details.
{{so.contact_name}}The customer’s contact name.
{{so.phone}}The customer’s phone number.
{{so.email}}The customer’s email address. 
{{so.billing_address1}}The first line of your customer’s billing address.
{{so.billing_address2}}The second line of the billing address.
{{so.billing_city_state}}The billing address city and state combined. 
{{so.billing_city}}The billing address city.
{{so.billing_state}}The billing address state.
{{so.billing_country}}The billing address country.
{{so.billing_postal_code}}The billing address postal or zip code.
{{so.billing_address_remarks}}The billing address remarks.
{{so.ship_to_company_name}}The company name to ship to, if different from the customer’s name. Used for dropshipping. Set in the “Care of” under the shipping address section.
{{so.shipping_address1}}The first line of your customer’s shipping address as listed in the sales order. 
{{so.shipping_address2}}The second line of the shipping address.
{{so.shipping_city}}The shipping address city and state combined. 
{{so.shipping_city_state}}The shipping address city.
{{so.shipping_state}}The shipping address state.
{{so.shipping_country}}The shipping address country.
{{so.shipping_postal_code}}The shipping address postal or zip code.
{{so.shipping_address_remarks}}The shipping address remarks.
Customer details variables

Overall totals

Use these for the overall totals, which include any returned/refunded amounts. 

VariableDescription
{{so.subtotal}}The overall subtotal amount.
{{so.tax1_name}}The name of the primary tax.
{{so.tax1}}The overall primary tax amount.
{{so.tax2_name}}The name of the secondary tax.
{{so.tax2}}The overall secondary tax amount.
{{so.freight}}The overall freight amount. 
{{so.total}}The overall total amount.
{{so.amount_paid}}The overall amount paid. 
{{so.balance}}The overall balance.
{{so.credit}}The overall amount to refund. 
Overall totals variables

Order totals

These variables return the order totals, excluding any refunds.

VariableDescription
{{so.order_sub_total}}The order subtotal on the sales tab, not including any returns. 
{{so.order_tax1}}The primary tax amount. 
{{so.order_tax2}}The secondary tax amount. 
{{so.order_freight}}The freight amount. 
{{so.order_total}}The total amount. 
Order totals variables

Return totals

These variables concern the return/refund amounts only.

VariableDescription
{{so.return_sub_total}}The subtotal amount on the Return tab. 
{{so.return_tax1}}The primary tax amount on the Return tab.
{{so.return_tax2}}The secondary tax amount on the Return tab.
{{so.return_freight}}The freight amount on the Return tab.
{{so.return_total}}The total amount on the Return tab.
{{so.return_fee}}The fee amount on the Return tab.
Return totals variables

Additional order details

These are additional details in the sales order. 

VariableDescription
{{so.sales_rep}}The sales representative for the sales order. 
{{so.po_number}}Your customer’s P.O. number listed on this sales order.
{{so.payment_terms}}The payment terms set for this sales order. 
{{so.exchange_rate}}The exchange rate between order currency and home currency..
{{so.payment_method}}The payment method used for this order. If there are multiple payments of different methods, this only returns the first payment method used
{{so.order_remarks}}The information listed in the Remarks section in the Sales Order tab.
{{so.picking_remarks}}The information listed in the Remarks section in the Pick tab.
{{so.shipping_remarks}}The information listed in the Remarks section in the Ship tab.
{{so.return_remarks}}The information listed in the Remarks section in the Return tab.
{{so.restock_remarks))The information listed in the Remarks section in the Restock tab.
{{so.payment_remarks}}The information listed in the Remarks section in the first entry of the Payment details popup.
{{so.weight}}The total weight of products in this sales order.
{{so.volume}}The total volume of products in this sales order.
{{so.quantity}}The total quantity of products in this sales order, in standard UoM.
Additional order details variables

Product information variables

Since a document could contain more than one product, to display this properly, you’d need to use a loop. It essentially runs that bit of code for every product in the document.  

{% for line in so.lines %}
  {{ line.name }}
{% endfor %}

If you want the product information to be listed in a table format, you’ll need to incorporate the loop into an HTML table.

Example table:

<table style="width:50%">
  <tr>
    <th style="text-align: left">SKU</th>
    <th style="text-align: left">Qty</th>
    <th style="text-align: right">Subtotal</th>
  </tr>
  <tr> {% for line in so.lines %}
    <td>{{line.SKU}}</td><td>{{ line.quantity }}</td><td style="text-align:right"> {{line.subtotal}}</tr>
{% endfor %}
</table>

Here is the list of available product variables.

VariableDescription
{{line.name}}The product’s name.
{{line.description}}The product’s description. 
{{line.sku}}The product’s SKU.
{{line.image_url}}The product’s image.
{{line.category}}The product’s category. 
{{line.barcode}}The product’s barcode. 
{{line.quantity}}The product quantity as listed in the sales order. Includes the sales unit of measure. 
{{line.unit_price}}The product unit price. This amount does not include any discounts. 
{{line.unit_price_with_discount}}The product discounted unit price. 
{{line.subtotal}}The product subtotal. 
{{line.tax_code}}The product’s tax code (“Taxable”, “Non-taxable”, etc.)
{{line.dimensions}}The product dimensions (length x width x height). 
{{line.item_weight}}The product weight for a single unit. 
{{line.item_volume}}The product volume for a single unit.
{{line.item_total_weight}}The total weight for the product.
{{line.item_total_volume}}The total volume for the product.
{{line.line_num}}The line number for the product. 
Product information variables

To adjust the image size and other formatting, you’ll need to apply some CSS.

<img src={{line.image_url}} style="width:48px; height:48px; vertical-align: middle; margin-right:16px" />

Custom fields variables

These are the variables corresponding to the information you’ve set up under Global > Customization > Custom fields. Note that there are two types of variables: one for the name of the field (e.g. Alternate Contact), and the other for its value in the sales order (e.g. Jane, John, etc.). 

There are 10 custom fields available for sales order, customer and product. The formatting is similar for each.

{{so.custom_name1}}, {{so.custom_name2}}, … {{so.custom_name10}}
The names of the sales order custom field as set up in your settings.

{{so.custom1}}, {{so.custom2}}, … {{so.custom10}}
The values of the sales order custom fields as it appears in the sales order.

{{so.customer.custom_name1}}, {{so.customer.custom_name2}}, … {{so.customer.custom_name10}}
The names of the customer custom fields as set up in your settings.

{{so.customer.custom1}}, {{so.customer.custom2}}, … {{so.customer.custom10}}
The values of the customer custom fields as it appears in the sales order.

{{line.custom_name1}}, {{line.custom_name2}}, … {{line.custom_name10}}
The names of the product custom fields as set up in your settings.

{{line.custom1}}, {{line.custom2}}, … {{line.custom10}}
The values of the product custom fields as it appears in the sales order.

Additional options for quantity and pricing details

There are some additional options to customize the way your quantities and prices are displayed.

 {{line.quantity_details.standard_quantity}}
The quantity in the standard unit of measure. For example,  if you sold the product in packs of 5 units, this would return 5 instead of 1, 10 instead of 2, etc.  

{{line.quantity_details.uom_quantity}} 
The quantity in the sales unit of measure.

{{line.quantity_details.uom}}
The product sales unit of measure (without any quantities).

{{line.discount_details.pretty}}
The line item discount, formatted in % or $ depending on the order: e.g. 10% or $10

{{line.unit_price_details.pretty_with_iso_code}}
The product unit price with ISO code instead of currency symbol: e.g. USD 89.99 instead of $89.99

{{line.unit_price_with_discount_details.pretty_with_iso_code}}
The discounted product unit price, with ISO code instead of the currency symbol.

{{line.subtotal_details.pretty_with_iso_code}}
The product subtotal with ISO code instead of the currency symbol.

HTML, CSS, and liquid resources

There are many guides on these languages. Here’s some to get you started:

Was this guide helpful?
Yes, thanks!
Not really
Thank you for your input, your feedback is important to us!

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

In this tab
  • Liquid variables in inFlow
  • Your company information
  • Order information
  • Customer details and addresses
  • Product information variables
  • Custom fields variables
  • HTML, CSS, and liquid resources
Similar articles

A complete guide on how to set up inFlow.

Get advice and answers from the inFlow Support team