Welcome to Zuora Product Documentation

Explore our rich library of product information

Using barcodes in templates for invoices

Explore how to incorporate barcodes into your invoice templates using barcode merge fields, with support for up to five fields per template.

To have a barcode on your invoice, you need to use a barcode merge field in your template. Currently, Zuora supports up to five barcode merge fields per invoice template.

Use the following format for your barcode merge field:

{MERGEFIELD "Image:{BarCode field}, Value:[{Value}], CodeTextPosition:{CodeTextPosition}, ImageWidth:{image width in point}, ImageHeight: {image height in point}, DpiX:{dpi value horizontally}, DpiY:{dpi value vertically}" * MERGEFORMAT}

Parameter

Possible values

BarCode field

  • BarCode.Code128

  • BarCode.AustraliaPost

  • BarCode.Code39

  • BarCode.Code39Extended

  • BarCode.ITF6

  • BarCode.ITF14

Value

This can contain a string, a Customer Account or Invoice custom field, or a merge field from:

CodeTextPosition

This is an optional field that defines the text position of the barcode:

  • Below (default)

  • Above

  • None

ImageWidth

The width of the barcode, measured by points (1/72 inch).

The value is an integer not greater than 3,200.

ImageHeight

The hight of the barcode, measured by points (1/72 inch).

The value is an integer not greater than 3,200.

DpiX

The horizontal resolution of the barcode, measured by dots per inch (DPI).

The value is an integer not greater than 500.

DpiY

The vertical resolution of the barcode, measured by dots per inch (DPI).

The value is an integer not greater than 500.

Example

The following example will return a barcode of the bill to contact's postal code:

{MERGEFIELD “Image:BarCode.Code128, Value:[{MERGEFIELD BillToContact.PostalCode \* MERGEFORMAT}]” \* MERGEFORMAT}

Example invoice template:

Invoice template example

Returned example invoice:

Invoice example