Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

...

...

...

...

...

Overview

MailUp v8.3 and later gives above gives you the ability to dynamically generate a barcode and associate it with a  barcode, linked to a recipient field. This feature comes in handy when you want in many scenarios, such as when needing to insert into an email message a unique discount or promotion code in an email campaign.

The frontend page page mentioned below (barcode.aspx) will render and print out a barcode image, starting from a numeric/alpha numeric sequence dynamically built based on alphanumeric sequence dynamically retrieved from a recipient field.

The system passes two unique values to the page ("IdOptin" and  and "Hash" arguments passed to the page.

This page requires the numeric sequence to be previously stored in one of the personal information fields in order to run. This requirement was introduced in order to prevent fraud URL usage or any kind of exploitation of the service.

Barcode.aspx resides in the "frontend" root of each 8.3 console or later version and does not store or save any of the rendered barcode images on the "console" storage disk so that the server burden will be kept at its lowest.

...

titleNote:

...

in order to avoid a fraudulent use of the feature.

Info
titleNotes
  • This section of the User Guide requires some basic knowledge of HTML.
  • When viewed in the message editor in the admin console, the barcode will be displayed
with
  • using a default value.

How

...

it works

The feature works as follows:

  • A special image URL is generated as shown below
  • The image URL (i.e. the HTTP location of the image) is included into the src property of the image HTML tag.

Base URL

Code Block
languagehtml/xml
http://<consoleurl>/frontend/Barcode.aspx

...

URL completed with parameters

Code Block
languagehtml/xml
<img src=http://<ConsoleHost>/frontend/Barcode.aspx?idoptin=[_idoptin]&hash=[_hash]&BarcodeHeight=60&SymbologyId=14&NarrowBarWidth=2&bearerbarsmode=0&BitmapTargetFormat=1&Ratio=0&TargetDynField=[

...

PromoID]&FontHeight=0,2 />

 

...

Note
titleNote:
  • See the section at the bottom of this document for a list and description of the various parameters
  • The recipient field used in the example above is PromoID:
 
  • it must be a numeric value (for symbology 14 in the above snippet you can fill it using any number of even length)
  • Don't' forget to replace <consolehost> with the actual domain of you admin console
  • The above sample requests a i2of5 formatted barcode ( SymbologyId = 14 ), sets height to 60 pixels with 0,2 points font. Each symbology has its own specific set of requirements ( starting from the length of the numeric sequence it will be built on )

 

Tip
Don't' forget to replace <consolehost> with the actual URL of you MailUp console and fill the recipient field LatestShippedOrderID with a real barcode numeric value ( for symbology 14 in the above snippet you can fill it using any number of even length ).

 

Output sample

...

Output sample

Below a sample of Interleaved 2 of 5 rendered from a 14 digits sequence


Image Added

How to build your Barcode URL

The system does not yet include a feature to build the URL for you, so for now you need to build it yourself. Don't panic, though, it only takes a minute (smile)

Here are the steps to take:

  1. Open your text editor: we recommend Notepad++, but Windows Notepad will be fine too.
  2. Paste in the editable window the following snippet:

    http://<ConsoleHost>/frontend/Barcode.aspx?idoptin=[_idoptin]&hash=[_hash]&BarcodeHeight=60&SymbologyId=14&NarrowBarWidth=2&bearerbarsmode=0&BitmapTargetFormat=1&Ratio=0&TargetDynField=[PromoID]&FontHeight=0,2
     
  3. Replace the parts of the query string marked in red with your account-specific information:
    1. Replace <consolehost> with your admin console URL
    2. Replace LatestShippedOrderId with the recipient field you've chosen to hold (and filled in with) the barcode numeric number.
  4. Select it (CTRL + A) and copy it to clipboard (CTRL +C)
  5. Now open your web browser and log into your admin console
  6. Click on Messages > Email > New > Create New Email or edit an existing message.
  7. In the message editor, switch to HTML mode
  8. Write a plain and empty HTML Img tag such as <img src="" /> in the writable area of the editor as below

    Image Added
  9. Enter the URL you copied above into the src tag. For example, assuming your admin console URL were http://c9x8d.s56.it/ and that the recipient field you are using to store the unique number to use in the barcode is called PromoID, the code would look as follows:

    <img src="http://c9x8d.s56.it/frontend/Barcode.aspx?idoptin=[_idoptin]&hash=[_hash]&BarcodeHeight=60&SymbologyId=14&NarrowBarWidth=2&bearerbarsmode=0&BitmapTargetFormat=1&Ratio=0&TargetDynField=[PromoID]&FontHeight=0,2" /> 
     
  10. Click on Save. Now you should be seeing the barcode rendered in the preview window as shown below

    Image Added

Troubleshooting

  • Barcode rendering fails: the application may receive a wrong sequence format against a certain symbology : the application won't display any error message but it will display instead an empty 1x1 pixel image so that the calling image won't appear as broken

Parameters

Request parameters (Table 1)

Here is a description of the parameters mentioned in the barcode 

Name

Mandatory?

Description

IdOptIn

y

Recipient User Id

Hash

y

Recipient hash unique value

BarcodeHeight

y

Barcode image height in pixels

SymbologyId

y

Id representing a certain barcode format ( 14 = ITF )

TargetDynField

y

The dynamic field containing the numeric barcode sequence

NarrowBarWidth

n

Width in pixel of the narrow bar

BearerBarsmode

n

It sets what bearers bars the barcode will display ( 0 = None, 1 = Horizontal, 2 = Full )

BearerBarsSize

n

Width in pixels of the bearers bars ( applies only if BearerBarsmode > 0 )

Ratio

n

The times the wide bar will be displayed for each narrow bar

ChecksumAdd

n

This Boolean defines if the numeric sequence needs to be completed with a computed check digit ( default is false )

IsNumberVisible

n

If true, it displays the input numeric sequence underneath the barcode

FontHeight

n

Font height in points, use comma as decimal mark

 

Symbology format Id reference (Table 2)

SymbologyId

Symbology name

1

Codabar

2

Code11

3

Code128

4

Code39

5

Code39Ext

6

Code93

7

Code93Ext

8

Deutsche Post Ident Code

9

Deutsche Post Leit Code

10

Ean218

11

Ean13

12

Ean14

13

Ean8

14

Interleaved 2 of 5

15

ITF14

16

Msi

17

Numly

18

Opc

19

Planet

20

Postnet

21

Pzn

22

Royal Mail 4 state

23

Royal Tnt Post Kix

24

Industrial 2 of 5

25

Singapore post 4 State

26

SSCC18

27

Swiss Post Parcel

28

UPCA

29

UPCE

30

USP Sack label

31

USP Tray label

 

How to build your Barcode URL

Since there's no built in functionality helping you to display a barcode inside the markup, you'll need to build yourself the URL.
No panic, it takes two minutes. (smile)
Please follow the brief guide prepared to build your own Barcode Image URL :

  1. Open any text editor you're comfortable to work with ( we recommend Notepad++ but Windows Notepad will be fine either way)
  2. Paste in the editable window the following snippet : http://<ConsoleHost>/frontend/Barcode.aspx?idoptin=[_idoptin]&hash=[_hash]&BarcodeHeight=60&SymbologyId=14&NarrowBarWidth=2&bearerbarsmode=0&BitmapTargetFormat=1&Ratio=0&TargetDynField=[LatestShippedOrderID]&FontHeight=0,2
  3. Now replace those parts of the query string marked in red with actual information : <consolehost> must be replace with your console URL ( for instance a8g5c.mailup.com ) and LatestShippedOrderId with the Dynamic Field you've defined holding ( and filled in with ) the barcode numeric number.
  4. Select it entirely ( CTRL + A ) and copy it to clipboard ( CTRL +C )
  5. Now open your web browser and Log into your MailUp console
  6. Click on Messages > Email > New > Create New Email as below

Image Removed

7. Type in subject textbox and jump to the HTML editor area, then click on the HTML tab at the bottom of it and click on the "<> HTML" tab as shown in the below screen shot

8. Write a plain and empty HTML Img tag such as <img src="" /> in the writable area of the editor as below

Image Removed

9. Now it's time to fill the Image tag "src "property with the actual barcode module path : barcode image path must always display an absolute path : <img src="PASTE HERE YOUR BARCODE URL PREVIOUSLY COPIED FROM NOTEPAD" />

10. Click on Save. Now you should be seeing the barcode rendered in the preview window as below

Image Removed

Rendering failure

 

Note
titleNote:

The application may receive a wrong sequence format against a certain symbology : the application won't display any error message but it will display instead an empty 1x1 pixel image so that the calling image won't appear as broken

 

...