API for generating DWH cubes (#643922)
The ConSol CM API has been extended by methods which allow to create, update and delete cubes on the DWH database using task scripts. The created cube contains the following information:
- Basic ticket data (ID, name, subject, queue, scope, creation date, close date)
- Assignee (first name, last name, login)
- Ticket fields which are annotated as reportable, except for lists and structs
- Main contact, this can be either a person or a company (ID and customer group)
- Company of the main contact (ID)
Optionally, the cube can be configured to contain:
- Contact fields of the main contact which are annotated as reportable, except for lists and structs
- Contact fields of the main contact’s company which are annotated as reportable, except for lists and structs
The IDs used in the cube are the IDs from CMRF, not the IDs which the objects have in ConSol CM.
The following settings can be made for the cube:
- Name:
The name of the cube, i.e. the name of the view in the DWH database. - Queues:
One or several queues whose tickets should be included in the cube. - Language:
Language which should be used for the data fields and the enum values. - Contact fields:
Whether the contact data fields should be included in the cube. - Company fields:
Whether the data fields of the contact’s company should be included in the cube.
Several new labels have been added to the Labels section of the Web Admin Suite / Admin Tool to manage the terms used for column names:
|
Label |
Default English |
Default German |
Usage |
|---|---|---|---|
|
cmrf.cube.ticket.main |
Case |
Vorgang |
Columns for basic ticket data and ticket fields |
|
cmrf.cube.queue.main |
Process |
Prozess |
Columns for the technical and localized queue name |
|
cmrf.cube.scope.main |
Scope |
Bereich |
Columns for the technical and localized scope name |
|
cmrf.cube.engineer.main |
Assignee |
Bearbeiter |
Columns for the data of the assigned user |
|
cmrf.cube.maincontact.main |
Contact |
Kontakt |
Columns for the contact ID and contact fields |
|
cmrf.cube.company.main |
Company |
Firma |
Columns for the company ID and company fields |
|
cmrf.cube.customergroup.main |
Customer group |
Kundengruppe |
Columns for the technical and localized customer group name |
The classes DwhCubeService and DwhCube have been added to manage the cubes. The following example shows a task script to create a cube.
def onInitialize(taskDescriptor) {}
def onExecute(taskDescriptor) {
DwhCube cube = new DwhCube()
cube.setViewName("cube_all")
cube.setQueues(queueService.getAll())
cube.setContactCustomFields(true)
cube.setCompanyCustomFields(true)
cube.setLocale(Locale.GERMAN)
dwhCubeService.create(cube)
}
def onError(taskDescriptor) {}
def onCancel(taskDescriptor) {}
The cube must be updated using the dwhCubeService.update(cube) method if there are changes to reportable annotations or localized labels of data fields / enum values. Otherwise, these changes are not reflected in the cube.
It is necessary to prepare the DWH database to use cubes. Please contact the ConSol CM support who will provide you with an update script for your database system, which you need to execute on the DWH database.