Question
Consider 4 sources ( A, B, C, D) providing address, merged in the system and after some time source A starts populating address line 2 which was null earlier. As per the requirement, the existing address from source A should not update the existing merged address but create a new address - how can we attain it.
Example of address line 2:
[
{
"type": "configuration/entityTypes/Location",
"attributes": {
"Zip": [
{
"value": {
"Zip5": [
{
"value": "45140"
}
]
}
}
],
"AddressLine1": [
{
"value": "6331 Paxton Woods Drive"
}
],
"AddressLine2": [
{
"value": null
}
],
"StateProvince": [
{
"value": "Ohio"
}
],
"Country": [
{
"value": "United States"
}
],
"City": [
{
"value": "Loveland"
}
]
},
"crosswalks": [
{
"type": "configuration/sources/ICTMS",
"value": "Crosswalk1ICTMS",
"sourceTable": "ADR"
}
]
}
]
Follow-up address update:
[
{
"type": "configuration/entityTypes/Location",
"attributes": {
"Zip": [
{
"value": {
"Zip5": [
{
"value": "45140"
}
]
}
}
],
"AddressLine1": [
{
"value": "6331 Paxton Woods Drive"
}
],
"AddressLine2": [
{
"value": "Apt 5"
}
],
"StateProvince": [
{
"value": "Ohio"
}
],
"Country": [
{
"value": "United States"
}
],
"City": [
{
"value": "Loveland"
}
]
},
"crosswalks": [
{
"type": "configuration/sources/PRISM",
"value": "Crosswalk2PRISM",
"sourceTable": "ADR"
}
]
}
]
This should update the existing address as any address with secondary address designators like apartment number, building number, or suite number will be part of address line 1.
Can you suggest an approach to prevent such an update on the consolidated records which leads to overwriting of address?
Answer
1. We create a new location using POST /entities.
[
{
"type": "configuration/entityTypes/Location",
"attributes": {
"Zip": [
{
"value": {
"Zip5": [
{
"value": "45140"
}
]
}
}
],
"AddressLine1": [
{
"value": "123 Test Main Street"
}
],
"AddressLine2": [
{
"value": null
}
],
"StateProvince": [
{
"value": "Ohio"
}
],
"Country": [
{
"value": "United States"
}
],
"City": [
{
"value": "Loveland"
}
]
},
"crosswalks": [
{
"type": "configuration/sources/PRISM",
"value": "Crosswalk1PRISM",
"sourceTable": "ADR"
}
]
}
]
2. Perform another POST /entities that should create a new location using a different crosswalk value.
[
{
"type": "configuration/entityTypes/Location",
"attributes": {
"Zip": [
{
"value": {
"Zip5": [
{
"value": "45140"
}
]
}
}
],
"AddressLine1": [
{
"value": "123 Test Main Street"
}
],
"AddressLine2": [
{
"value": "Suite 123"
}
],
"StateProvince": [
{
"value": "Ohio"
}
],
"Country": [
{
"value": "United States"
}
],
"City": [
{
"value": "Loveland"
}
]
},
"crosswalks": [
{
"type": "configuration/sources/PRISM",
"value": "Crosswalk2PRISM",
"sourceTable": "ADR"
}
]
}
]
Comments
Please sign in to leave a comment.