Detect if the call context is coming from the browser vs SmartClient

Has anyone been able to create a BPM that would be able to detect if the call context is coming from the browser vs the SmartClient?

I know with the classic UI, I could use callContextClient.ClientType == “WinClient”. Wondering if something similar would exist for detecting if Kinetic is running in the browser.

Thanks!

you still have CallContextClient that won’t work?

1 Like

Problem is the call context is the same from both the web browser and the smart client

Browser:

SmartClient:

ClientType=“Kinetic” is the same for both

That’s because they are both the browser. If you run one in classic you’ll see a difference.

1 Like

I was hoping to log usage of using the new UI in the browser vs smart client.
It doesn’t look like that’s possible, unfortunately.

If you run the true Classic WinForms it should come out to WinClient

1 Like

@josecgomez are you pointing out that whether they are using the client and running kinetic forms or the browser (running kinetic forms obviously) that there isn’t a difference?

That’s what you meant by this, right?

That’s because they are both the browser.

And if that is what you are saying Jose, I have a question for you @mbayley … why are you trying to figure out whether something is called from the client vs the browser when kinetic forms are the same regardless of where they are called from (assuming I am understanding Jose correctly)?

Correct these are the same in the browser and in the Essential Objects Frame (embeded browser) so if you are using Modern UX (Anywhere) you are using the browser

If you are looking to count who is using new UX vs Old then looking at CallContextClient would work regardless of embedded or not.

It would work regardelss of embedded or not because like @hkeric.wci said, the classic winform would have a value of “WinClient” and everything else would be “Kinetic,” right?

I am gathering information at this point. I want to know how many people are actively using the browser vs the SmartClient. The goal would be to force most users into the browser. If there are not many people using the SmartClient, then the adoption of the browser should go much smoother.

1 Like

I have done some more digging this morning and discovered that a BPM on MenuSvc.GetMenuForLicenceType will give me what I need.

When Kinetic is started from the browser, there will be a single call to this method. There is a parameter “filterKineticOnly” which will be true

When a Kinetic App is launched from the SmartClient, the embedded browser will call this method also. “filterKineticOnly” will be false in this case. For every embedded browser opened, this method will get called every time.
image

2 Likes

Better than what I got.

Pulled this out from the MetaFX Service on GetApp:
JsonConvert.SerializeObject(Operation.Current.HttpHeaders)

Web Browser	"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36",
Smart Client	"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36",

Smart Client is a bit behind.

I may find a use for this also. Thanks!

1 Like

If you are in that particular BO, be careful. It’s very finicky.

Thanks for helping me understand! I will probably need to do the same at some point in my future.

Our Classic to Kinetic migration plan is to do it one department at a time. This way we can have lunch and learns to show people the new UI & train them. Then we’ll change to the Kinetic version in menu maintenance, and off to the races! Rinse and repeat for the next department.

I’m not sure how large your company is, and if that’s possible, but in person demos with the power users help us get buy in, and also work out any kinks ahead of time.

We’ve got some heavy TMS and Credit Card customizations for quote, order, fulfillment workbench, and the shipment entries, and some of the third party vendors aren’t ready yet, but hopefully 2023.2 will have enough kinks worked out for us to move forward.

Good luck!

Love that.

Excited Winnie The Pooh GIF

That’s kind of what we have in mind.
Many of our users won’t know the difference between the SmartClient and browser other than how they get to it is a little different. Given both options (which we may have to while we transition), people are going to continue use what is most familiar to them. As we all know, the embedded client is not nearly as fast as the browser. I want our users to have the best possible experience from day 1 on the new UI.

The nice part about a BPM on GetMenuForLicenceType is that we could theoretically remove all menu items that are defaulted to Kinetic and simply not give them the option to launch the new UI from the smart client.

Just messing around on GetMenuForLicenceType:

// filterKineticOnly = false means running from SmartClient
if (this.filterKineticOnly == false)
{
    // Remove Kinetic only menus
    result.Menu.RemoveAll(o => o.DefaultFormType == "Url" || o.OptionType == "K");
    
    // Remove each menu without children
    IEnumerable<MenuRow> menusWithoutChildren;
    do
    {
        menusWithoutChildren = result.Menu.Where(o => o.OptionType == "S" && result.Menu.ToList().Any(p => p.ParentMenuID == o.MenuID) == false).ToList();
        
        // Remove each
        foreach (var item in menusWithoutChildren)
        {
            result.Menu.Remove(item);
        }
    }
    while (menusWithoutChildren.Any());
}