BarTender Integration and Label Printing

I want to first emphasize that I am a novice in many aspects of Epicor administration; but I study daily and learn quickly. I have probably spent four months in total trying to get some semblance of integration or automation in our Label printing process. We are a government contractor, and therefore utilize the Cloud Gov environment. We stay up to date with updates on our Epicor, but our BarTender is the outdated 2022 software.

I have seen everything from REST API to just building a BAQ, BPM, and use SSRS reports. Most of my time has spent spent trying to integrate using an FTP site, because we are unable to allow port access to 405 which was epicors recommended route. The process has absolutely consumed my spare time and drained my good will and patience. Epicor has been less than helpful, basically telling me this method will be problematic but only offering contracting services as a means of solution.

I sincerely need some help from an experienced admin. Right now i set up a File Integration in BarTender to watch the FTP site folder. Epicor drops a .BT file and using a print command script bartender reads that file and translates it to my template file that has a database built from a .bt file export. I had a lot of issue with headers, and this method hasnt been deployed because it will periodically just start failing out of nowhere saying the “user integration” isn’t licensed to use the SATO label printer (even though this shouldnt occur because i built a credential check into the integration at the top level, for the user who IS licensed for that printer).
If this method works perfectly, i have a good looking label printing automatically but it is missing one piece of key data, our expiration date. This isn’t native to the MTLTAGS report style/data definition and when i tried to link PartLot to that report data definitIon, it failed to drop a .bt file at all.

I am open to any solutions, any different methods.

2 Likes

While I have built an API based solution, using Azure Relay, which works great, I don’t actually use it, as I’ve never had to.

I use the Azure File Share from Epicor, instead of FTP. It has been rock solid, and my ftp was too really.

We do not use the .bt file method at all. We drop JSON files, and do everything custom. It’s a lot easier once you figure it out, and less prone to errors.

If you’re comfortable rolling your own, a lot of us can give guidance.

If not, map out how you want it to work, and hire a consultant.

The way we do label printing is kind of strange, but it works fine for us. Safe harbor here, since I did not make it and am just going with what I see.

To start, we have a checkbox in shiphead that the end user will check off to print labels. When they save and the checkbox is checked off, an in-transaction BPM fires off. Then it checks if the customer’s name is a certain customer, and if it is then it executes one set of C# code that sends data to our azure file share. If it isn’t that customer, then it executes a different (but very similar) set of C# code in a standard directive.

The code gets the path of the azure file share from a User Code named “BTPath” in a code type called “FILEPATHS”. Our local server has the bartender integration that looks for any new .bt files in the azure file share, prints them, and converts them into .btp.

The code in the BPM C# takes the needed information from the ShipDtl, ShipHead, Part, OrderHed, and OrderRel and puts it into an output variable, which then is inputed into an expression named “File.WriteAllText(filename, output);”.

I am not great at describing things honestly, so if you need clarification or want to see the code then let me know.

2 Likes

Taylor, thank you for taking the time to detail your process. Our FTP site seems to work well and is stable. I havent experienced issues directing output to it so far, but i definitely would be interested in trying a JSON approach instead of .BT. The biggest thing for me is getting the receipt or warehouse data to allow for expiration dates.

2 Likes

Our C# code takes in tables and links them together with the main ShipHead table. Not sure what warehouse and receipt link to though.

// Get ShipTo Info
//
var s = (from sr in Db.ShipTo
         where sr.Company == Session.CompanyID && sr.CustNum == t.CustNum && sr.ShipToNum == t.ShipToNum
         select sr).FirstOrDefault();

// Get Cust Info
//
var c = (from cr in Db.Customer
         where cr.Company == Session.CompanyID && cr.CustNum == t.CustNum
         select cr).FirstOrDefault();
1 Like