Implementing QR codes and barcodes

Engage has an online tool for the generation of QR and barcode images which can then be sent out in customer emails.

Such an image could encode something personal like a member number (for easier identification), a personal reward voucher number or an order number. These images could then be used by an external system, like a POS, to easily pass information directly from a customer’s mobile phone screen.

Using the code image generator

To generate a barcode or QR image, you manually build an image URL like the one below, but with VALUE replaced by whatever you want to encode into the image.

As VALUE you must use a contact personalization field, like a contact’s member number. Using anything else as the “v“ parameter will only generate a code image with VALUE replaced by “SAMPLE”.

This is the correct format to use:[[contact.memberNumber | barcode]]

The “| barcode” part after the personalization field name is required. It is the “family name” for barcodes and QR codes in Engage.

Also note the “bar“ path in the URL, right before the question mark. Using "bar" generates a linear barcode. Using “qr“ in the path instead generates a QR code. In that case, your URL will look like this:[[contact.memberNumber | barcode]]

This is how you specify if you want to create a linear barcode or a QR code.

NOTE: This solution does NOT support static code images that are the same for every user. Only code images containing a personalised attribute for the contact receiving the message will work.

Entering the URL

When building an email in Engage, paste the URL you’ve made into the editor as an external image URL.

When an email is actually generated, the contact’s data will then be automatically inserted and a barcode or QR image encoding that specific data will be returned and embedded into the email.
You’ll never need to go to manually. If you do paste your image URL into a browser, you’ll only see a sample image like above. This is to prevent external parties from using our encoding tool.

Inserting your contact's data

Any of a contact’s personal fields can be used as VALUE. For example:

Email:[[ | barcode]]

Mobile phone number:[[contact.mobilePhone | barcode]]

Latest reward voucher number:[[contact.latestcheck.code | barcode]]

Contact external ID:[[contact.externalid | barcode]]

CAUTION! The “v” parameter must consist of a contact's personal fields.

Other parameters

The value “v” is a mandatory parameter and must always be used. There are also several other parameters you can add to adjust the form of the barcode (or QR code) returned. Example:[[contact.memberNumber | barcode]]

Or, if making a QR code image with the same data:[[contact.memberNumber | barcode]]

Another option to specify a prefix which will be placed before the value of the personal field:[[contact.mobilePhone | barcode]]&prefix=%2B

In this case the prefix is "+" which can then be displayed before the mobile number, for example. Note that the prefix you give must be URL-encoded.
Below you can see all the parameters you can use in the image URL:

Parameter Description Values


The value to be encrypted and stored in the image

String of letters and/or numbers from a personalization field


Used for both barcodes and QR codes but in different ways.

See below


For barcodes it’s the encoding.

code128 (default)







For QR codes it’s the Error correction level**

L, M, Q (default), H


Width in pixels

300 (default)


Height in pixels (Not used for QR code)

100 (default)


Color as a hexadecimal

000000 (default black)


Background color as a hexadecimal

ffffff (default white)


Some prefix that can be placed before the personal field value

For example, %2B, which is the character "+" URL-encoded.

* This is a mandatory parameter

** QR codes can be damaged or dirty but still be read. An error correction adds more pixels to the QR code to enable it to be restored if needed. The scale goes from low to high: L, M, Q, H.


QR codes can store any textual value, for example a member number, an email address or a URL. Barcodes, however, are a bit more limited. See the table below for type of value and data.

CAUTION! The URL defined in the image field in the email module is not in any way related to the value that the QR code or barcode will contain. The image will only contain the value of the “v” parameter.

The following coding standards, commonly used in retail, are supported:

Coding Value Limits



6 digits*



11 digits*



1-4096 characters



7 digits*



12 digits*

Code 128


1-128 characters, (A-z)

Code 93


Unlimited number of characters, (capital letters A-Z)

* An extra check digit will be added at the end when a barcode is generated.

Width and height

The physical size of the barcode or QR code can be set to match the layout of the email. A quiet zone (space) will always be added around the code to let scanners read it. Be careful when scaling codes; they can’t be too small as the number of pixels on the phone’s screen may not be sufficient to represent the code.

Always verify that your code is working by using real scanners.


Scanners function best with high contrast so be sure to have a good contrast between the color and the background. Verify the code by the use of real scanners.

Preview the code

The URL will only show the actual code image when the email is previewed using a selected contact, or in a sent email. When emails are created in the email editor, the code will only display a general sample.


There are different scanners available and not all of them can handle all codes, or successfully scan all phone screens. Again, to be sure you should verify the code by the use of real scanners.

The scanner will send the value stored in the code to the connected system. Many scanners emulate a keyboard when sending a value to a connected system. There is no logic stored in the code so the receiving system needs a way to know what this value represents and how to process it.

Was this article helpful?
0 out of 0 found this helpful



Article is closed for comments.