Troubleshooting Kinetic SaaS to Bartender Integration for Production Labels

I spent a week digging and reading in KB to resolve this issue without any success. :tired_face:

I am experiencing issues with the Kinetic SaaS - Bartender Integration. All the necessary data for the production label is available in our Kinetic system. However, I cannot establish a direct connection between Kinetic SaaS and Bartender.

So far, I’ve managed to print from Bartender by extracting the required data from Kinetic SaaS using the REST API, exporting it to an Excel file, and linking this file with Bartender as our database. This method works perfectly for me.

I need to create an integration directly from Kinetic UX, using Bartender Integration for all the production label designs. I created and ran the Bartender integration process using a .bt file, and everything works fine on our Bartender Server. Finally, I deployed the Integraton, and it works fine when I add manually the .bt file.

My challenge arises when verifying the Report Style Configuration (System Management > Reporting > Report Style). I am using GenSO with Report Type set to Bartender Labels and duplicated the data definition from GenSO. The problem occurs when declaring the Report Location and Output Location.

All the training materials (including KB0041613) and video tutorials refer to this format: \XXXXX.file.core.windows.net\XXXXX, where I am supposed to find my .bt file. However, I cannot locate the .bt file from which my Bartender integration event script should start working. :thinking:

All the steps in the BT Integration are working okay except I could not get KINETIC to generate the .bt and send it to the \XXXXX.file.core.windows.net\Production\Bartender which is my output path.

Any advice on this would be greatly appreciated.

Also, could anyone direct me to any reliable training materials or documents about printing manufacturing production labels using Epicor Kinetic SaaS-Seagull Bartender Integration?

Hila

Hila

I am in the process of creating the file. Are you using C# or from the report style? We are creating the file from C# and writing to Azure. We are having trouble access the file, permissions

John

@Hila_Calderon , have you requested the drop location for your SaaS? If you put in a ticket, Epicor will create a folder on the server that you can drop your files to and then transfer to your local server. And it is not an FTP.

Sorry I did not mention this earlier, I thought everyone knew about this.

1 Like

Hi John,

Yes, I already have the drop location set up for our SaaS, and it is working without any issues. EPICOR configured it for us while we were using the Classic UX.

It functions as intended: a folder on the server where we drop our files, which are then transferred to our local server for printing.

My problem is I am not able to send the file to that folder from my Kinetic UX.

Ah. There was a script we needed to run before it would work. Did you run that script for your instance?

Sure thing! I ran the script on my Bartender Server instance, and it successfully mapped my SaaS Server folder, which we can access from our network.

I understand that each company operates differently, but I am looking for a guide with a clear sequence of steps or instructions. I found some scattered pointers, but it seems like I am missing some steps. I found some close references from Jason McDermott, but these instructions are not related to what I need to accomplish.

I just got this working on our system. We have an IT company handle servers/files services etc. When we switched to Azure from FTP, We had to change Bartender System services to log on as : Local System Account. In the services screen in Windows from the server . We were running “This Account” from an admin account)
image

Hope this helps.

Dean

The reason you had to do that was likely because you ran the script to set up the azure drive as admin. It’s supposed to be not run as admin.

Thank you. I will do that and get back to you.

Now, could you please check this C# function below? I created for Kinetic UX and it is giving me the same error over and over:
code= BPM009
Message =“Member declaration is not allowed inside code block

using System;
using System.Net.Http;
using System.Text;
using Newtonsoft.Json;

public class ProductionLabels
{
    public void printLabel(string labelType, string labelData)
    {
        try
        {
            using (var client = new HttpClient())
            {
                var requestData = new
                {
                    labelType = labelType,
                    data = JsonConvert.DeserializeObject<dynamic>(labelData)
                };

                var json = JsonConvert.SerializeObject(requestData);
                var content = new StringContent(json, Encoding.UTF8, "application/json");

                var response = client.PostAsync("http://xxxxx:80/Integration/PrintLabelService/Execute", content).Result;

                if (response.IsSuccessStatusCode)
                {
                    Console.WriteLine("Label printed successfully.");
                }
                else
                {
                    Console.WriteLine("Error printing label: " + response.ReasonPhrase);
                }
            }
        }
        catch (Exception ex)
        {
            Console.WriteLine("Exception occurred: " + ex.Message);
        }
    }
}

I ran it in different code tester nd it seems correct,

Hila

You cannot create classes in a function.

You are inside a single method.

I have it properly set up.

I’ve reached the limits of my C# skills and am stuck. Could you please guide me in the right direction? I need to add a button to my dashboard that sends the already-filtered data to Bartender printer using BT Integration. I spent almost 2 weeks on this.

What am I missing here?

What am I overlooking? I’m currently stuck in this process.

When this happens to me, I comment everything and uncomment lines one at a time until the error appears.

The error may be on another method. :person_shrugging:

@Hila_Calderon , sorry but you are doing something that I don’t know about. It looks like you are doing a REST call directly to BarTender which I know nothing about.

A lot. :rofl:

Happy I Love You GIF by Life of a Potato

See this c# code below:

private bool AmIAFunction()
{
    /*
    See this spot here?
    
    This is not 100% correct, but for all practical purposes, this is where an 
    epicor function resides, INSIDE this single method, in this case, 
    "AmIAFunction".
   */

    return true;
}
  • Which means, you are inside a single method, so you can only do things that are allowed in a single method.
  • You cannot create classes, or other methods.
  • You can create delegates and use those, or call other functions.

These go on the usings tab.

The above are defined in the signature of your function.

Your function itself, should look more like this:

        try
        {
            using (var client = new HttpClient())
            {
                var requestData = new
                {
                    labelType = labelType,
                    data = JsonConvert.DeserializeObject<dynamic>(labelData)
                };

                var json = JsonConvert.SerializeObject(requestData);
                var content = new StringContent(json, Encoding.UTF8, "application/json");

                var response = client.PostAsync("http://xxxxx:80/Integration/PrintLabelService/Execute", content).Result;

                if (response.IsSuccessStatusCode)
                {
                    //Console.WriteLine is useless to you, you can't see it.
                    //Console.WriteLine("Label printed successfully.");
                }
                else
                {
                    //Console.WriteLine is useless to you, you can't see it.
                    //Console.WriteLine("Error printing label: " + response.ReasonPhrase);
                }
            }
        }
        catch (Exception ex)
        {
           //Console.WriteLine is useless to you, you can't see it.
           //Console.WriteLine("Exception occurred: " + ex.Message);
        }
1 Like

Here are some resources to help get you up to speed:

https://www.epiusers.help/t/lets-share-useful-functions-sharing-is-caring/100371

1 Like

Thank you for the pointers…and the best one is

You have now my full attention.

1 Like