How to use QR codes, barcodes (EAN-8, EAN-128), ISBN or any code used in retail industry in Adobe Campaign with recipient customization.



The goal here is to send a custom email per recipient. Each customer will receive an email with its own code. It can be displayed in plain text, as a EAN-128 barcode or as a QR code:

It can then be read using any device, such as an iPhone 7 with the default Camera app:

Edit the recipient data schema

Add a new field in your recipient data schema to store the coupon code:

<srcSchema _cs="Recipients (fco)" entitySchema="xtk:srcSchema"    
  extendedSchema="nms:recipient" name="recipient" namespace="fco" xtkschema="xtk:srcSchema">
  <element name="recipient">
    <attribute label="Coupon Code" name="couponCode" type="string"/>

Create the Email delivery

The images for the barcodes are generated using the built-in tools Include

It automatically creates an image generated on the server with the following URLs:

  • Barcode
  • QR Code
    • Generic:
    • Example:, where OTE4NDI= is the base 64 value of 91842
    • In JS:
      <% var qrCodeMemBuf = new MemoryBuffer(); qrCodeMemBuf.fromString(recipient.couponCode); %><%= qrCodeMemBuf.toBase64() %>/barcode.gif



Generate coupon codes

Coupon codes can come from any source, I used with 2 fields: email and 5 random numbers.

Then in a workflow, create a Data Loading File (it can be a query from staging table too), connected to an Enrichment (Simple Join 1-1 on @email), a Change dimension and an Update data: