Interviews, Languages and URL Arguments

The other day I was part of a discussion regarding the launch of Interviews. A couple of questions arose that formed the basis for an interesting discussion.

The details are not really important, but the basic thread was

  1. How can we be sure to launch an Interview in a specific language?
  2. How can we pass information into an Interview in respect of the language of the user?

Of course these two questions can be synthesised further to :

  1. What are the ways to find out what language the user is using?
  2. How do I pass seed information in the URL?

What language are you using?

You might be tempted to try all the different ways to do this JavaScript,  that you might find people talking about on Stack Exchange . There is basically no reliable method to detect the language of the user. Perhaps I have set the language of my Browser to German, but my Windows is in French. So which is my language? Perhaps I am in France so you can geolocate me, but I am actually a Finnish speaker? Perhaps I am in a country where geolocation is not usable or reliable? And so on…

In Oracle Siebel CRM, we have GetProfileAttr(“”) available to us, for example through the JavaScript API, which will give us the Country in which we are supposed to be based. In Oracle Service Cloud we have the Country and Language in Contacts and no doubt we have other options in other applications. That will probably be the most reliable method, since it is not dependent on what the end user has done to their computer. Fine.

Suppose we want to pass that information to Oracle Policy Automation?

Let’s get down to basics.

In the image above :

  1. Whenever a Project is launched from a button, we can add the correct locale information to the URL to ensure it is launched correctly. So in the silly example above, there are two buttons. One uses”fr-FR”, the other “en-US”.
  2. This information is appended to the root URL via the ClickMe (mypath)  function.

In the third bullet, is illustrated the other part of the question. How can we pass this information into Oracle Policy Automation. using the JavaScript object we pass seedData={} into our Project. And in the seed data you can see our information being passed.

In the Interview itself, we can recover the information using the URL Argument feature in our mapped Project:

Of course the attribute can now be used in our Interview or our rules, should we need to display or leverage this information:

This little set of examples does illustrate that Oracle Policy Modelling could really do with some functions to at least allow the rule designer to capture the locale of the user (which language did they choose to view my interview in, so to speak).