Barcode in email

This feature enables you to create a barcode that contains customer identifier information and can be used by customers for identification purposes. Customers can use this barcode at the POS to identify themselves and earn/claim loyalty benefits.

📘

Note

  • Barcode feature is not enabled by default. Create a JIRA ticket to the sustenance team to enable the feature.
  • Barcode feature can be used both in Loyalty programs and on Engage+.

Prerequisties to enable barcode

  1. To enable barcode generation, the following configurations must be enabled:

    1. CONF_REGISTRATION_BARCODE_GEN_ENABLED: Set the value to 0 or 1. Default value: 0- False

    2. CONF_BARCODE_VALUE_IDENTIFIER: Set the value to 0,1 or 2 to set the barcode identifier. You can set the identifier according to the information to embed in the barcode.

      ValueDescription
      0Mobile number of the customer.
      1Email ID of the customer.
      2The external ID of the customer.
  2. Raise a Jira ticket assigned to the Foundation team and enable bucket, namespace, and CDN URL support for the barcode service on the respective cluster where the organization is located.

Configuring barcode

Capillary supports six types of barcodes, given below:

  • ITF
  • PDF417
  • EAN 13
  • UPC A
  • QR code
  • CODE 128

Default barcode configuration

FieldValue
Default barcode typeCODE_128
Image typePNG
Default barcode styles
according to the barcode type:
- ITF- Barcode text: Disabled
- Image height: 200
- Image width: 400
- QR_CODE- Barcode text: Disabled
- Image height: 200
- Image width: 300
- Image width padding - Enabled
- Image height padding - Enabled
- PDF_417- Barcode text: Disabled
- Image height: 200
- Image width: 300
- Image width padding: Enabled
- Image height padding: Enabled
- Font size: 5
- EAN_13- Barcode text: Disabled
- Image height: 200
- Image width: 300
- Image width padding: Enabled
- Image height padding: Enabled
- Font size: 5
- UPC_A- Barcode text: Enabled
- Image height: 200
- Image width: 300
- Image width padding: Enabled
- Image height padding: Enabled
- Font size: 5
- Font name: Arial
- CODE_128- Barcode text: Disabled
- Image height: 200
- Image width: 300
- Image width padding: Enabled
- Image height padding: Enabled
- Font size: 5
- Font name: Arial
FieldData TypeDescription
default_barcodeStringDefault barcode type that will be used if no barcode type is mentioned in the barcode service API.
showBarcodeTextBooleanIf set to true, the text will be displayed with config
imageHeightIntegerHeight of the image in pixels.
imageWidthIntegerWidth of the image in pixels.
imageWidthPaddingIntegerPadding around the width of the barcode image. This property is applicable when showBarcodeText is set to true. Not applicable for ITF barcode.
imageHeightPaddingIntegerpadding around the length of the barcode image. This property is applicable when showBarcodeText is set to true. Not applicable for ITF barcode.
fontNameStringName of the font. Not applicable for EAN 13, PDF417, QR Code, ITF barcode.
fontSizeStringSize of the font. Not applicable for ITF and QR code.

To edit the default barcode configuration, create a JIRA ticket to the Capillary sustenance team.

Generating barcode

According to the configuration, during customer registration, the Customer Add API calls the barcode service and the barcode image is stored in the images table in the backend. If the identifier provided in the configuration is changed using customer identifier change API, a new barcode image is created and saved. You can retrieve the barcode image details using the GET customer details API.

📘

Note

If you want to create a barcode for an existing user or regenerate a barcode, create a ticket to the Sustenance team.

To embed the barcode in the email creative, perform the following:

  1. Navigate to the Engage+ homepage, and select the campaign to send the email creative.
  1. Click New message to create a new email creative.
  1. In the Content block, click Add creative.
  1. Navigate to the Email tab and click Create new.
  1. Click Create using editor and click Continue.

  2. Select a template of your choice.

  1. In the email body, click Add label and select Customer barcode label.

  2. Embed the {{customer_barcode}} tag in your email template.

A barcode has been generated for the customer. A broken image is sent to the customer if a barcode fails to generate.