Many industries and business processes require correct addresses (among other important data). In many cases that is not what we find in our systems. It is a constant battle between buyers and sellers to maintain correct addresses. I am not referring to having a misspelled word in the address, but a correct full address, such as: street, city, state, postal code, maybe a latitude/longitude, and even sometimes that extension of a postal code which is really annoying to know. This the english version of my blog Analysis del Servicio para Direcciones – SCP
As a consumer, I like the idea of prior to submitting an online order, the vendor verifies my address at the time of my purchase. Yes, it is that annoying message, did you mean, XXXXX, XXX, XXXX-XXX ? a lot of times, I accept the recommended address, however, I don’t know any different, but it always looks like my address 🙂 Did you ever wonder how those addresses are verified?
Prior to knowing about this SCP Service (has only been available a few months since 03/2017), which I think it was a smart idea to have, I have used other services such as the UPS API for address validation, as well as the USPS (yes the USPS also has an API for address validation – maybe our fellow developer can add this one on her Friday API sessions.
On this blog, I am going to analyze the DMQ mSvc . Make sure you enable the service if it is not enabled.
the Application URL link below is very helpful as it lists all the available URLS offered by the service. Please read the documentation so it makes more sense.
Honestly, as I read the title initially, I was not exactly sure what it meant, so after reading it a couple of times it clicked. The first time, I thought it was data quality. Then, I realized this was for Location data. This service provides a way to run an address through a cleansing, geo-coding (lat/long), and reverse geo-coding API process. And Yes, there are limitations as to how many times this can be run. All APIs have limitations and this one is no exception. See limitations here
You may ask, what would I gain by using this? well, A LOT! First and foremost, as I mentioned, businesses and consumers want to make sure the right information is provided so that goods and services can be delivered to the right individual. A benefit of this cloud microservice is that no 3rd party needs to be involved. From the SCP point of view, it is a stand alone service (stand alone = microservice)
*make sure to read about how to get this type of service – contact SAP and also for the technical users, make sure you get the role needed (DQMMICRO_POWERUSER)
There is a lot of great information that I will not re-write on my blog, but I want to make you aware of a few nice features (or technically known as endpoints) that can be achieved through this service.
ALWAYS, Always, always…. try to understand what makes up a service (web service, micro service, rest web service, whatever you want to call it). A while back, I read something about web services that stuck to me, and I hope this is helpful for you as well: the ABC of web services (Address, Binding, Contract).
- Address – where is the service located (url)
- Binding – how to I consume it – http or other protocol
- Contract – what is expected from the service, and what I will get back
for the trial account, this is the “A” you want to bookmark (or remember if you really want to)
to see the productive account settings: https://help.sap.com/viewer/d95546360fea44988eb614718ff7e959/Cloud/en-US/68904115d138486aaa2e09eae46e78b1.html
and the list of end points can be found here:
to get a list of countries:
to get a list of regions (aka states)
the “B” for this web service is https, but in other technologies, the binding can be different (older services may using soap, xml, namedpipes, msmq). It is simply a way to tell us how it is accessible (way of transport)
The contract depends on an operation case by case. Depending on the endpoint you need to consume, you will provide certain parameters and you will get a response with certain properties. In the end point overview page, you can drill down to specific request types.
how can I test this service?
1) you can use browser tools such as POSTMAn (google extension)
2) fiddler (free tool by telerik)
3) your browser
here is my example with POSTMAN – on a GET (list of countries) operation
and For a POST operation, here are a few options: you will need to provide your username/password and use basic authentication (or OAuth)
** (after enabling the server, you may need to wait a few minutes to get your user the role refreshed – on my case, it took 5-10mins before I was able to use it.)
- getting any information (reverseGeo code) about the city where I was born in Mexico (by passing its lat/long)
2) The street where I grew up is not on the system (address cleansing) – As I remember, there was no number on our house… go figure 🙂 well done for not lying hehe
3) and the school address where I attended (Colegio Modelo A.C.)
something not specified in the ABCs but it is always nice to know as a developer are the error codes. Remember keep your UIs simple (one of the fiori principles) so that your users will come back to use it.
Additionally, per the documentation, this service is currently available for integration with other SAP products, such as: S/4HANA, SRM, ERP, Master Data Governance and SAP Data Services. My point of view only covers the service and how I could use it as a web service.
thank you for reading this blog and please share your thoughts of this SCP service offering.