We support barcoding on both sent and received faxes.   We can write barcodes in Data Matrix, but we can read Data Matrix as well as PDF417.

Please note, in general, barcodes should be kept smaller than 400 pixels (2 inches height and width) for DataMatrix, or 800 pixels (4 inches height and width) for PDF417.  In most cases, a barcode of 100 pixels (1/2 inch height and width) is sufficient (for DataMatrix, which is our standard format) in size to contain all of the data you will be passing and still be read.

If you want us to read bar codes on faxes that are coming into your Sfax account, you need to make sure your account is enabled for Inbound Barcode reading.  To confirm that you can contact support.  

Use &OptionalParams &BarcodeOption - Parameter is used only to pass information to create a barcode on fax pages outgoing. 

BarcodeData= is a string value used to create the barcode data, additional barcodes can be passed using the same parameter BarcodeData in a separate BarcodeOption set. 
BarcodeY= These are both integer values to determine the x and y coordinate position on a page to place the barcode(s). A 8.5 X 11 page is 1700 X 2200 pixels. *We recommend placing the barcode 50 pixels or more from the edge of the page.
BarcodePage= is an integer value used to determine what page(s) to place the barcode(s) on. 
BarcodeScale= is preset to size 3 but can be passed as an additional parameter to change the sizing of the barcode. The sizes available are 3,4,5,6,7,8,9,20,30 and 40. 

Code Sample:

Example Barcode Parameters for API, in this example we pass 2 barcodes on the same page. 

"&BarcodeOption=" + "BarcodeData=", HttpUtility.UrlEncode(barcode1) + ";" + "BarcodeX=", HttpUtility.UrlEncode(barcode1x) + ";" + "BarcodeY=", HttpUtility.UrlEncode(barcode1y) + ";" + "BarcodePage=", HttpUtility.UrlEncode(barcodepage) + ";" + "BarcodeScale=", HttpUtility.UrlEncode(barcodescale),                "&BarcodeOption=" + "BarcodeData=", HttpUtility.UrlEncode(barcode2) + ";" + "BarcodeX=", HttpUtility.UrlEncode(barcode2x) + ";" + "BarcodeY=", HttpUtility.UrlEncode(barcode2y) + ";" + "BarcodePage=", HttpUtility.UrlEncode(barcodepage) + ";" + "BarcodeScale=", HttpUtility.UrlEncode(barcodescale),

Sample encoded url with Barcode Parameters


Use Case Example:

Two faxes are sent to 2 separate physicians at the same office.   One is for patient Joseph Curry. The other is for patient R.L.    The front desk person at the physicians’ office returns both documents in the same fax, and the pages are mixed up.

When the outbound fax has completed, assuming Fax callbacks are enabled, we will send you the data associated with that fax.

When the fax is returned, assuming Fax Callbacks are enabled, Sfax will send you the callback data to let you know a fax has arrived into your account.  The data will indicate whether or not there is barcode data.  You can then use the FaxId, along with an InboundFaxInfo request to retrieve the barcode data, and/or you may also use the DownloadInbounFaxasPdf or DownloadInboundFaxasTif to download the fax. 

In the example below you will see that the documents were mixed up when returned.  Because a patient id, document id, and page #’s were included in the barcode of each document page, you are able to tell how the document should be ordered, and you are able to confirm that you received all pages.

For this example, the barcode data is being presented as: patient name l patient id l document id l page 1l total number of pages l recipient l recipient fax number

Regarding placement of the barcodes: You should test with your specific documents to find the best placement for the bar code(s).  The larger the bar code the more success we will have reading it when it comes back in.

Regarding size: Due to the nature of faxing, there tends to be quite a bit of degradation, especially when documents are printed, scanned and faxed multiple times.    We tend to see more success using BarcodeScale=5 or higher.

Here is how you would prepare the faxes to go out:

Sent Fax #1: Plan of Care Document

SendFax Request (with Barcode Options and Cover Page)

&RecipientName=Dr. Bob
&BarcodeOption=BarcodeX=1500;BarcodeY=1500;BarcodeScale=5;BarcodePage=1;BarcodeData=Curry,Joseph|1465148|13345|1|1|Dr. Bob|855443600
&OptionalParams=CoverPageName=default;CoverPageFromName=Hospital Care;CoverPageFromPhone=1-888-555-1111;CoverPageSubject=Plan Of Care for Curry,Joseph;CoverPageReference=1465148

+ File Attachment

This is what the fax will look like when it goes out (including the Fax cover page).

Sent Fax #2: Visit Note
SendFax Request (with Barcode Options and Cover Page)

&RecipientName=Dr. Brown
&BarcodeOption=BarcodeX=1500;BarcodeY=2000;BarcodeScale=5;BarcodePage=1;BarcodeData=R.,L.|1564885|13346|1|3|Dr. Brown|855443600
&BarcodeOption=BarcodeX=1500;BarcodeY=2000;BarcodeScale=5;BarcodePage=2;BarcodeData=R.,L.|1564885|13346|2|3|Dr. Brown|855443600
&BarcodeOption=BarcodeX=1500;BarcodeY=2000;BarcodeScale=5;BarcodePage=3;BarcodeData=R.,L.|1564885|13346|3|3|Dr. Brown|855443600
&OptionalParams=CoverPageName=default;CoverPageFromName=Hospital Care;CoverPageFromPhone=1-888-555-1111;CoverPageSubject=Visit Notes for R.,L.;CoverPageReference=1564885

+ File Attachment

And this is what this fax will look like when it goes out:

In this example, both documents are returned as one fax, and the pages are mixed up, as seen here:

This is what the fax info will look like when it comes in:

If you have  Fax Callbacks configured, this is the info you will get:

Inbound Fax Callback data
Inbound Fax Callback data

You will be able to tell that this fax has bar code data associated with it, because &hasbarcodedata=1.  

You can then come back to us and get the Fax Info associated with this fax, which will include the bar code data,  using this service method:

InboundFaxInfo Response

<FaxDateUtc>10/21/2015 9:28:24 PM</FaxDateUtc>
<BarcodeData>R.,L.|1564885|13346|1|3|Dr. Brown|855443600</BarcodeData>
<BarcodeData>Curry,Joseph|1465148|13345|1|1|Dr. Bob|855443600</BarcodeData>
<BarcodeData>R.,L.|1564885|13346|2|3|Dr. Brown|855443600</BarcodeData>
<BarcodeData>R.,L.|1564885|13346|3|3|Dr. Brown|855443600</BarcodeData>

If you would rather poll us than configure the Fax Callbacks, you can use the ReceiveInboundFax method call in the  Service Methods Documentation.

If you would then like to download the fax, you can use one of the Download Service methods listed in the  Service Methods Documentation

If you would like help with your Proof of Concept please give us a call!   877-493-1015 and select Sales.