Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Removed brackets from TargetDynField input value in the samples displayed over the page sections.

Overview

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

...

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 )

...

  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

  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

...