Unify and manage your data

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 specified URI. If an entity with this URI 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 the endObjectCrosswalks 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 a URI. 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 in endObjectCrosswalk.

  • If neither a crosswalk nor a URI is specified in refEntity, as in the previous case endObjectCrosswalks 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 the endObjectCrosswalks field.

Error codes in Partial Override

The Error codes and Messages table explains various error codes along with the messages and relevant descripions.

Table 1. Error codes and Messages
Error CodeError MessageDetailed MessageDescription
605The reference attribute has all crosswalks with dataProvider=falseThe reference attribute has all crosswalks with dataProvider=falseAll the crosswalks that are specified in the refEntity field, have the flag dataProvider = false.
907Posting 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"
          }
        ]
      }
    ]
    ...
  }
]