Skip to main content

Celonis Product Documentation

Creating custom perspectives and event logs

When you create a perspective, your goal is to select a subset of the object types, event types, and relationships from the object-centric data model that is relevant to a process, or to another grouping that you want to analyze. You don’t need to include all the other object types that have a relationship with an included object type - just the ones that matter to your analysis.

Relationships and cycles

The collection of objects that you want to include in your perspective, might have relationships between each other that aren’t relevant to what you are analyzing. Identifying the relationships to use in the perspective is a key step in making your analysis work correctly. Relationships between objects and events explains how relationships work.

In the object-centric data model, there can often be multiple relationships between a pair of object types. Celonis needs to know which one is important to your analysis in order to construct the PQL query. When there is more than one path between two objects in a graph, we call it a cycle. An object-centric data model may contain cycles, but to avoid ambiguity in calculating joins, perspectives cannot contain cycles – in other words, there can only be a single path between any two objects in a perspective.

  • In some cases, a pair of objects can have two direct relationships that are relevant to the process you want to analyze. For example, you might be interested in both the requester and the approver of a purchase order. However, both the requester and the approver are represented by the User object type. If you want to use both of these relationships in your perspective, you have a cycle.

  • More commonly, a group of objects can generate a cycle between themselves. If you start from one object and follow the object to object relationships along, you can return to your starting point. For example, there’s a cycle between the Celonis object types PurchaseOrderItem, PurchaseOrder, and Contract in our object-centric data model.

    ocpmcyclepurchaseorder.png

To solve this issue, the perspective builder lets you create multiple copies of an object type, and embed them in the perspective as separate objects. For example, if the user is both a requester and an approver, you can have multiple copies of the User object type, including one as the original and the rest as embedded copies.

Embedding is most useful for relationships where one object type provides context for another. Embedded copies are only connected to the object type that owns the relationship, and do not have any object to object relationships or event to object relationships of their own. It’s just acting like an extra attribute of the object type you’re working with. This strategy is commonly used for master data objects (such as a user, vendor, or material) that add information to the object type you’re working with.

Building a perspective

Follow these steps to create your custom perspective in the perspective builder. If you have any problems, check the solutions in Troubleshooting perspectives.

  1. From the Celonis navigation bar, select Data > Objects and Events.

  2. Select Perspectives in the top navigation bar.

    ocpmtopnavperspectives.png
  3. Click Create.

  4. Enter a name for the perspective and click Create. You can’t use spaces or special characters.

  5. In the Objects panel, choose an object type that is part of the process you’re interested in to start your perspective from. You can browse the list of all the objects in your object-centric data model, or use the search bar to find one. When you choose an object type, it’s added to the graph, and you’ll see the object’s details panel.

    Tip

    You can bring up an object’s details panel either by clicking on the object in the graph view, or by selecting the object name from the list “Included in the perspective” in the Objects panel. To exit the details panel and go back to the Objects panel, use the back arrow by the object name, or the Done button at the end of the details panel.

  6. Use the Display Options dropdown to select how you want to explore the related object types. You can choose a different display option at any time if you’re seeing too many objects, or if you want to see more.

    • To build your perspective by exploring the objects that are adjacent to your starting object type, use the display option “Show included + objects adjacent to selected object”, which is the default. This option lets you see all the objects you’ve already included in the perspective, plus the objects that have object to object relationships to the object you’ve currently selected.

    • For a wider scope, choose "Show included + objects adjacent to any included object". This option shows all the object types that have object to object relationships to all your included objects. It might make the graph quite large, but it’ll show you how your perspective fits within the overall model, and also clarify which objects have object to object relationships to more than one of your included objects.

    • If you already know the object types you want to use in your perspective, and just want to see those, choose the display option “Show only included objects” from the dropdown.

      Tip

      When you’re just starting a perspective, it’s usually best to choose “Show included + objects adjacent to selected” , then build your perspective by working outwards from your starting object type, and including adjacent objects. “Show only included objects” is good to use at the end of the process when you’ve included all the objects that you want, and don’t need to see the others.

    • By default, object types that you’ve embedded are shown in the graph. If you want to remove them from the display, so you can focus on the object types that still have their relationships, toggle the “Show embedded” slider off.

    • By default, we only show unhandled relationships if they are connected to your currently selected object type. If you want to see all the available relationships for all the object types included in your perspective, toggle the “Show all relationships” slider on.

  7. Now build out your perspective. The best method is to use the graph view to work your way out from your starting object type by exploring the adjacent object types. These are the object types that have object to object relationships with your selected object type. The adjacent object types appear in the graph view in gray text with a plus sign (+) in their squares.

    • Click on any object type with a plus sign to include it in the perspective. If there’s only one relationship between the objects, Included appears on the relationship line to show that this object to object relationship is used in your perspective. If there’s more than one possible relationship, Select appears on the relationship line, and you can use the object details panel to pick which one to include.

    • You can also use the search bar and the list of objects in the Objects panel to find and include objects in your perspective. Select any object to include it.

    • Click on any included object type to see its adjacent object types and continue building out your perspective.

  8. If you need to remove an object type that you’ve included in the perspective, select it to bring up its details panel. Click the Exclude button at the end of the panel, or select Exclude from the context menu (the three dots). Then confirm in the pop-up that you do want to exclude the object type.

    • When you exclude an object, any embedded objects related to it are removed as well.

    • If the object is the lead object for any event logs, they are removed, and if it’s included in any other event logs, you’ll need to update them.

  9. When your perspective contains all the objects you want, check that you’ve included the right object to object relationships between them. If you want to see all the available relationships for all the object types included in your perspective, toggle the “Show all relationships” slider on.

    If you’ve created a cycle, the perspective builder highlights it. You can break the cycle by removing at least one of the relationships in the cycle, and embedding the object type if you do need it. In the perspective graph, embedded objects are connected by a relationship line with no tag.

    Click the tag on any relationship line to switch between including and ignoring it. You can also remove an included relationship by selecting Remove Relationship in the object details panel. You can only include one relationship between a pair of object types - if there are other relevant relationships between them, you’ll need to embed the target object type for those.

    Tip

    All of the objects in your perspective must be connected - you must be able to draw a path between any two objects using the included relationships. You can add disconnected objects while you’re editing a perspective, but you won’t be able to save the perspective until you’ve linked them all in. The exception is the CurrencyConversion and QuantityConversion helper objects, and the master data object MaterialMasterPlant, which can be in a perspective without any relationships.

  10. Embed any objects that you want to use to provide further context for other objects, or need to embed to break a cycle. It’s fine to include an object type more than once in a perspective, as the original object and multiple embedded copies.

    Tip

    For a two-way relationship, you can choose which of the two objects to embed. For a one-way relationship, you can embed the object that doesn’t know about the relationship, but not the one that does. So you’ll need to select the object that does know about the relationship. For example, if you’ve defined a relationship from object A to object B, but not from object B to object A, you can embed object B from object A, but you can’t embed object A from object B.

    To embed an object:

    • Select the object you want to embed another object in.

    • Click Embedded objects to see the list of objects that are already embedded as copies in this object type.

    • Click Add to embed a new copy of an object, and choose the one you want to embed from the list.

    • If you want to reverse the embedding, click Remove Relationship.

    The embedded copy of an object type is linked to the original object type, so it’ll be updated if that is. However, it isn’t shown in the list of object types for the perspective, and you can’t include any of its other relationships or create an event log for it. It’ll also be removed if you remove the connected object type from the perspective.

  11. When you’ve included or embedded all the object types and relationships that you want in the perspective, set up any custom event logs that you want to create. Celonis automatically generates an event log for each object in your perspective, but you can set up others if you want to include further events that are indirectly connected to the lead object, through another path of object to object relationships. For each event log that you want to set up:

    1. Select Event logs.

    2. Click Add event log.

    3. Name the event log. You can’t use spaces and special characters.

    4. Select the lead object type that the events happen to. This object is the Case Key.

    5. Select the events that are relevant for the process you are tracing.

    6. Check the box for Set as default event log if this is the default case for the perspective.

    7. Click Save.

    Tip

    You can edit or delete an event log from the context menu (the three vertical dots) next to the event log’s name.

  12. When you've completed your perspective, select Save to save your work and exit the perspective builder.

  13. Your new perspective appears in the list of perspectives in the Perspectives view. If you need to make any further changes to it, select its name and click Edit.

  14. Select Publish > Publish to development to synchronize your changes to the development environment.

As with the perspectives for the Celonis processes, your custom perspective is published in the OCPM Data Pool in the Data Models section. Load your built objects and events into the perspective, then use it in your custom analysis. Loading and using perspectives tells you how to do this.

You can create a different event log or change your standard event logs on the fly using the PQL function CREATE_EVENTLOG. It’s better to use event logs that you’ve created in the perspective builder, because they’ll perform better and keep your analyses consistent, but you can use the PQL function if you aren’t able to go back and edit the perspective. See CREATE_EVENTLOG for the function documentation and examples.