KeyFigure

Contracts

KeyFigureResultRepositoryContract

This interface allows you to search for key figures results.

Namespace

Plenty\Modules\BI\KeyFigure\Contracts

Methods

public searchKeyFigureResults(KeyFigureSearchRequests
 $searchRequests):KeyFigureResultSearchResponse

Search for key figure calculation results

Parameters
KeyFigureSearchRequests $searchRequests Several key figure search requests

Models

KeyFigureConfig

The key figure config model represents the configuration of a key figure.

Namespace

Plenty\Modules\BI\KeyFigure\Models

Properties

Type Name Description
string id Id of this configuration
string plentyIdHash The plentymarkets system id hash
string keyFigure Key figure identifier
string keyFigureCaption Key figure caption
string keyFigureName User defined name
KeyFigureFilter filter Filter for calculating this key figure
array targets Contains the target figures
KeyFigureMeta meta Additional data
string updatedAt Time of last change
string createdAt Time of creation
string externalId Identifier to assign the model
array dimensions List of existing dimensions
array dimensionValues List of dimension values

Methods

public toArray()

Returns this model as an array.

KeyFigureFilter

The key figure filter holds configured filters for a key figure calculation.

Namespace

Plenty\Modules\BI\KeyFigure\Models

Properties

Type Name Description
array dataFilters Filters in notation ['filterName' => ['operator' => 'eq', 'value' => 123]]
string calculation Selected calculation method
string dimension Data group to group the result

Methods

public toArray()

Returns this model as an array.

KeyFigureMeta

The key figure meta holds additional data.

Namespace

Plenty\Modules\BI\KeyFigure\Models

Properties

Type Name Description
string comment User comment
int creatorUserId Id of the user who created this key figure
string creatorRealName Real name of the user who created this key figure
bool isLimitEditing If true, then the key figure may only be edited by the creator

Methods

public toArray()

Returns this model as an array.

KeyFigureResult

Represents a key figure result

Namespace

Plenty\Modules\BI\KeyFigure\Models

Properties

Type Name Description
string id Primary key
string plentyIdHash System ID hash
string configId Id of the configuration of the key figure, followed by the calculation interval and The usage should be the exception, so this field usually resembles the content of idInterval.
string scaleBasis Time reference value of the key figure result.
string dimension The name of the dimension.
string interval Calculation interval.
float primaryResult The actual calculation result of the primary result data field.
string furtherResult If further results were calculated in addition to the primary result, these are included in this field as a JSON object. The fields are defined in the KeyFigure class.
string calculatedAt Date of calculation.

Methods

public toArray()

Returns this model as an array.

KeyFigureResultResponse

The model represent a key figure result in condensed form to the presentation.

Namespace

Plenty\Modules\BI\KeyFigure\Models

Properties

Type Name Description
string scaleBasis Time reference value of the key figure result. The structure of scaleBasis depends on the time interval of the key figure. At the interval day is the structure: YYYYMMDD. For the interval month: YYYYMMM. In the case of year: YYYYY.
string dimension The name of the dimension.
float primaryResult The actual calculation result of the primary result data field.
string furtherResult If further results were calculated in addition to the primary result, these are included in this field as a JSON object. The fields are defined in the KeyFigure class.
string resultUnit Unit of the primary result.
float target Key figure target figure.
string calculatedAt Date of calculation.

Methods

public toArray()

Returns this model as an array.

KeyFigureResultSearchResponse

The model represent search result of key figure result search.

Namespace

Plenty\Modules\BI\KeyFigure\Models

Properties

Type Name Description
array searchResultList The list of found key figure result search result

Methods

public toArray()

Returns this model as an array.

KeyFigureResultSearchResult

The key figure result search result model combine key figure information with key figure search result.

Namespace

Plenty\Modules\BI\KeyFigure\Models

Properties

Type Name Description
array keyFigureResults Key figure result list
string interval Calculation interval.
string searchId Identification string to assign the result
string keyFigure Key figure identifier
array error Error occurred

Methods

public toArray()

Returns this model as an array.

KeyFigureSearchRequest

The model holds filter information for a search query for key figures.

Namespace

Plenty\Modules\BI\KeyFigure\Models

Properties

Type Name Description
string configId Filter that restricts the search result to key figure results of key figure configuration id. The id of the key figure configuration is mandatory and must be specified, if no value is passed for id.
string interval Time interval in which the result was calculated: day, week, month, quarter, year.
string dimension This field will be removed until 11.2020
array dimensions Filter that restricts the search result to key figure results of one data group. The dimension must be specified.
string scaleBasis Filter restricts the list of results to items with a scale base time during the specified period. For the time interval day, a date or comma separated two dates (format: YYYYMMDD) can be specified. For the time interval week, several comma-separated days (YYYYMMDD) of different weeks can be specified. For the interval month, a comma separated list of months is expected e.g. 2020-01, 2020-02.
bool resultUnit Return unit of the primary result.
bool target Return key figure target figure.
bool groupByDimension Groups the results by dimension
string aggregateFunction Define aggregate (group) function that will operate on key figure results. Default function: sum. Allowed values: sum, avg, count, max, min
int itemsPerPage Limits the number of results listed per page to a specific number. The number of variations to be listed per page must be specified. The default number of results is 12 and the maximum is 100.
int page Number of the requested page, default value: 1
string scaleBasisSortOrder Sort the results using scaleBasis if a sort order has been defined, possible values are: asc, desc.
string primaryResultSortOrder Sort the results using primaryResult if a sort order has been defined, possible values are: asc, desc.
string searchId Identification string to assign the result

Methods

public toArray()

Returns this model as an array.

KeyFigureSearchRequests

The model represent several key figure search requests.

Namespace

Plenty\Modules\BI\KeyFigure\Models

Properties

Type Name Description
array searchRequests The list of key figure search requests

Methods

public toArray()

Returns this model as an array.

KeyFigureTarget

The key figure target day model contains the target figures for each weekday, week, month, quarter and year, which were stored for a key figure configuration

Namespace

Plenty\Modules\BI\KeyFigure\Models

Properties

Type Name Description
float d1 Target value for Monday
float d2 Target value for Tuesday
float d3 Target value for Wednesday
float d4 Target value for Thursday
float d5 Target value for Friday
float d6 Target value for Saturday
float d7 Target value for Sunday
float w Target value for weeks
float m1 Target value for January
float m2 Target value for February
float m3 Target value for March
float m4 Target value for April
float m5 Target value for May
float m6 Target value for June
float m7 Target value for July
float m8 Target value for August
float m9 Target value for September
float m10 Target value for October
float m11 Target value for November
float m12 Target value for December
float q1 Target value for first quarter
float q2 Target value for second quarter
float q3 Target value for third quarter
float q4 Target value for fourth quarter
float yl Target value for last year
float y Target value for this year

Methods

public toArray()

Returns this model as an array.

KeyFigureTemplate

The key figure template model contains preview data of a key figure template

Namespace

Plenty\Modules\BI\KeyFigure\Models

Properties

Type Name Description
string keyFigureName User defined name
string keyFigure Key figure identifier
string className Template class name

Methods

public toArray()

Returns this model as an array.

RawData

Contracts

RawDataRepositoryContract

This interface allows you to get a list of generated raw data files

Namespace

Plenty\Modules\BI\RawData\Contracts

Methods

public searchRawData(string $dataName, int $createdAtTimestamp, string $processStatus, int $itemsPerPage = 20, string $sortOrder = "asc", int $page = 1):RawDataSearchResult

Get list of raw data. Valid filter combinations: (dataName), (dataName & processStatus), (createdAtTimestamp)

Parameters
string $dataName Filter that restricts the search result to raw data files.
int $createdAtTimestamp Timestamp from when daily generated raw data are to be filtered. The maximum distance may not exceed one year.
string $processStatus Process status after which filtering is to take place
int $itemsPerPage The number of raw data files to be returned. The default number of files is 20 and the maximum is 100.
string $sortOrder Defines the sort order, possible values are: asc, desc. With simultaneous filtering to dataName, only the current result is sorted.
int $page
public getRawDataFile(string $path):void

Get a raw data file from the storage, the storage path of the file must be specified.

Parameters
string $path The raw data file path
public deleteRawData(string $dataName, array $primaryIds):void
Parameters
string $dataName
array $primaryIds
public getRawDataCreatorModels():array

Get list of all raw data creators

public getRawDataConfigs():RawDataConfigs

Returns list of all saved configurations

public updateRawDataConfigs(array $data):RawDataConfigs

Resets all saved raw data configurations with given data

Parameters
array $data The configs data

Models

RawDataConfig

The BI raw data config model

Namespace

Plenty\Modules\BI\RawData\Models

Properties

Type Name Description
string dataName The raw data name
int active If active, raw data is generated daily

Methods

public toArray()

Returns this model as an array.

RawDataConfigs

List of all saved raw data configurations

Namespace

Plenty\Modules\BI\RawData\Models

Properties

Type Name Description
string plentyIdHash The plentymarkets system id hash
array configs List of all saved configurations

Methods

public toArray()

Returns this model as an array.

RawDataCreator

The BI raw data creator model

Namespace

Plenty\Modules\BI\RawData\Models

Properties

Type Name Description
string dataName Exclusive identifier for this raw data.
string fileFormat File format
int limitPage Number of data rows to be queried maximum per request.
int limitDay Number of data rows to be queried maximum per day.
string earliestPossibleDataDate Earliest possible date from which data should be requested.
int deleteRawDataAfterDaysMinimum Minimum number of days after the generated raw data is deleted
int deleteRawDataAfterDaysMaximum Maximum number of days after the generated raw data is deleted
string filterType Defines how this raw data is filtered.
string dataUpdatedAtColumnName Name of the column that contains the date of the last change to a data row.
bool defaultActive If true, then these raw data are collected independently of the user configuration.
string interval Interval in which this creator runs through
bool shouldProcess Internal value, indicates whether this data should be transferred to the data warehouse database

Methods

public toArray()

Returns this model as an array.

RawDataFile

The BI raw model

Namespace

Plenty\Modules\BI\RawData\Models

Properties

Type Name Description
string id The raw data id
string plentyIdHash The plentymarkets system id hash
string dataName The raw data name
string processStatus Status of data warehouse processing
int shouldProcess Specifies whether this file should be transferred to the data warehouse
string path Storage path to raw data file
string createdAt Creation time of this raw data file
string dataCreatedAt Creation date of the data

Methods

public toArray()

Returns this model as an array.

RawDataSearchResult

The BI raw data search result model

Namespace

Plenty\Modules\BI\RawData\Models

Properties

Type Name Description
string after The last evaluated key as base64, provide that as the starting point for the next query (pagination).
array searchResult The raw data search result

Methods

public toArray()

Returns this model as an array.