Plentymarkets interface documentation
KeyFigure
Contracts
KeyFigureResultRepositoryContract
This interface allows you to search for key figures results.
Namespace
Plenty\Modules\BI\KeyFigure\Contracts
Methods
public searchKeyFigureResults($searchRequests):Plenty\Modules\BI\KeyFigure\Models\KeyFigureResultSearchResponse
Return type: KeyFigureResultSearchResponse
Search for key figure calculation results
Name |
Type |
Description |
|
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
Name | Type | Description |
---|---|---|
id |
Id of this configuration |
|
hash |
Hash value to check for updates and avoid duplicate key figures with the same filters |
|
plentyId |
The plentymarkets system id |
|
plentyIdHash |
The plentymarkets system id hash |
|
keyFigure |
Key figure identifier |
|
keyFigureCaption |
Key figure caption |
|
keyFigureName |
User defined name |
|
filter |
Filter for calculating this key figure |
|
targets |
Contains the target figures |
|
meta |
Additional data |
|
spreadSheetExport |
Configuration data for the export of key figure results in a spread sheet document |
|
direct |
This key figure triggers a direct calculation without saving the result |
|
freeOfCharge |
Is this key figure free of charge |
|
isGlobal |
||
updatedAt |
Time of last change |
|
createdAt |
Time of creation |
|
externalId |
Identifier to assign the model |
|
dimensions |
List of existing dimensions |
|
dimensionValues |
List of dimension values |
|
category |
The translated category text of the keyfigure |
|
aggregateFunctions |
List of supported SQL aggregate functions |
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
Name | Type | Description |
---|---|---|
dataFilters |
Filters in notation ['filterName' ⇒ ['operator' ⇒ 'eq', 'value' ⇒ 123]] |
|
calculation |
Selected calculation method |
|
dimension |
Data group to group the result |
|
customUnit |
Custom result unit |
Methods
public toArray()
Returns this model as an array.
KeyFigureMeta
The key figure meta holds additional data.
Namespace
Plenty\Modules\BI\KeyFigure\Models
Name | Type | Description |
---|---|---|
comment |
User comment |
|
creatorUserId |
Id of the user who created this key figure |
|
creatorRealName |
Real name of the user who created this key figure |
|
isLimitEditing |
If true, then the key figure may only be edited by the creator |
|
numberFormatLang |
Language which determines the formatting of the numbers |
|
formatResult |
Format calculation result in SQL syntax |
Methods
public toArray()
Returns this model as an array.
KeyFigureResult
Represents a key figure result
Namespace
Plenty\Modules\BI\KeyFigure\Models
Name | Type | Description |
---|---|---|
id |
Primary key |
|
plentyIdHash |
System ID hash |
|
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. |
|
scaleBasis |
Time reference value of the key figure result. |
|
dimension |
The name of the dimension. |
|
interval |
Calculation interval. |
|
primaryResult |
The actual calculation result of the primary result data field. |
|
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. |
|
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
Name | Type | Description |
---|---|---|
id |
The result ID |
|
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. |
|
scaleBasisInt |
Time reference value not formatted. |
|
dimension |
The name of the dimension. |
|
primaryResult |
The actual calculation result of the primary result data field. |
|
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. |
|
resultUnit |
Unit of the primary result. |
|
target |
Key figure target figure. |
|
keyFigureName |
Key figure name. |
|
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
Name | Type | Description |
---|---|---|
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
Name | Type | Description |
---|---|---|
keyFigureResults |
Key figure result list |
|
interval |
Calculation interval. |
|
searchId |
Identification string to assign the result |
|
keyFigure |
Key figure identifier |
|
error |
Error occurred |
|
query |
Query for debugging |
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
Name | Type | Description |
---|---|---|
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. |
|
interval |
Time interval in which the result was calculated: day, week, month, quarter, year. |
|
dimension |
This field will be removed until 11.2020 |
|
dimensions |
Filter that restricts the search result to key figure results of one data group. The dimension must be specified. |
|
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. |
|
resultId |
Return ID of key figure result |
|
resultUnit |
Return unit of the primary result. |
|
target |
Return key figure target figure. |
|
groupByDimension |
Groups the results by dimension |
|
aggregateFunction |
Define aggregate (group) function that will operate on key figure results. Default function: sum. Allowed values: sum, avg, count, max, min |
|
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. |
|
page |
Number of the requested page, default value: 1 |
|
searchId |
Identification string to assign the result |
|
calculatedAt |
Filter that restricts the search result to key figure results which have been calculated as of this date (format: YYYY-MM-DD HH:II:SS) |
|
sortBy |
Sort the results options. |
|
displayZeroPrimaryValue |
Display zero results on the UI |
Methods
public toArray()
Returns this model as an array.
KeyFigureSearchRequests
The model represent several key figure search requests.
Namespace
Plenty\Modules\BI\KeyFigure\Models
Name | Type | Description |
---|---|---|
globalDataFilters |
||
searchRequests |
The list of key figure search requests |
|
debug |
Methods
public toArray()
Returns this model as an array.
KeyFigureSpreadSheetExport
The key figure spread sheet export keeps configuration data for the export of key figure results in a spread sheet document.
Namespace
Plenty\Modules\BI\KeyFigure\Models
Name | Type | Description |
---|---|---|
spreadSheetURL |
URL of the spread sheet document |
|
exportMethod |
Defines how the exported data is to be inserted in the document. Possible values: append, upsert. |
|
timeInterval |
Time interval in which the result data are to be aggregated. Possible values: day, week, month, quarter, year |
|
exportColumns |
List of column names to be exported |
|
userId |
Id of the user who created this spreadsheet configuration |
|
lang |
The language of the user |
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
Name | Type | Description |
---|---|---|
d1 |
Target value for Monday |
|
d2 |
Target value for Tuesday |
|
d3 |
Target value for Wednesday |
|
d4 |
Target value for Thursday |
|
d5 |
Target value for Friday |
|
d6 |
Target value for Saturday |
|
d7 |
Target value for Sunday |
|
w |
Target value for weeks |
|
m1 |
Target value for January |
|
m2 |
Target value for February |
|
m3 |
Target value for March |
|
m4 |
Target value for April |
|
m5 |
Target value for May |
|
m6 |
Target value for June |
|
m7 |
Target value for July |
|
m8 |
Target value for August |
|
m9 |
Target value for September |
|
m10 |
Target value for October |
|
m11 |
Target value for November |
|
m12 |
Target value for December |
|
q1 |
Target value for first quarter |
|
q2 |
Target value for second quarter |
|
q3 |
Target value for third quarter |
|
q4 |
Target value for fourth quarter |
|
yl |
Target value for last year |
|
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
Name | Type | Description |
---|---|---|
keyFigureName |
User defined name |
|
keyFigure |
Key figure identifier |
|
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($dataName, $createdAtTimestamp, $processStatus, $itemsPerPage = 20, $sortOrder = "asc", $page = 1):Plenty\Modules\BI\RawData\Models\RawDataSearchResult
Return type: RawDataSearchResult
Get list of raw data. Valid filter combinations: (dataName), (dataName & processStatus), (createdAtTimestamp)
Name |
Type |
Description |
|
Filter that restricts the search result to raw data files. |
|
|
Timestamp from when daily generated raw data are to be filtered. The maximum distance may not exceed one year. |
|
|
Process status after which filtering is to take place |
|
|
The number of raw data files to be returned. The default number of files is 20 and the maximum is 100. |
|
|
Defines the sort order, possible values are: asc, desc. With simultaneous filtering to dataName, only the current result is sorted. |
|
|
public getRawDataFile($path):void
Get a raw data file from the storage, the storage path of the file must be specified.
Name |
Type |
Description |
|
The raw data file path |
public deleteRawData($dataName, $primaryIds):void
Name |
Type |
Description |
|
||
|
public getRawDataCreatorModels():array
Get list of all raw data creators
public getRawDataConfigs():Plenty\Modules\BI\RawData\Models\RawDataConfigs
Return type: RawDataConfigs
Returns list of all saved configurations
public updateRawDataConfigs($data):Plenty\Modules\BI\RawData\Models\RawDataConfigs
Return type: RawDataConfigs
Resets all saved raw data configurations with given data
Name |
Type |
Description |
|
The configs data |
Models
RawDataConfig
The BI raw data config model
Namespace
Plenty\Modules\BI\RawData\Models
Name | Type | Description |
---|---|---|
id |
The raw data config id |
|
plentyIdHash |
The plentymarkets system id hash |
|
dataName |
The raw data name |
|
active |
If active, raw data is generated daily |
|
forcedInactive |
If active, raw data is not 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
Name | Type | Description |
---|---|---|
plentyIdHash |
The plentymarkets system id hash |
|
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
Name | Type | Description |
---|---|---|
dataName |
Exclusive identifier for this raw data. |
|
fileFormat |
File format |
|
limitPage |
Number of data rows to be queried maximum per request. |
|
limitDay |
Number of data rows to be queried maximum per day. |
|
earliestPossibleDataDate |
Earliest possible date from which data should be requested. |
|
filterType |
Defines how this raw data is filtered. |
|
dataUpdatedAtColumnName |
Name of the column that contains the date of the last change to a data row. |
|
defaultActive |
If true, then these raw data are collected independently of the user configuration. |
|
interval |
Interval in which this creator runs through |
|
storableFromPlan |
From which plan is this format created and provided. |
|
processableFromPlan |
From which plan will this data be transferred to plentyBI data warehouse database. |
Methods
public toArray()
Returns this model as an array.
RawDataFile
The BI raw model
Namespace
Plenty\Modules\BI\RawData\Models
Name | Type | Description |
---|---|---|
id |
The raw data id |
|
plentyIdHash |
The plentymarkets system id hash |
|
dataName |
The raw data name |
|
processStatus |
Status of data warehouse processing |
|
shouldProcess |
Specifies whether this file should be transferred to the data warehouse |
|
cloudId |
ID of source cloud |
|
path |
Storage path to raw data file |
|
createdAt |
Creation time of this raw data file |
|
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
Name | Type | Description |
---|---|---|
after |
The last evaluated key as base64, provide that as the starting point for the next query (pagination). |
|
searchResult |
The raw data search result |
Methods
public toArray()
Returns this model as an array.