Question: I'm trying to create an HTML email template that displays a bar code of a single-use coupon code dynamically in Netsuite through marketing campaign using this

```
<barcode codetype="code128" showtext="true" value="${campaignEvent.couponCode}"/>

```

and nothing is showing up, but when I try to print out the coupon code using `${campaignEvent.couponCode}` it is getting printed correctly

Answer: 
As already answered, BFO is only used for PDF generation and not email templates.

You can use an online barcode API such as [Barcodes4.me](http://www.barcodes4.me/apidocumentation) and embed the result in an image:

```
<img src="http://www.barcodes4.me/barcode/c128a/${campaignEvent.couponCode}.png?IsTextDrawn=1" />

```

Another similar service is [bwip-js-api](https://github.com/metafloor/bwip-js/wiki/Online-Barcode-API)
That's the correct syntax for creating a barcode on a PDF and I've used it quite a bit.

However you write you are creating an html email and I doubt the barcode tag will generate anything in html. Can you share the source of the created email around where you expect the barcode to be? You could generate a pdf with the barcode and attach it to the email. 

Or you could generate the barcodes as svg values in a batch and update a custom field on the customer and then include the field contents your html that way. 

<https://www.npmjs.com/package/jsbarcode> is a bar code generator that works in multiple environments so it's possible it could be made to work in a mass update script.