Creating Barcode Labels For Inventory

The Epicor/Report builder functionality predates APIs. It would make a good improvement to the product if Epicor utilized the API instead of file drops. Might eliminate all the FTP troubles too. :person_shrugging: Maybe an Epicor Idea? :thinking:

2 Likes

BT API Is the way. It’s easy to set up, and easy to call. It does some simple variable swapping (that get bound to fields on your labels). It even responds with a status!

I have one giant catch all function that has the logic to determine what I want to print, it gets the data keys (maybe company\part, company\job, etc), determines which BAQ it wants to call to pull my data for the label.

This means all of my label data is just driven by BAQs taking key fields. Join as much data for your needs.

Then I have smaller helper functions that call the main function - these just prepopulate some of the driving logic. This leaves me calling PrintPartLabel(“PartNum”, Qty); to get a part label (company is implied).

A little extra, but useful as far as I am concerned, is that I run logic from my BAQ field labels. Any BAQ field that begins “BT_” as is BT_PartNum, automatically gets extracted from the BAQ result set that is called by my function. These are the fields it wants to keep. Then it strips the BT_ prefix and will send the data to BT API.

Consider the PartNum field in a BAQ, one with label BT_PartNum and one without.
BT_PartNum = MyPart: becomes PartNum = MyPart and goes to BT.
PartNum = MyPart: does not go to bartender (no BT_ prefix)

Why? Well a few reasons. First, i can add as many fields as I want to my BAQ - perhaps you want to use them to debug, etc - but only the ones I have “flagged” go to the label. This means any time I want to add more fields to my label, I go to the BAQ, make some joins, add a field called BT_MyCoolField and the data is already making its way to the label (I just have to do the mapping\binding on the label at that point)

7 Likes

I agree 100% the REST API is great… No more integrations and if you really want to get fancy you could just have Bartender cloud…I have no idea on the costs.

I’ve had trouble with this using some printers when it’s a printer that jams up or whatever.

Hi Chris,

I just use user codes. and two functions.

One that does all the generation of the json for the bartender action and the other one to fire the related baq, if any parameters are used then they get passed through.

Label uses use named data sources rather than a database.

Cheers
Simon

1 Like

This is the key

Using REST the http status codes aren’t what you expect, the info in the output payload (if that’s the best term for it) gives you the info about print issues…

That being said, you have the reprint station and History Explorer to keep you on top of failures.

That’s a big difference to the standard Epicor Labels… but helpful.

I also pass in an environment variable and put a watermark on the label if it is “NonProduction”

1 Like

Yeah admittedly this can be finicky. The biggest issue is NON network printers that we use a USB to Network adapter on. These never respond proper.

Otherwise, it does ok, it tells me if I succeeded to send it to printer, it warns me about objects clipping on label, and even blank objects\fields.

When the print fails, it typically says something like, we failed to print, check your printer, here a few steps, etc… or even better it says we failed to print because you are trying to print the wrong size document to the wrong printer.

3 Likes

Which can be passed back to the user. Not possible with file drops.

Again, for reprints, Chris’s idea of using BAQs mean you could have a reprint Dashboard with some thought.

1 Like

Yeah I use to log all of my calls to UD02. Which means I had all the info neceesary to call it again as desired (without keeping the actual data). Caveat - this means if any of the underlying records change, the re-print also changes

2 Likes

Yes reprint dashboards or buttons on trackers… Or no customs and just use the supplied tools, the options are greatly increased…

Sorry for the hijack @NateS

1 Like

I get all of those, but when it’s a massive print job it’s taking forever to respond and so it just times out.

1 Like

Good to know. Prior to the BT REST endpoints, I wanted to write my own endpoint and receive the request and creating a file(s) in the drop folder. Not sure it it was possible to get a success-failure response in this configuration.

1 Like

I do the same, just still with the file drop. All my data is json dropped into a folder.

I wrote the API stuff, just been too busy to switch over.

I have done just that in testing, and it worked fantastic.

2 Likes

These are all great ideas and tips! Thanks everyone! For now, I am using the BAQ report. I added an option for Number01 as the label qty. Then I setup a report RDL with 6 copies of the label in the correct positions on the page, each label sitting inside a rectangle. I set the visibility for the rectangles based on the number the user puts in option for number 01. The formulas I used are: (Note my BAQ only returns one row).

=if(first(Fields!Number01.Value, "BAQReportParameter")>=1, false, true)

Then I just changed the number value for each label. So, the second label only shows if the parameter is >=2, and the third label only shows if that vale is >=3. This works fine. It doesn’t optimize the usage of a sheet of labels, but we can work around that for now. Ideally, we would switch to a roll-style label printer to avoid this kind of issue in the future.

I am curious about trying out some of the API methods, but this was so quick and easy I am likely not going to look much farther. Thanks again to everyone for all this awesome info!

Nate, I would make the Customer a “Customer/ Supplier”. You then issue the PO to the customer for $0.00. This will enable you to receive the quantity from the Customer at time of receiving.

As far as the label, you can do this with a label maker software like Bartender.

I’d love to see more on this we’re wanting to move to Bartender labels

1 Like

I think you can adjust the timeout period no? But then, it’s a question of who wins, a realistic small timeout for most prints, or a long timeout for the outliers.

1 Like