Tutorial: CDQ First Time Right
Overview
Use case
This tutorial describes the recommended use of CDQ Cloud Platform APIs for maintaining a single business partner data record. The presented flow provides the most comprehensive use of features and explains the API endpoints to be used.
Use Case: Situation, Approach and Results |
info
A complete use case description is available on the Wiki.
Learning Goals
Common Process and involved APIs/Endpoints |
In this tutorial, you will learn how:
- Verify Business Partner existence in one of the public pools (
VIES
) with the help of the CDQ reference data. - Enrich existing data
- Verify data quality before storing
attention
The following tutorial describes a happy path based on a common use case. Depending on your particular business requirements, the steps may be different and/or need to be customized.
Prerequisites
Authorization
Before trying CDQ APIs, user must be authenticated:
- Paste the API Key in the console's security bar into the
X-API-KEY
field.
- After pasting the API Key, the green padlock will appear.
Be careful
Green padlock doesn't mean that the API Key was pasted correctly.
- Check your API key for missing characters or extra space before trying.
No API Key?
- Check how to get one on authentication page.
- Follow the steps above.
Business Partner data
Business Partner chosen for the tutorials:
Name | Localities | Thoroughfares | PL VAT ID |
---|---|---|---|
SWISS KRONO Sp. z o.o. | Żary | Serbska 56 | PL9280012700 |
Data Source activation.
Remember to activate a VIES data source and accept terms of conditions before you start the tutorial.
info
To activate it use Global Settings app.
Step 1 Data Pool Lookup and Record Selection
To verify given Business Partner in theVIES
public data pool:- Use the Business Partner Lookup endpoint to send below request:
- Payload
- curl
{- "matchingThreshold": 0,
- "pageSize": 10,
- "page": 0,
- "dataSources": [
- "string"
], - "businessPartner": {
- "names": [
- {
- "value": "SWISS KRONO SPÓŁKA Z OGRANICZONĄ ODPOWIEDZIALNOŚCIĄ"
}
], - "identifiers": [
- {
- "value": "string",
- "type": {
- "technicalKey": "string"
}
}
], - "legalForm": {
- "value": "string"
}, - "addresses": [
- {
- "thoroughfares": [
- {
- "value": "Serbska",
- "number": "56"
}
], - "localities": [
- {
- "value": "Żary"
}
], - "administrativeAreas": [
- {
- "value": "string"
}
], - "postCodes": [
- {
- "value": "string"
}
], - "country": {
- "shortName": "PL"
}
}
]
}, - "featuresOn": [
- "ACTIVATE_DATASOURCE_CDQ_POOL"
]
}
- Check the above example in the Try It Console now:
- Check the response.
"SWISS KRONO Sp. z o.o."
is presented in theVIES:PL9280012700
data pool.
info
Make sure all required data sources are enabled. All data sources are listed in the feature table here.
- Check the
matchingProfile
in the response and findmatchingScores
value for Business Partner reliability.
{
"matchingProfile":{
"matchingScores":{
"overall":{
"classification":{
"technicalKey": "FULL_MATCH",
"name": "Full Match"
},
"value": 0.9928821602078861,
"explanation": "BP: [overall: [NAME: 0.91; overall: 0.91;]] A: [overall: [LOCALITY: 0.65; overall: 0.65; THOROUGHFARE: 0.8; overall: 0.8813559322033899; THOROUGHFARE_NUMBER: 0.65; overall: 0.9324137931034483;]]"
},
"businessPartner":{},
"address":{}
}
}
}
matchingScores
above 0,88 generally indicates a great lookup result. Visit Wiki for more information about Matching Score
or Match Classification.In the presented case the classification
shows FULL_MATCH
and the matchScores
value equals 0.9928821602078861
which means the provided Business Partner data are aligned with CDQ records.success
Your Business Partner is verified in the CDQ repository! Go to the next step.
Step 2 Address Cleansing
In this step, the user can perform activities to enrich desired data. During usage of Business Partner Curate, theSTANDARD
profile is active by default.info
STANDARD
profile are described in this page.To enrich given Business Partner data:
- Use the Business Partner Curate endpoint to send below request:
- Payload
- curl
{- "businessPartner": {
- "names": [
- {
- "value": "SWISS KRONO Sp. z o.o.",
- "type": {
- "technicalKey": "INTERNATIONAL"
}
}
], - "addresses": [
- {
- "country": {
- "shortName": "PL"
}, - "localities": [
- {
- "value": "Żary"
}
], - "thoroughfares": [
- {
- "value": "Serbska",
- "number": "56"
}
]
}
]
}
}
- Check the above example in the Try It Console now:
- Request can be different from the one visible on the user screen and be collapsed (if you are using the developer portal console).
- Check the
addressCurationResults
to see enriched data with detailed administrative area information, post-code and geographic coordinates.
{
"addressCurationResults": [
{
"curatedAddress": {
"version": {},
"metadata": {},
"country":
{
"shortName": "PL",
"value": "Poland"
},
"administrativeAreas":[
{
"value": "Lubusz Voivodeship",
"shortName": "08",
"type":{}
},
{
"value": "Powiat Żarski",
"shortName": "Powiat Żarski"
}
],
"postCodes":[
{
"value": "68-200",
"type":{}
}
],
"localities": [],
"thoroughfares": [],
"geographicCoordinates":{
"latitude": 51.63314,
"longitude": 15.10538
}
}
}
]
}
- Check the
curationAnalysis
to find important indicatorcurationLevel
which showsLEVEL_6
value. It means that enriched data is validated.
{
"curationAnalysis":{
"requestSimilarity":{},
"curationLevel": "LEVEL_6",
"accuracyIndicator": 3,
"outputLanguage": "EN",
"curationDecision":{},
"geographicCoordinatesAccuracy": "THOROUGHFARE_NUMBER"
}
}
success
Your Business Partner data are enriched! Go to the next step!
Step 3 Data Quality Check
Identifier Qualification
Qualification is the most powerful data quality check for identifiers. It does not only check the format and general registration of a tax number but compared given name and address data to the authority record of the given tax number. With a qualified tax number (i.e., a qualified tax number/name/address combination), you have proof that your data is equal to the particular authority's registry.
To validate given Business Partner data:
- Use the Business Partner Validate endpoint to send below request:
- Payload
- curl
{- "businessPartner": {
- "names": [
- {
- "value": "SWISS KRONO Sp. z o.o."
}
], - "identifiers": [
- {
- "value": "PL9280012700",
- "type": {
- "technicalKey": "EU_VAT_ID_PL"
}
}
], - "legalForm": {
- "name": "Spółka z ograniczoną odpowiedzialnością"
}, - "addresses": [
- {
- "country": {
- "shortName": "CH"
}, - "thoroughfares": [
- {
- "value": "Lukasstrassse 4"
}
], - "localities": [
- {
- "value": "St.Gallen"
}
], - "postCodes": [
- {
- "value": "9008"
}
]
}
]
}, - "profile": "QUALIFICATION",
- "featuresOn": [
- "SHOW_QUALIFICATION"
], - "addresses": [
- {
- "country": {
- "shortName": "PL"
}, - "thoroughfare": {
- "value": "Serbska 56"
}, - "locality": {
- "value": "Żary"
}, - "postCode": {
- "value": "68-200"
}
}
]
}
- Check the above example in the Try It Console now:
- Check the response above and check the
validatorMessage
for value.
{
"validatorMessage": "VAT ID is valid."
}
"VAT ID is valid."
confirms the reliability of the VAT identifier of the Business
Partner.attention
validatorMessage
in the response. Add "featuresOn": ["SHOW_QUALIFICATION"]
to the body to
see it.Additional quality checks
To perform additional checks below feature send the request without any profile on, theSTANDARD
profile will be
activated by default.To validate given Business Partner data:
- Use the Business Partner Validate endpoint to send below request:
- Payload
- curl
{- "businessPartner": {
- "names": [
- {
- "value": "SWISS KRONO Sp. z o.o."
}
], - "identifiers": [
- {
- "value": "PL9280012700",
- "type": {
- "technicalKey": "EU_VAT_ID_PL"
}
}, - {
- "value": "9280012700",
- "type": {
- "technicalKey": "PL_NIP"
}
}, - {
- "value": "970327738",
- "type": {
- "technicalKey": "PL_REG"
}
}
], - "legalForm": {
- "name": "Spółka z ograniczoną odpowiedzialnością"
}, - "addresses": [
- {
- "country": {
- "shortName": "PL"
}, - "thoroughfares": [
- {
- "value": "Serbska 56"
}
], - "localities": [
- {
- "value": "Żary"
}
], - "postCodes": [
- {
- "value": "68-200"
}
], - "administrativeAreas": [
- {
- "value": "lubuskie"
}
]
}
]
}
}
- Check the above example in the Try It Console now:
"businessPartner"
object appeared in the response with Business Partner data.{
"summary":{
"validationLevel": "NO_DEFECTS",
"action": "AUTO_APPROVE",
"statistics": {}
},
"debugInfo":
{
"businessRulesExecutionSummary":{}
},
"identifierResults":[
{
"property":{
"value": "PL9280012700",
"type": "EU_VAT_ID_PL"
},
"reliabilityLevel":{
"name": "Identifier existence",
"url": "https://meta.cdq.com/Identifier_existence",
"value": 4,
"checks":[]
}
},
{
"property":{
"value": "9280012700",
"type": "PL_NIP"
},
"reliabilityLevel":{
"name": "Identifier existence",
"url": "https://meta.cdq.com/Identifier_existence",
"value": 4,
"checks":[]
}
},
{
"property":{
"value": "970327738",
"type": "PL_REG"
},
"reliabilityLevel":{
"name": "Identifier existence",
"url": "https://meta.cdq.com/Identifier_existence",
"value": 4,
"checks":[]
}
}
],
"businessPartner":{
"names":[],
"legalForm":{},
"identifiers":[],
"addresses":[
{
"country":{
"shortName": "PL",
"value": "Poland"
},
"administrativeAreas":[
{
"value": "lubuskie"
}
],
"postCodes":[
{
"value": "68-200"
}
],
"localities":[
{
"value": "Żary"
}
],
"thoroughfares":[
{
"value": "Serbska 56"
}
]
}
]
}
}
Congratulations!
Your Business Partner data are validated!
Step 4 Data ready to store
After performing all the above steps, the Business Partner data can be stored in the corporate database.
Your opinion matters!
We are constantly working on providing an outstanding user experience with our products. Please share your opinion about this tutorial!
Mail our developer-portal team: developer-portal@cdq.com