Provides methods for accessing and manipulating data series records and KPIs


Properties

Name Returns Notes Example
allSeries List

Methods

Name Returns Notes Example
findParticipants ( sds, curUser, session ) List return the appropriate entity given the series and user, or null if there is none
findEntitiesWithUnprocessedRecs ( ) List Returns a list of BaseEntity (ie profile or org) IDs for entities who have at least one unprocessed sales record in any series
countPointsAllocationsWithErrors ( ) long Return how many PointsAllocation records have errors. Not date sensitive
findPointsAllocationsWithErrors ( searchProperties ) List
dataSeriesExtraFields ( sds ) List
resetPointsAllocations ( rec ) void
resetPointsAllocation ( pa, deleteSales ) void
processPointsAllocation ( series, progressCallback ) void
processPointsAllocation ( pas, records, progressCallback, processed ) void
testPointsAllocation ( pas, r ) PointsAllocationResult
testPointsAllocation ( pas, r, logs ) PointsAllocationResult
createPointsAllocationSource ( name, title, series, reward ) void
duplicatePointsAllocationSource ( name, title, series, fromPAS ) void
calculateAllocationPoints ( pas, r ) PointsAllocationResult
isAllocationPointsIncluded ( pas, r ) boolean
findMatchingSources ( series, r ) List
sum ( series, attributedTo, startDate, endDate ) BigDecimal
average ( series, attributedTo, startDate, endDate ) BigDecimal
count ( series, attributedTo, startDate, endDate ) long
minimum ( series, attributedTo, startDate, endDate ) BigDecimal
maximum ( series, attributedTo, startDate, endDate ) BigDecimal
createSeries ( name, title, salesByGroup ) SalesDataSeries
createSeries ( name, title, salesByGroup, website, defaultAgg, autoCalculation ) SalesDataSeries
findAggregationType ( aggregationType ) AggregationType
findSeriesByName ( name ) SalesDataSeries Alias for dataSeries()
dataSeries ( name ) SalesDataSeries
isOrgSaleType ( series ) boolean
findRecord ( id ) SalesDataRecord
findRecords ( series, from, to, orderByField, asc ) List
findRecords ( series, baseEntity, from, to ) List
findRecords ( series, baseEntities, from, to, orderByField, asc ) List
sumRecords ( series, baseEntity, from, to ) BigDecimal
averageRecords ( series, baseEntity, from, to ) BigDecimal
countRecords ( series, baseEntity, from, to ) long
findEntityForSeries ( series, user ) BaseEntity Calls findEntitiesForSeries and if only one match returns it. If there are multiple entities (ie the user is assoicated with multiple orgs for the series) then tries to match to QueryManager.getCurrentTeamOrg, and returns that Otherwise defaults to returning the first
findEntitiesForSeries ( series, user ) List
toRecordBeans ( recs ) List
insertDataPoint ( dp ) SalesDataRecord Use this with newDataPoint()
salesDataRecordUpdated ( sdr ) void Call this if you've updated a sales record to update the ES index
deleteRecord ( sdr ) void Delete a record and fire the event
findDataRecords ( series, attributedTo, from, to, fields ) List
findDataPoint ( series, attributedTo, from, to, fields ) SalesDataRecord Finds the first (date-wise) record matching the given criteria
findKpi ( seriesName, kpiName ) KPI
findById ( id ) SalesDataSeries
findByName ( name ) SalesDataSeries Alias for dataSeries(s)
kpiLeaderboard ( kpi, period ) KpiLeaderBoard
kpiLeaderboard ( kpi, period ) KpiLeaderBoard
To get full access to the Kademi Hub existing customers can login here, or new customers can register here.