Question
We have an autogenerated attribute LID in the Location entity. For Entity ID: 2R26EEB and 3RNIu9J, we see that 2 LIDs are from 1 crosswalk. Ideally, even if we get 2 LIDs, only one should suffice as incremental.
The API that was used was:
POST https://<envirnoment>.reltio.com/reltio/api/<tenantID>/entities?alwaysCreateDCR=true&options=partialOverride
Request body
[
{ "type" : "configuration/entityTypes/HCO",
"attributes" : {
"Address" : [ {
"value" : {
"AddressLine1" : [ {
"type" : "configuration/entityTypes/Location/attributes/AddressLine1",
"value" : "2308 PINE RIDGE RD"
} ],
"AddressLine2" : [ {
"type" : "configuration/entityTypes/Location/attributes/AddressLine2",
"value" : "N"
} ],
"City" : [ {
"type" : "configuration/entityTypes/Location/attributes/City",
"value" : "NAPLES"
} ],
"StateProvince" : [ {
"type" : "configuration/entityTypes/Location/attributes/StateProvince",
"value" : "FL"
} ],
"Zip" : [ {
"value" : [ {
"Zip5" : [ {
"type" : "configuration/entityTypes/Location/attributes/Zip/attributes/Zip",
"value" : null
} ]
} ]
} ],
"Country" : [ {
"type" : "configuration/entityTypes/Location/attributes/Country",
"value" : "US"
} ],
"AddressTypeN" : [ {
"value" : {
"AddressType" : [ {
"type" : "configuration/relationTypes/HCOHasAddress/attributes/AddressTypeN/attributes/AddressType",
"value" : "BUS"
} ],
"Status" : [ {
"type" : "configuration/relationTypes/HCOHasAddress/attributes/AddressTypeN/attributes/Status",
"value" : "A"
} ]
}
} ],
"LID" : [ {
"type" : "configuration/entityTypes/Location/attributes/LID",
"value" : null
} ]
},
"refEntity" : {
"type" : "configuration/entityTypes/Location",
"crosswalks" : [ {
"type" : "configuration/sources/VEEVA",
"value" : "Surrogate"
} ]
},
"refRelation" : {
"type" : "configuration/relationTypes/HCOHasAddress",
"crosswalks" : [ {
"type" : "configuration/sources/VEEVA",
"value" : "KM866024-53106VJ7W~34109~2308 PINE RIDGE RD~N~NAPLES~FL"
} ]
}
} ]
},
"crosswalks" : [ {
"type" : "configuration/sources/VEEVA",
"value" : "KM866024-53106VJ7W"
} ]
}]
Could you please let us know why these 2 locations have 2 LIDs from the same crosswalk?
{
"label": "LID",
"name": "LID",
"description": "Location ID",
"type": "Int",
"hidden": false,
"important": false,
"system": false,
"required": false,
"faceted": false,
"searchable": false,
"autoGenerated": true,
"generator": "SEQ_LS_LOC_LID_tsUhTVIvcav0Cu1",
"autoGenerationPattern": "{value}",
"generateIfEmpty": true,
"generateIfNotEmpty": false,
"generatedValueUniqueForCrosswalk": true,
"attributeOrdering": {
"orderType": "ASC",
"orderingStrategy": "LUD"
},
"uri": "configuration/entityTypes/Location/attributes/LID",
"skipInDataAccess": false
}
Answer
- If generateIfEmpty is set to true during a POST /entities call with the alwaysCreateDCR option turned on, the auto-generated field will have its value generated if it wasn't provided in the request.
- When generatedValueUniqueForCrosswalk is set to true, and the autogenerated field is defined in the POST /entities payload with alwaysCreateDCR as an option, the existing value by crosswalk will be reused instead of generating a new one.
- If generateIfNotEmpty is false during a POST /entities call with the alwaysCreateDCR option turned on, the autogenerated field will not be generated if a value is explicitly sent in the request.
- If you are using a null or a new "ungenerated" number when you use alwaysCreateDCR=true, then a newly generated LID is created. When you set "generateIfNotEmpty": false, the attribute is considered ordinary. When you provide a value, it stores it just like a non-autogenerated attribute with the same rules, depending on the crosswalk supplied with the update. Therefore, when the DCR is approved and updated, you will see the re-creation of the LID value.
Comments
Please sign in to leave a comment.