Creating custom object types and custom event types
You can model objects and events specific to your business as custom object types and custom event types. You can set up object to object relationships and event to object relationships between them, and also between them and the Celonis object types and event types in the Celonis catalog processes. Objects and events and Relationships between objects and events explain the basics of objects, events, and relationships.
When you create and publish custom object types and custom event types, Celonis automatically creates tables for them in the underlying database in the OCPM Data Pool. You’ll need to create a custom SQL transformation to use the relevant source data to create objects and events from your custom object types and custom event types. Creating custom transformations has the instructions to do this.
If your source system data has tables that contain data for identifiable objects, we can create a custom object type for you based on one of your source system tables. The columns from the table become the attributes of the object type, and you can add extra attributes. You can choose to also have us autogenerate the transformation scripts for the object type, with the mappings to your source system table. You can save time on your custom modeling with this approach if your source system data is already object-centric.
Tip
Before you start working with custom object types, event types, relationships, and transformations, we recommend you complete the Celonis Academy training track Implement Object-Centric Process Mining, which teaches you how to model objects and events. The course OCPM in Action - Build Object-Centric Data Models (2 hours) has step by step examples for you to work through. And our new course Object-Centric Modeling Best Practices has expert training, tips, and strategies for creating a custom object-centric data model.
Follow these steps to create a custom object type or custom event type. If you have any problems, check the solutions in Troubleshooting for modeling objects and events.
From the Celonis navigation bar, select Data > Objects and Events.
Select Objects or Events in the top navigation bar.
Click the Create button on the list of objects or events. For an object type, you can choose either Model from scratch to create the object type by hand, or Import from table to base the object type on a table in your source system data. Event types have to be modeled from scratch.
If you’re creating an object type from a table, select the connected data source where the table is (which needs to be available through a data connection in this data pool), and the table name, and select Import.
Choose a name for the object type or event type.
Tip
Here are all the naming rules for object types, event types, and relationships:
The name of an object type or event type can’t have any spaces or special characters. Upper and lower case letters and numbers are allowed ([A-Za-z0-9]), and the name must start with a letter.
The length limits are 40 characters for the name of an object type or event type, 50 characters for the name of an attribute, and 41 characters for the name of a relationship.
The names of attributes and relationships must be unique within an object type or event type, and you can't give a relationship the same name as an attribute. Uniqueness is validated case-insensitively.
Don’t use the reserved words ”activity” (for event types) and “epoch” (for object types and event types) as the names of attributes.
For an imported object type, we’ll apply these rules to the table name to create the suggested object name. If the table name starts with a number, or if it already exists, we’ll flag this so you know you need to change it.
Add tags that apply to the object type or event type, and add a description if you want to. You can use the existing Celonis process tags, or create your own tags in the "Custom processes" category by typing one in and clicking it to create it. Custom tags can be up to 41 characters long (including spaces), and they need to be unique in the "Custom processes" category - note that they aren't case-sensitive. After you've saved the object type or event type, your custom tags can be used for filtering, and can be assigned to other custom object types or event types.
Tip
You can color-code object types in the graph view of the object-centric data model. Click the colored box by the object type to pick a different color.
For an imported object type, check and edit the suggested attributes. The ID attribute is provided for you, and can’t be changed.
Uncheck any of the columns from the table that you don’t want to have as attributes of the object type. To see a sample of the data in each column, click Preview source table.
Tip
You can’t use foreign keys as attributes, but you’ll probably want to create relationships between this object type and the object types represented in those tables. Make a note of them now to help with that.
Edit any attribute names that you want to change. We’ve used the column names from the table, with the naming rules applied, as the suggested attribute names.
Tip
You can’t change the data type for the attributes - they’re taken from the columns in your table. If the data type for a column isn’t suitable, some extractors let you change it in the extraction configuration. Or you can set up a pre-processing stage by following the instructions in I want to pre-process my raw data before transforming it into objects and events.
Click Add attribute to add any further attributes you want in the object type, which you'll be populating with data from outside your selected table. Name them and select a data type for them.
Confirm that you’ve got all the attributes you want. You can use the Hide unselected toggle to remove the table columns you aren’t using from the preview, and you can sort the attributes.
When you’re finished, click Create to create the object type. If you want to generate the transformation script for the attributes now, click Generate transformation in the confirmation pop-up. You’ll still need to edit it to assemble the ID and populate any added attributes, but we recommend you do generate the script as it should save you a lot of time. There won’t be an opportunity later to do it.
If you’re modeling the object type or event type from scratch, add the attributes manually. The ID attribute for an object type or event type, and the timestamp attribute for event types, are already provided for you and can’t be changed.
Click Add to add a new attribute.
Give the attribute a name. You can’t use spaces or special characters.
Select the data type for the attribute from the Data type dropdown. The available data types are String, Boolean, Datetime, Integer, and Floating Point.
Tip
Event logs can now break down event types into subsets using their attributes. For example, you could analyze each specific delivery method for the ReleaseDelivery event separately. Instead of creating lots of similar event types, you can create a single event type and use attributes to subset it for analysis. Modeling objects and events explains more about this.
Click Save to create the new object type or event type.
To create more custom object types or event types like this one, click the context menu (the three vertical dots) next to its name, and select the Duplicate option. (Object types and event types from the Celonis catalog don’t have this option because you can’t duplicate them.) Type in a new name, and click Duplicate to confirm. The duplicate object type or event type has all the attributes of the original and all the tags that were assigned to it, and you can edit it as you want. We don't duplicate any of its relationships.
If you need to make any changes to your custom object type or event type, click it in the list to bring up its details again, and make your edits. If you need to rename it, click the context menu (the three vertical dots) next to its name, and select the Rename option.
Tip
If you already used the custom object type or event type in your object-centric data model, renaming means you'll need to:
Update the name of any object to object relationships and event to object relationships involving your renamed object type or event type.
Update transformations that reference the old name in SQL statements.
Rerun the transformations to populate the new database table with your new name. The old one is deleted, along with any objects and events that are in it.
We'll show you which relationships and transformations are affected. We'll also show you which perspectives are involved, though we update these automatically.
If you need to delete a custom object type or event type, in the list, click the context menu (the three vertical dots) next to its name, and select Delete.
When you’ve added at least some of the object types and event types you want, start adding their relationships. For an imported object type, consider creating relationships with each object that has a foreign key in the source system table.
For event types, you can add event to object relationships by selecting Related objects.
For object types, you can add event to object relationships by selecting Related events.
For object types, you can add object to object relationships by selecting Relationships to objects.
In the search box, start typing all or part of the name of the object type or event type that you want to link, and pick it from the list. If you’re working in the event type, this will be the object type, and if you’re working in the object type, this will be the event type.
To add event to object relationships:
Click Add to add a new event to object relationship.
Choose whether the event involves one of the objects, or many of the objects.
In the Description field, add a descriptive name for the event to object relationship. Use words that explain the role of the object in the event and how it is involved (for example, “Approver”).
Click Save to create the relationship.
To add object to object relationships:
Click Add to add a new object to object relationship.
In the search box, start typing all or part of the name of the object type that you want to link to this object, and pick the object type from the list.
Use the Cardinality dropdown to say whether this relationship is many to one (m:1), one to many (1:m), many to many (m:n) with the relationship table as a join table on the source object, or many to many (m:n) with a join table on the target object.
Tip
The object-centric data model doesn't enforce uniqueness of a foreign key, which is why one to one relationships aren't available as a choice now.
By default, we'll create the incoming relationship from the other object as well, to make a bidirectional relationship. If you want the relationship to be unidirectional, where the first object type has a record of the relationship but the second object type involved in it doesn’t, click the trash can icon to delete the incoming relationship.
Give each side of the relationship a name. We’ve prefilled this with the name of the related object, but you can change this if you want. You can't use spaces or special characters. Upper and lower case letters and numbers are allowed. There's a length limit of 41 characters.
Verify the relationships for the object types and event types you’ve created, especially the object to object relationships. You can view all the outgoing and incoming relationships for an object type by selecting Relationships to objects.
The Outgoing tab shows the relationships where the foreign key or join table is to be implemented on this object, and the Incoming tab shows the relationships where the foreign key or join table is to be implemented on the other object.
Check Include inactive to show any other relationships that exist for the object, but the related object isn't enabled in your object-centric data model yet.
Click any relationship to view the implementation details and the location of the transformation.
When you’ve finished creating object types, event types, and their relationships, select Publish > Publish to development to synchronize your changes to the development environment.
Next, set up transformations that use your extracted source system data to create instances of objects and events from your custom object types and custom event types. Follow the steps in Creating custom transformations to do this. For an object type or event type that you modeled from scratch, you’ll need to write the transformation scripts in the SQL editor. For an object type that you imported from a table and chose to generate transformations, you’ll just need to edit them to populate the object ID, any extra attributes you added, and the columns or tables for its relationships.