Entity with a Reference Attribute
When the connectRelationsToDefaultCrosswalk
property is enabled and an entity is posted with a reference attribute, the search of a crosswalk for the end object of the relation is performed by the value of the refEntity
according to the following algorithm:
-
If only a URI is specified in
refEntity
, a match is searched for the specifiedURI
. If an entity with thisURI
is found, but does not contain the default crosswalk, it is added to this entity. Then, the found or added default crosswalk is used in theendObjectCrosswalks
section. If the entity with this URI is not found, search uses the match rules for the specified referenced entity type in the business configuration. The logic is same for the entity found by aURI
. If there is no default crosswalk in the matched entity, it is added and used as the end object crosswalk. If it already had the default crosswalk then nothing is added to the entity, the existing default crosswalk is used inendObjectCrosswalk
. -
If neither a crosswalk nor a URI is specified in
refEntity
, as in the previous caseendObjectCrosswalks
can be filled only if the partial override for reference attributes is enabled. A referenced entity is then created with a default crosswalk, and this crosswalk is used in theendObjectCrosswalk
s field.
Error codes in Partial Override
The Error codes and Messages table explains various error codes along with the messages and relevant descripions.
Error Code | Error Message | Detailed Message | Description |
---|---|---|---|
605 | The reference attribute has all crosswalks with dataProvider =false | The reference attribute has all crosswalks with dataProvider =false | All the crosswalks that are specified in the refEntity field, have the flag dataProvider = false . |
907 | Posting two or more data provider crosswalks from different contributors within single incoming object is not allowed. | Two or more data provider crosswalks from different contributors are posted within single incoming object: crosswalk={source[<source_type1>], value[<value1>]}' (contributor ID = <contributor_id1>), 'crosswalk={source[<source_type2>], value[<value2>]}' (contributor ID = <contributor_id2>) | All the crosswalks, that are specified in the refEntity field, belong to different contributors. |
Existing Location
[
{
"index": 0,
"object": {
"uri": "entities/10KnPTeK",
"type": "configuration/entityTypes/Location",
"createdBy": "reltiouser",
"createdTime": 1612818536335,
"updatedBy": "reltiouser",
"updatedTime": 1612818536335,
"attributes": {
"AddressLine1": [
{
"type": "configuration/entityTypes/Location/attributes/AddressLine1",
"ov": true,
"value": "Address 001",
"uri": "entities/10KnPTeK/attributes/AddressLine1/1yEhOzeD2"
}
],
"City": [
{
"type": "configuration/entityTypes/Location/attributes/City",
"ov": true,
"value": "City 001",
"uri": "entities/10KnPTeK/attributes/City/1yEhOziTI"
}
]
},
"isFavorite": false,
"crosswalks": [
{
"uri": "entities/10KnPTeK/crosswalks/1yEhOzmjY",
"type": "configuration/sources/NPI",
"value": "Location001Npi",
"reltioLoadDate": "2021-02-08T21:08:56.335Z",
"createDate": "2021-02-08T21:08:56.335Z",
"updateDate": "2021-02-08T21:08:56.335Z",
"attributes": [
"entities/10KnPTeK/attributes/AddressLine1/1yEhOzeD2",
"entities/10KnPTeK/attributes/City/1yEhOziTI"
],
"singleAttributeUpdateDates": {}
}
],
"analyticsAttributes": {},
"label": "Address 001 City 001",
"secondaryLabel": ""
},
"successful": true
}
]
Request to Create an HCP
POST {{api_uri}}/{{tenant}}/entities
[
{
"type": "configuration/entityTypes/HCP",
"attributes": {
"FirstName": [
{
"value": "FirstName"
}
],
"Address": [
{
"value": {
"AddressType": [
{
"value": "Office"
}
],
"AddressRank": [
{
"value": "001"
}
],
"AddressLine1": [
{
"value": "Address 001"
}
],
"City": [
{
"value": "City 001"
}
]
},
"refEntity": {
"objectURI": "entities/10KnPTeK"
}
}
]
},
"crosswalks": [
{
"type": "configuration/sources/SDS",
"value": "Hcp002Sds"
}
]
}
]
Result - When connectRelationsToDefaultCrosswalk
is false / no flag
[
{
...
"Address": [
{
...
"refEntity": {
"type": "configuration/entityTypes/Location",
"crosswalks": [
{
"uri": "entities/1HtnerbQ/crosswalks/10KnPTeK.38GR3MHkC",
"type": "configuration/sources/Reltio",
"value": "10KnPTeK",
"attributeURIs": [
"entities/1HtnerbQ/attributes/Address/133xPp00",
"entities/1HtnerbQ/attributes/Address/133xPp00/City/38GR3M9Dg",
"entities/1HtnerbQ/attributes/Address/133xPp00/AddressLine1/38GR3M4xQ"
]
}
],
"objectURI": "entities/10KnPTeK"
},
"refRelation": {
"type": "configuration/relationTypes/HasAddress",
"crosswalks": [
{
"uri": "entities/1HtnerbQ/crosswalks/133xPp00.38GR3MQGi",
"type": "configuration/sources/Reltio",
"value": "133xPp00"
}
],
"startRefPinned": false,
"endRefPinned": false,
"startRefIgnored": false,
"endRefIgnored": false,
"objectURI": "relations/133xPp00"
},
"startObjectCrosswalks": [
{
"type": "configuration/sources/SDS",
"value": "Hcp002Sds"
}
]
}
]
...
}
]
Result - When connectRelationsToDefaultCrosswalk
is true
[
{
...
"Address": [
{
...
"refEntity": {
"type": "configuration/entityTypes/Location",
"crosswalks": [
{
"uri": "entities/1HtnerbQ/crosswalks/10KnPTeK.38GR3MHkC",
"type": "configuration/sources/Reltio",
"value": "10KnPTeK",
"attributeURIs": [
"entities/1HtnerbQ/attributes/Address/133xPp00",
"entities/1HtnerbQ/attributes/Address/133xPp00/City/38GR3M9Dg",
"entities/1HtnerbQ/attributes/Address/133xPp00/AddressLine1/38GR3M4xQ"
]
}
],
"objectURI": "entities/10KnPTeK"
},
"refRelation": {
"type": "configuration/relationTypes/HasAddress",
"crosswalks": [
{
"uri": "entities/1HtnerbQ/crosswalks/133xPp00.38GR3MQGi",
"type": "configuration/sources/Reltio",
"value": "133xPp00"
}
],
"startRefPinned": false,
"endRefPinned": false,
"startRefIgnored": false,
"endRefIgnored": false,
"objectURI": "relations/133xPp00"
},
"startObjectCrosswalks": [
{
"type": "configuration/sources/SDS",
"value": "Hcp002Sds"
}
],
"endObjectCrosswalks": [
{
"type": "configuration/sources/Reltio",
"value": "10KnPTeK"
}
]
}
]
...
}
]