Create a new open bi entity to store custom data
This blog post is a tutorial on how to enhance open bi with your own Custom Entities. This is useful whenever you want to store, process and present custom data in your project.
Business Use Case
The function will be explained using the following example requirement:
As bi excellence we want to create our own custom-tailored CRM system. For this, we need an entity named “Customer”. The customer is not only supposed to have a name, but also information on the website, contact person, status and quotes, which we have sent to the customer.
Complex entities such as the “Customer” can be defined using the Base Entity user interface.
Add a Custom Entity
To add a custom entity, open the Base Entities in the open bi Configurator. Here, all Custom Entities, which have already been created on the open bi instance, are shown:
To create a new entity, click on the + icon. Enter a Name and a Description for the entity. We recommend to enter also the ID, as it will be used to create the database table.
After having pressed Save, the name of the Table is shown on the UI:
Add fields to the entity
So far only some technical fields (such as Creator and Changed date) are created for the entity. You can now switch to the Assigments tab. Here you assign additional fields, i.e. Table Attributes, to the entity:
You can click on the pencil icon to select from already existing Table Attributes:
For our example, I have found “Project” and “Website”, which I can reuse for the new entity. I accept the selection and save. Now the selected fields are dynamically added to the database table of the Custom Entity:
Create new fields
The Table Attributes selection only shows existing fields. For our project, though, the Customer entity is also required to store the "Quotes" that have been sent to the customer. As we could not find an existing Table Attribute named "Quote", nor a similar entity with the fields that we need, we now have to create it.
Table Attributes for Custom Entities are collected in Base entity Entities (SHOP_PRODUCT). We select it and double click:
The upcoming list shows all Table Attributes that have been created for Custom Entities so far. For example we find “Website” here, which we have already added to the Customer Entity:
We now press the + icon to create a new Table Attribute named “Quote”. As Type we can select simple data types such as a String. But we can also reference existing (Custom) Entities such as User, Role or the already existing “Angebot”. The latter has a German name, but on the other hand it already provides all fields that we need for the quote.
Our new Table Attribute “Quote” is now ready to be Saved:
We also double check the field Assignments of the existing “Angebot” entity to make sure it really fits all our requirements:
The new Table Attribute can now be selected in the maintenance view of the Customer Entity, as we already did it for Project and Website earlier.
Populate the data
The data of the entity can easily be populated by a flatfile upload or using the open bi API.