- I want to integrate a EAN13 barcode inside my creation based upon a unique contact field
- Can i use a barcode inside my emails?
What does it do?
We have implemented a barcode generator mechanism which allows you to create barcode based upon a unique field inside your contact database. Our supported barcode types are :
- EAN13
- CODE39
- CODE128
How does it work?
We have 2 mechanisms on how you can use barcodes :
Let's describe them in detail.
1. Use our standard barcode block
Check here how you can use our new creation process.
In our creation process we have added a barcode block, which let you define your barcode in a very interactive way.
Click on the to add a new editor block in your current creation.
Inside that popup you should now see a barcode block.
Once you have clicked, the barcode block will be added to your creation.
To edit to the block you need to click on the block.
Let's describe the different options you have :
- Barcode : This field defines the 'value' on which the barcode will be generated. In our case we have added <?add_cid?> which will take the contac id field of your contact.
- Type : The different types we offer are : CODE128, CODE39 and EAN13
- Show text : shows the barcode field as description under the barcode or not.
- Scale : allows you to control the scale of your barcode
- Height : allows you to control the height of the image in pixels
2. Use our barcode generator url
To use this mechanism you need to create a url link with the needed details, this will then generate a barcode based upon the specified details.
What you can specify is described here below.
BASE URL http://fb.[servername].addemar.com/barcode/[type]/[options]/[code].[ext]
- [servername] : check the url once logged is, it should specifiy the url to use
- some examples : email.addemar.com, mi.addemar.com
- [ext] : the extention of the barcode (jpg|png|gif) Default: jpg
- [code] : the barcode number ( can be fixed or based upon a contact field )
- [type] : type of barcode
- Supported types : EAN13, CODE39 and CODE128
- [options] : some options (not for all barcode types)
- /w - [width] : width of the barcode in pixels (actual output may vary)
- /h - [height] : height of the barcode in pixels(actual output may vary)
- /t - [0|1] : show text on barcode (default = 1)
- /q - [0..100] : quality of the barcode (only for EAN13 & CODE39)
Let's give an example of how the barcode can be implemented.
In our case it is the confirmation email which was part of the following flow :
- Event invitation email
- Event Subscription landingpage
- Event confirmation email + barcode based upon contact_id
In this Event confirmation email we have created a barcode image based upon the contact_id.
So inside the email creation, you'll see a barcode image
The details of this barcode image are ( to check you need to click the image icon inside the editor bar )
Let's break down our example url :
http://fb.mi.addemar.com/barcode/code39/t0/w350/h200/<?add_cid?>.png
- Our server was mi.addemar.com, hence the fb.mi.addemar.com/barcode
- we used code 39 as barcode standard
- we didn't want a text description under the barcode, hence the t0
- the width and height were also specified as /w350/h200
- as unique number we specified <?add_cid?>, which will use the contact id from inside our application
- the extension is png.
That's it !