Client Application - How to use PC Language or Set language based on Division

Hi team,

We have a situation where we are in the need to support big number for Client Application.
Since there is a limit how many one type integration there can be, we have built a proxy which would attempts to merge the similar APP and set the websites based on the language.

Example: we have agents in 5 different EU countries, we want to open localized version for google.com
so for Italian : google.it, for German google.de so on.

Up until now we used to have 1 integration per country, however that's not maintainable as we ran out of integrations allowed per org.

Our proxy which is built now is expected to be provided with the following contexts:

/brand-site/{{brand}}/?langTag={{pcLangTag}}

There will also be error handling if the pcLangTag is empty or if it refers to an unsupported localization context the agent will see a dropdown in the web page to select country before redirecting to the base URL.

However, we have discovered that pcLangTag is set by the Genesys Cloud preferred language setting and not the PC languag or Browser language.
image

  • Can you advice or give some ideas what other parameter could be used, or if it is possible to pass PC language?

  • Maybe: Division value can be passed somehow (even thou the APPS are not division specific and controlled by Groups? ), however in Groups we can not set a language neither it is Division specific.

P.S could not find similar topic in the developer forum. In case you can refer me to one with similar issue would be highly appreciated!

Best regards,
Donatas Gruodis

Hello,

The pcLangTag indeed refers to the Genesys Cloud Preferred Language (as set in Genesys Cloud Desktop).
The "pc" prefix stands for Pure Cloud (former name of Genesys Cloud) and not to PC (Personal Computer).

Regarding your question on the OS/PC language or the division name to be passed in the URL, it is unfortunately not supported at this time.
As indicated in the Setup a Client Application integration: "In the Application URL box, type the URL of the web application. See the list of URL Interpolation tokens on the Client Apps page."
The only parameters which are currently supported for URL interpolation are: pcLangTag, pcEnvironment, pcConversationId (in case of an interaction widget integration) and pcUsePopupAuth.

You can request a new feature and share your use case at https://genesyscloud.ideas.aha.io/

As a possible way to address this today, I would suggest:

  • Case 1: Create different landing pages per brand (and different integrations)

In these landing pages, you could find the language of the OS/PC via javascript functions, and trigger a page redirect to the appropriate brand + OS/PC Language.

  • Case 2: Create a single "landing" page (and to have your integration points to that page)

In this html/javascript, you could trigger an authentication flow so that the Platform API can be leveraged and invoked from the javascript in this page.

By triggering an Authentication flow, I mean creating a new OAuth Client in your Genesys Cloud org, that would use Token Implicit Grant grant type.
And in the javascript code, invoking the loginImplicitGrant method from the Platform API (setting the region of your org via setEnvironment and starting the authentication process specifying the clientId of the created OAuth client in the loginImplicitGrant method).
You can see examples of the authentication process in different tutorials including this one on Call Handling.
The redirectUri in the loginImplicitGrant and in the OAuth Client (set in Authorized redirect URIs) could point back to the same url/landing page.

At this step (on authentication redirect), it means that your user has a valid access token to invoke the Platform API endpoints.
For the language of the OS/PC, you could still use javascript functions.
But you could also get the information using the Platform API for division name, and location (in Genesys Cloud configuration).
You can invoke the getUsersMe in javascript SDK - i.e. GET /api/v2/users/me - with expand paramter set to locations.
The response to this request will bring back a divisionId (you can get the division name with GET /api/v2/authorization/divisions/{divisionId}) and a locationId corresponding to the location configured and assigned to this user in Genesys Cloud (you can get details/address/country of the location with GET /api/v2/locations/{locationId}).
Once you know the division name, the country of the location, you could then trigger a page redirect (HTML/Javascript changing the window.location/href) to the appropriate full url.

Hope this gives some ideas.

Regards,

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.