Unify and manage your data

CRUD events

Learn how to configure Create, Read, Update, and Delete (CRUD) events in Reltio.

By default, all Create, Read, Update, and Delete (CRUD) events from Reltio APIs are sent to queues or topics as messages in JSON format.

The example CRUD Events display the CRUD events.

CRUD Events


Headers: tenantId; eventType; sourceObjectUri.
{
	"type": <string>,
	"object": <fields of target entity/relationship configured by JMSEventsFilteringFields/RelationEventsFilteringFields>,
	"ovChanged": <true|false> //only for ENTITY_CHANGED and RELATIONSHIP_CHANGED, optional - might not present 
       when "analyzeOvChanges" streaming property is set to false
}
Note: Make sure to use the objectVersion header to order the events of the same object instead of using fields that have timestamps, such as createdTime, updatedTime or any fields that originate from the crosswalk. The messages contain the header only if it’s included in the JMSEventsFilteringFields property based on the message streaming configuration. The header value is an incremental number, which is updated after every change in the business object. So, the message with the highest objectVersion header value will contain the latest object state.
The object field is based on the following criteria based on the internal structure of entity/relationship and configuring by JMSEventsFilteringFields/RelationEventsFilteringFields streaming property:

If largeObjectsSupport is true and the compressed size of the event exceeds the limit then the event will be sent again without the object but with URI of the object, event type and exceededQueueSizeLimit flag.

 
     {
	"type": <string>, 
       "ovChanged": <true|false>//only for ENTITY_CHANGED and RELATIONSHIP_CHANGED, optional - might not present 
       when "analyzeOvChanges" streaming property is set to false
	"exceededQueueSizeLimit": true
    }

You can configure the content of the object field by JMSEventsFilteringFields streaming property for events.

The following example explains the configuration of the content of object field by JMSEventsFilteringFields streaming property for entities’ events.

object field for entity includes only fields that are specified in JMSEventsFilteringFields when JMSEventsFilteringFields is absent, object includes all available fields. It can’t be empty.
 
            "JMSEventsFilteringFields": [
            "createdBy",
            "createdTime",
            "type",
            "uri"
        ],

Then object field is as follows:

Example: Object field


 "object": {
 "uri": "entities/1GXxZFUA",
 "type": "configuration/entityTypes/HCP",
 "createdBy": "auto20201019_Adminebaih",
 "createdTime": 1603108780415
}

You can configure the content of an object field by RelationEventsFilteringFields streaming property for relations’ events.

The object field for relation includes only fields that are specified in RelationEventsFilteringFields. It works similarly as JMSEventsFilteringFields.

Fields (defined)

The common fields are (JMSEventsFilteringFields and RelationEventsFilteringFields.)
  • URI
  • Type
  • createdBy
  • createdTime
  • updatedBy
  • updatedTime
  • startDate
  • endDate
  • Attributes
  • Crosswalks
  • Tags
  • Ratings
  • consolidatedRating

JMSEventsFilteringFields

Entities

  • roles
  • ctSubscribedUris
  • defaultProfilePic
  • label
  • secondaryLabel
Categories
  • analyticsAttributes
Groups
  • name
PotentialMatches
  • potentialMatchTOs
  • matchRules
  • matchScore
  • relevance
Interactions
  • timestamp
  • members
ChangeRequests
  • timestamp
  • members

RelationEventsFilteringFields

  • startRefPinned
  • startRefIgnored
  • endRefPinned
  • endRefIgnored
  • startObject
  • endObject

The CRUD Events table describes the various types of CRUD events, which are supported:

Table 1. CRUD events
CRUD EventsDescription
ENTITY_CREATEDThis event indicates that the entity was created. This event doesn’t include any additional fields.
ENTITY_REMOVEDThis event indicates that the entity was removed (by DELETE /entity/id request). This event doesn’t include any additional fields.
ENTITY_REMOVED_GDPRThis event indicates that the entity was removed (by GDPR request). After removing only two records for every entity, these are left: ENTITY_CREATED and ENTITY_REMOVED_GDPR. This event doesn’t include any additional fields.
ENTITY_LOST_MERGEThis event indicates that the entity was merged to another entity. This event doesn’t include any additional fields.
ENTITY_CHANGEDThis event indicates that the entity was changed. This event doesn’t include any additional fields.
RELATIONSHIP_CREATEDThis event indicates that a relationship was created between this entity and any other entity. In the case of an added Reference Attribute (for example, Address), the ENTITY_CHANGED event also appears in the result.
RELATIONSHIP_REMOVEDThis event indicates that a relationship between the entity and some other entity was removed. In the case of a Reference Attribute (for example, Address) the ENTITY_CHANGED event also appears in the result.
RELATIONSHIP_REMOVED_GDPRThis event indicates that a relationship between the entity and some other entity was removed (by GDPR request). In the case of a Reference Attribute (for example, Address), the ENTITY_CHANGED event also appears in the result.
RELATIONSHIP_CHANGEDThis event indicates that a relationship between the entity and some other entity was changed. In the case of the Reference Attribute (for example, Address), the ENTITY_CHANGED event also appears in the result.
GROUP_CREATEDCurrently, not used
GROUP_REMOVEDCurrently, not used.
GROUP_CHANGEDCurrently, not used.
INTERACTION_CREATEDThis event indicates that the interaction was created. This event doesn’t include any additional fields.
INTERACTION_REMOVEDThis event indicates that the interaction was removed (by DELETE /entity/id request). This event doesn’t include any additional fields.
INTERACTION_CHANGEDThis event indicates that the interaction was changed. This event doesn’t include any additional fields.
ENTITIES_SPLITTEDFor the winner entity, this event indicates that some entities were unmerged from it. For an unmerged entity, it indicates that the entity was unmerged from its parent.
ENTITIES_MATCHES_CHANGEDThis event is fired when the list of Potential Matches for an entity was changed.
RELATION_LOST_MERGE:This event is generated when merging relationships for loser relations.
RELATIONSHIP_MERGED: This event is launched when merging relations (like ENTITIES_MERGED for entities).
ENTITY_BUSINESS_PROCESS_CHANGEDFor workflow functionality, there are commonly designated business process objects connected to an entity. For any change to the business process for an entity (even if the business process was created or deleted), the platform fires the event.
Note: Lookup code and value in attributes are serialized to event JSON.
Example: ENTITY_CHANGED
Note: Only the changed attributes are listed along with the action that was performed on the attribute.
{
   "type":"ENTITY_CHANGED",
   "uri":"entities/00009ab",
   "deltas":{
      "ovChanged":true,
      "delta":[
         {
            "type":"ATTRIBUTE_ADDED",
            "attributeType":"configuration/entityTypes/Location/attributes/Street",
            "newValue":{
               "value":"NewStreet",
               "ov":true,
               "id":"7",
               "sources":[
                  "Reltio"
               ]
            }
         },
         {
            "type":"ATTRIBUTE_CHANGED",
            "attributeType":"configuration/entityTypes/Location/attributes/City",
            "newValue":{
               "value":"ChangedCity",
               "ov":true,
               "id":"8",
               "sources":[
                  "Reltio"
               ]
            },
            "oldValue":{
               "value":"InitialCity",
               "ov":true,
               "id":"8",
               "sources":[
                  "Reltio"
               ]
            }
         },
         {
            "type":"ATTRIBUTE_REMOVED",
            "attributeType":"configuration/entityTypes/Location/attributes/Country",
            "oldValue":{
               "value":"RemovedCountry",
               "ov":false,
               "id":"9",
               "sources":[
                  "Facebook"
               ]
            }
         }
      ]
   }
}

Example: RELATIONSHIP_CREATED

{
  "type": "RELATIONSHIP_CREATED",
  "object": {
    "uri": "relations/VnEqtJj",
    "type": "configuration/relationTypes/HasAddress",
    "createdBy": "auto20190828AdminawgMp",
    "createdTime": 1566970796552,
    "updatedBy": "auto20190828AdminawgMp",
    "updatedTime": 1566970796552,
    "startRefPinned": false,
    "startRefIgnored": false,
    "endRefPinned": false,
    "endRefIgnored": false,
    "attributes": {
      "BusinessCode": [
        {
          "type": "configuration/relationTypes/HasAddress/attributes/BusinessCode",
          "ov": true,
          "value": "AAA",
          "lookupCode": "A",
          "lookupRawValue": "A",
          "uri": "relations/VnEqtJj/attributes/BusinessCode/1dM9qjo8J"
        }
      ],
      "CareOf": [
        {
          "type": "configuration/relationTypes/HasAddress/attributes/CareOf",
          "ov": true,
          "value": "B",
          "uri": "relations/VnEqtJj/attributes/CareOf/1dM9qjsOZ"
        }
      ],
      "AddressType": [
        {
          "type": "configuration/relationTypes/HasAddress/attributes/AddressType",
          "ov": true,
          "value": "India",
          "lookupCode": "INDIA",
          "lookupRawValue": "091",
          "uri": "relations/VnEqtJj/attributes/AddressType/1dM9qjwep"
        }
      ],
      "SourceCD": [
        {
          "type": "configuration/relationTypes/HasAddress/attributes/SourceCD",
          "ov": true,
          "value": "081",
          "lookupError": "1003: RDM canonical value mapping not found for value [081] and source [Reltio] in tenant [tst01messaging]",
          "uri": "relations/VnEqtJj/attributes/SourceCD/1dM9qk0v5"
        }
      ]
    },
    "crosswalks": [
      {
        "uri": "relations/VnEqtJj/crosswalks/1dM9qk5BL",
        "type": "configuration/sources/Reltio",
        "value": "VnEqtJj",
        "reltioLoadDate": "2019-08-28T05:39:56.552Z",
        "createDate": "2019-08-28T05:39:56.552Z",
        "updateDate": "2019-08-28T05:39:56.552Z",
        "attributes": [
          "relations/VnEqtJj/attributes/BusinessCode/1dM9qjo8J",
          "relations/VnEqtJj/attributes/AddressType/1dM9qjwep",
          "relations/VnEqtJj/attributes/SourceCD/1dM9qk0v5",
          "relations/VnEqtJj/attributes/CareOf/1dM9qjsOZ"
        ],
        "singleAttributeUpdateDates": {}
      }
    ]
  }
}
Note: The event message payload for the following event types includes only the event name. These event types don’t include any information other than the name of the event.
  • CHANGE_REQUEST_CREATED: This event is generated when a Data Change Request (DCR) is created.
  • CHANGE_REQUEST_CHANGED: This event is generated when a Data Change Request (DCR) is changed.
  • CHANGE_REQUEST_REMOVED: This event is generated when a Data Change Request (DCR) is deleted.

The ENTITIES_SPLITTED event type has an extra field including split participant URIs:

{
	"type": <string>,
	"object": <serialized ObjectTO (EntityTO/RelationTO)>,
	"ovChanged": <true|false>,
	"uris": <List<string>>
}

The following types of CRUD events aren’t supported:

  • ACTIVITY_CREATED_UPDATED
  • ACTIVITY_REMOVED
  • ENTITY_LOSER_REMOVED
  • RELATION_WOULD_CHANGE
  • RELATION_WOULD_DELETE
  • ENTITIES_CATEGORY_TREE_STRUCTURE_CHANGED
Note: DCR events are supported.
Note: When the changes occur inside a relation or an entity, which is a part of the reference attribute for some related entities, the ovChanged flag is always true for ENTITY_CHANGED events sent for these related entities. This is due to a change in reference attribute. This type of optimization is to avoid negative impact on performance when there’s a difference in calculation, in case some referenced entity along with many related entities were changed.
You can use the following event message payload types:
  • SNAPSHOT
  • DELTA
  • SNAPSHOT_WITH_DELTA
The default event message payload type is SNAPSHOT. The request JSON is as follows:
{
	"type": <string>,
	"object": <serialized ObjectTO (e.g. EntityTO/RelationTO)>,
	"ovChanged": <true|false> //only for ENTITY_CHANGED and RELATIONSHIP_CHANGED, optional - may not be present when "analyzeOvChanges" streaming property is set to false,
	"exceededQueueSizeLimit": <true|false> // populated when TRUE
}
The request JSON for DELTA is as follows:
{
	"type": <string>,
	"uri": <source_object_uri>,
	"exceededQueueSizeLimit": <true|false>, // populated when TRUE
	"deltas": {
		AttributesDeltaCollection
	}
}

For more information, see About Delta Changes for Attributes.

Delta event examples

The following example shows the DELTA payload for the ENTITY_CREATED event:

{
	"type": "ENTITY_CREATED",
	"uri": "entities/loc2",
	"deltas": {
		"ovChanged": false,
		"delta": [
			{
				"type": "ENTITY_CREATED",
				"newValue": {
					"uri": "entities/loc2",
					"type": "configuration/entityTypes/Location",
					"createdBy": "test",
					"createdTime": 1662985373660,
					"updatedBy": "test",
					"updatedTime": 1662985373660,
					"attributes": {
						"AddressLine1": [
							{
								"type": "configuration/entityTypes/Location/attributes/AddressLine1",
								"ov": true,
								"value": "AL1",
								"uri": "entities/loc2/attributes/AddressLine1/5"
							}
						]
					},
					"crosswalks": [
						{
							"uri": "entities/loc2/crosswalks/6",
							"type": "configuration/sources/NPI",
							"sourceTable": "source_table",
							"value": "NPI_LOC2",
							"reltioLoadDate": "2022-09-12T12:22:53.660Z",
							"createDate": "2022-09-12T12:22:53.660Z",
							"updateDate": "2022-09-12T12:22:53.660Z",
							"attributes": [
								"entities/loc2/attributes/AddressLine1/5"
							],
							"singleAttributeUpdateDates": {}
						}
					],
					"analyticsAttributes": {},
					"label": "AL1",
					"secondaryLabel": ""
				}
			}
		]
	}
}

The following example shows the DELTA payload for the RELATIONSHIP_CREATED event. You can also see other attributes that are needed for a relationship event. These attributes help tie the event with its corresponding start object.

{
	"type": "RELATIONSHIP_CREATED",
	"uri": "relations/rel1",
	"deltas": {
		"ovChanged": false,
		"relationType": "HasAddress",
		"startObjectUri": "entities/hcp1",
		"endObjectUri": "entities/loc1",
		"delta": [
			{
				"type": "RELATIONSHIP_CREATED",
				"newValue": {
					"uri": "relations/rel1",
					"type": "configuration/relationTypes/HasAddress",
					"createdBy": "test",
					"createdTime": 1662985373660,
					"updatedBy": "test",
					"updatedTime": 1662985373660,
					"startRefPinned": false,
					"startRefIgnored": false,
					"endRefPinned": false,
					"endRefIgnored": false,
					"crosswalks": [
						{
							"uri": "relations/rel1/crosswalks/8",
							"type": "configuration/sources/NPI",
							"sourceTable": "source_table",
							"value": "NPI_REL1",
							"reltioLoadDate": "2022-09-12T12:22:53.660Z",
							"createDate": "2022-09-12T12:22:53.660Z",
							"updateDate": "2022-09-12T12:22:53.660Z",
							"attributes": [
								"relations/rel1/attributes/AddressType/7"
							],
							"singleAttributeUpdateDates": {}
						}
					],
					"startObject": {
						"objectURI": "entities/hcp1",
						"crosswalks": []
					},
					"endObject": {
						"objectURI": "entities/loc1",
						"crosswalks": []
					}
				}
			}
		]
	}
}

The following example shows the DELTA payload for the ENTITY_CHANGED event:

{
	"type": "ENTITY_CHANGED",
	"uri": "entities/hcp1",
	"deltas": {
		"ovChanged": true,
		"delta": [
			{
				"type": "ATTRIBUTE_ADDED",
				"attributeType": "configuration/entityTypes/HCP/attributes/Address",
				"newValue": {
					"ov": true,
					"id": "rel1",
					"crosswalks": [
						{
							"type": "configuration/sources/NPI",
							"value": "NPI_REL1",
							"sourceTable": "source_table"
						}
					]
				}
			}
		]
	}
}

The following example shows the DELTA payload for the RELATIONSHIP_REMOVED event:

{
	"type": "RELATIONSHIP_REMOVED",
	"uri": "relations/rel2",
	"deltas": {
		"ovChanged": false,
		"relationType": "HasAddress",
		"startObjectUri": "entities/hcp1",
		"endObjectUri": "entities/loc2"
	}
}