Entity Administration

Entities are specific types of data. A Person is a type of entity. So is a group, an email communication and a financial transaction. For those of you familiar with databases, an entity is like a table in your database. In fact, many entities do have a corresponding table in the database. These sets of screens allow you to view and configure the entities in Rock.

There are only two configuration items that you need to worry about. The first is whether the entity is "common." Common entities are shown at the top of the list when you need to select from a list of entities. We've preconfigured Groups and People to be common, but you may wish to add more (especially if you start adding custom entities of your own).

The second configuration item you’ll want to note is related to security. You can also add security to entities to help protect the data they contain. For instance, we've configured the Financial Transactions entity to only be viewable by those in the finance security roles. This is especially useful when it comes to using the reporting features of Rock. The security you define here will be used by the reporting engine to ensure that only authorized individuals can access sensitive data.

Track Interaction

Use this setting to link new records of an Entity Type to the active page interaction that created them. When enabled, Rock writes a record to the InteractionEntity table each time a new entity is created, letting you see the source interaction.This can help you track when and how new records are created, though it may introduce a small performance impact and increase storage usage.

Track Interaction Setting

To start tracking, head to Admin Tools > Settings > Entity Administration then select an Entity Type and check Track Interaction.

Now you have fresh data at your disposal!

Warning

Performance Impact
Enabling this setting does have a performance impact. Use it only when you have a defined reporting need and the entity will not be created at high volume.

Note

Viewing Tracked Interactions
These entries do not appear in the Interactions UI. Query the InteractionEntity table directly or join it to the Interaction table for reporting. See the Interactions documentation for details.  

Example SQL to View InteractionEntity Data
SELECT 
    ie.Id AS InteractionEntityId,
    ie.EntityId,
    et.Name AS EntityTypeName,
    i.Id AS InteractionId,
    i.Operation,
    i.InteractionDateTime,
    i.InteractionSummary,
    p.NickName,
    p.LastName
FROM InteractionEntity ie
JOIN EntityType et 
    ON ie.EntityTypeId = et.Id
JOIN Interaction i 
    ON ie.InteractionId = i.Id
LEFT JOIN PersonAlias pa
    ON i.PersonAliasId = pa.Id
LEFT JOIN Person p
    ON pa.PersonId = p.Id
ORDER BY i.InteractionDateTime DESC;

Running this query returns:

  • The entity type and entity ID
  • The interaction’s operation and summary (what action was taken, and on what page it occurred)
  • The date and time it occurred
  • The person linked to the interaction