CRUD Events

By default, all CRUD from Reltio APIs are sent to queues or topics as messages in JSON format.

The example CRUD Events displays 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 is 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 cannot 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 Events Description
ENTITY_CREATED This event indicates that the entity was created. This event does not include any additional fields.
ENTITY_REMOVED This event indicates that the entity was removed (by DELETE /entity/id request).This event does not include any additional fields.
ENTITY_REMOVED_GDPR This 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 does not include any additional fields.
ENTITY_LOST_MERGE This event indicates that the entity was merged to another entity.This event does not include any additional fields.
ENTITY_CHANGED This event indicates that the entity was changed. This event does not include any additional fields.
RELATIONSHIP_CREATED This 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_REMOVED This 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_GDPR This 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_CHANGED This 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_CREATED Currently, not used
GROUP_REMOVED Currently, not used.
GROUP_CHANGED Currently, not used.
INTERACTION_CREATED This event indicates that the interaction was created. This event does not include any additional fields.
INTERACTION_REMOVED This event indicates that the interaction was removed (by DELETE /entity/id request).This event does not include any additional fields.
INTERACTION_CHANGED This event indicates that the interaction was changed. This event does not include any additional fields.
ENTITIES_SPLITTED For 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 master.
ENTITIES_MATCHES_CHANGED This 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_CHANGED For 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.

Refer to the following example Example: RELATIONSHIP_CREATED:

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 include only the event name. These event types do not 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 are not supported:

  • ACTIVITY_CREATED_UPDATED
  • ACTIVITY_REMOVED
  • ENTITY_LOSER_REMOVED
  • RELATION_WOULD_CHANGE
  • RELATION_WOULD_DELETE
  • ENTITIES_CATEGORY_TREE_STRUCTURE_CHANGED
Note: DCR events are completely 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 is 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
  • deltas
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 deltas 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.