Skip to Main Content

Intelligent Advisor

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Postcode lookup/ validator to work with OIA forms

JakeAshtonDec 6 2023

Good afternoon,

We currently use a RegEx to check for number of characters/ format for Postcode, however, we are exploring the possibility where we might want to look at making sure it matches address provided.

Just wondering if there is a known way of checking the validity of postcode information-
We would prefer if there was an out-of-the-box solution, however, if there is a script that would offer the same functionality, would be interested to see what has been developed.

Any advice appreciated.

This post has been answered by Richard Napier on Dec 21 2023
Jump to Answer

Comments

Richard Napier

Hello

I wonder if you could possibly just elaborate a little as far as your phrase “where we might want to look at making sure it matches address provided” is concerned.

Are you looking for solutions to help you match an address the user enters against an address list (private or government list)?

If you could expand a bit and cover more of the requirement I’ll maybe avoid wasting your time with an inappropriate response.

Can you also please let the forum know if you are public cloud or on premise, which version (especially if on premise) and if in the cloud, you have other Oracle products that might affect the response - such as whether you use Oracle Visual Builder to present your interviews or some other mechanism. Basically anything that might help broaden the vision of the problem.

Thanks

JakeAshton

Good morning @richard-napier1,

Apologies for delayed response-

In a sense we are looking for a postcode lookup- not sure if there is anything already available in the OIA space?

The implementation that we are considering adding this to is where we are checking an employees address and delivering/ collecting items from them.
Ideally, anything to validate that the postcode exists and matches the address, and even better would be to select an address at a certain postcode.

I'm not convinced we'll get much mileage out of it as there will be limited use beyond the forms we are looking at currently, just exploring the options we have available and if there is a script or solution that we could offer.

I believe we are on public cloud, we host the interviews on a .net framework which talks to the connector framework. Version Intelligent Advisor 23C - 12.2.32.487.

As I'm writing this, I realise we do have the option in April next year when we will be using Oracle Fusion and will be able to expose employee information via a ReST interface that we could validate, providing that the information is up to date on the system. I will have a chat internally about this as well.

Much appreciated,
Jake

Richard Napier
Answer

Hi @jakeashton

Well. essentially we are looking at two visions of the story if I read you correctly -

  1. Storing the employee address data and validating this in your CX
  2. Entering address information and validating it in OIA

In the case of (1)

If you can do it on the CX side, all well an good - either at point of data entry or upon update. So the correct data is passed to OIA via the Connector and no further action is required for OIA, the data is (in theory) correct. At most OIA might make it palatable by displaying a visual reference (a map or similar).

In the case of (2)

OIA is agnostic - it does not care what address validation tool you use - whether it be a REST API to your own GIS / address platform or a REST API to some third party service like the Swiss Post Office (I'm sorry but I realized I forgot to ask you for the target location) or even some public mapping tool for point and click. In all of these cases, the interview will have an extension that will allow the user to interact (type in a Postcode , to select a point,, type an address or whatever) and to get data back from the service.

In (1), the only work in the OIA interview would be to display the data in some nice way - Leaflet.JS, MapBox, Google Maps or whatever.

In (2) this would take the form typically of an interview extension, since this allows the interview designer to easily and securely call an external service and manage the responses before displaying them in the interview. The extension is JavaScript-based. The selection / choice of the user can be passed back to the CX as part of the data returned using the Connector.

It's a vast subject and of course as an OIA person I had rather the validation be done in the CX, so that OIA can concentrate on substantive business rules rather than communicating with an external service. But I've done both and obtained satisfaction in both scenarios.

For further reading, here are some suggestions. Note that these are provided simply to give you an idea of the sort of related things that can be achieved in custom extensions, not to provide a specific recommendation. All of them can be found on my company site , search for the following terms (I cannot post links).

Google Maps for Addresses and Reverse Geocoding

Geomapping with Leaflet JS

Custom JavaScript Extension Places and Custom Options List

In the above image, a geolocate is used to query Places API and to let the user select pick-up locations (in this case garages to pick up a spare part)

The example above is a simple Leaflet.JS and MapBox combination to display data retrieved from the CX in a pleasant format.

The final image above is lat/long to address and so on. I do have examples of ArcGIS integration for point and click but cannot share them since they are related to a specific project.

In addition, the wonderful Oracle OIA Blog team has a simple example here (I can post links to the Oracle site I believe) : https://blogs.oracle.com/ia/post/how-to-use-a-map-to-set-an-address-location-in-an-interview

Other more relevant examples can be found by looking for anything related to interview.fetch() since that is the mechanism for interrogating a REST API from within the interview experience.

Apologies if you knew all this before I started writing this, but I figured that the information will be of use to others who are reading this as well.

Richard

Marked as Answer by JakeAshton · Dec 22 2023
1 - 3

Post Details

Added on Dec 6 2023
3 comments
482 views