Lifecycle Reporting

Retrieving lifecycle performance reports

class LifecycleReportingMixin

This class defines all functions related to lifecycle reporting.

class LifecycleReportingAggregation(value)

This enumeration defines all possible lifecycle report aggregation options.

DAILY

Aggregate daily

WEEKLY

Aggregate weekly

MONTHLY

Aggregate monthly

QUARTERLY

Aggregate quarterly

YEARLY

Aggregate yearly

get_lifecycle_performance(lifecycle_id, start_date, end_date)

Gets the lifecycle performance for the given lifecycle ID, for the given start- (inclusive) and end date (inclusive) and returns it as a lifecycle performance object.

Parameters
  • lifecycle_id (str) – The ID of the lifecycle

  • start_date (date) – The start date of the report (inclusive)

  • end_date (date) – The end date of the report (inclusive)

Raises

HTTPError: Request fails

Returns

A lifecycle performance object

Return type

LifecyclePerformance

Usage:
>>> import blueconic
>>> from datetime import date, timedelta
>>> bc = blueconic.Client()
>>> start = date.today() - timedelta(days=10)
>>> now = date.today()
>>> performance = bc.get_lifecycle_performance('lifecycle_id', start, now)
>>> print(performance.statistics.start_profiles)
>>> print(performance.lifecycle)
>>>
>>> for stage_perf in performance.stages:
>>>     print(stage_perf.stage)
>>>     print(stage_perf.statistics.end_profiles)
>>>     print(stage_perf.transitions)
get_lifecycle_performance_over_time(lifecycle_id, start_date, end_date, aggregation)

Gets the lifecycle performance for the given lifecycle ID, for the given start- (inclusive) and end date (inclusive) and aggregation and returns it as a lifecycle performance over time object. The maximum allowed interval between the end_date and the start_date is 20 x 365 days (approximately 20 years).

Parameters
  • lifecycle_id (str) – The ID of the lifecycle

  • start_date (date) – The start date of the report (inclusive)

  • end_date (date) – The end date of the report (inclusive)

  • aggregation (LifecycleReportingAggregation) – the aggegration for this given time period

Raises

HTTPError: Request fails

Returns

A lifecycle performance over time object

Return type

LifecyclePerformanceOverTime

Usage:
>>> import blueconic
>>> from datetime import date, timedelta
>>> bc = blueconic.Client()
>>>
>>> start = date.today() - timedelta(days=4000)
>>> now = date.today()
>>> perfOverTime = bc.get_lifecycle_performance_over_time("lifecycle_id", start, now, bc.LifecycleReportingAggregation.YEARLY)
>>>
>>> for result in perfOverTime.historical_results:
>>>     print(result.start_date, result.end_date, len(result.performance.stages))

Using lifecycle performance reports

class LifecyclePerformance

This class represents a Lifecycle performance object.

property lifecycle
Returns

Lifecycle for the performance object

Return type

Optional[Lifecycle]

property stages
Returns

The stage performances

Return type

Sequence[StagePerformance]

property statistics
Returns

Statistics for the performance object

Return type

LifecycleStatistics

class LifecycleStatistics

This class represents a Lifecycle statistics object.

property completion_rate
Returns

The number of transitions to completion/(profiles in lifecycle at start date + transitions into the lifecycle in time period). For stages, it’s the number of profile in the stage + transitions into the stage in time period.

Return type

float

property completions
Returns

The number of transitions to completion

Return type

int

property dropout_rate
Returns

The number of transitions out of the lifecycle/(profiles in lifecycle at start date + transitions into the lifecycle in time period). For stages, it’s the number of profile in the stage + transitions into the stage in time period.

Return type

float

property dropouts
Returns

The number of transitions out of the lifecycle

Return type

int

property end_profiles
Returns

The number of profiles in a stage or lifecycle at the end date (stalled)

Return type

int

property lifecycle_entries
Returns

The number of profiles that entered the lifecycle. It is the aggregation of entries for all stages. For stages, it represents all transitions into this stage from outside the lifecycle

Return type

int

property start_profiles
Returns

The number of profiles in a stage or lifecycle at the start date

Return type

int

class StagePerformance

Data object for holding information about the performance of a stage.

property stage
Returns

The stage

Return type

Stage

property statistics
Returns

The stage statistics

Return type

StageStatistics

property transitions
Returns

The stage statistics

Return type

Sequence[StageTransition]

class StageStatistics

This class represents a Stage statistics object.

property completion_rate
Returns

The number of transitions to completion/(profiles in lifecycle at start date + transitions into the lifecycle in time period). For stages, it’s the number of profile in the stage + transitions into the stage in time period.

Return type

float

property completions
Returns

The number of transitions to completion

Return type

int

property drop_rate
Returns

The number of transitions to a lower stage or out of the lifecycle/(profiles in stage at start date + transitions into the stage in time period)

Return type

int

property dropout_rate
Returns

The number of transitions out of the lifecycle/(profiles in lifecycle at start date + transitions into the lifecycle in time period). For stages, it’s the number of profile in the stage + transitions into the stage in time period.

Return type

float

property dropouts
Returns

The number of transitions out of the lifecycle

Return type

int

property drops
Returns

The number of transitions to a lower stage or out of the lifecycle

Return type

int

property end_profiles
Returns

The number of profiles in a stage or lifecycle at the end date (stalled)

Return type

int

property lifecycle_completion_rate
Returns

The number of transitions to completion for this stage/(profiles in lifecycle at start date + transitions into the lifecycle in time period).

Return type

float

property lifecycle_dropout_rate
Returns

The number of transitions out of the lifecycle from this stage/(profiles in lifecycle at start date + transitions into the lifecycle in time period).

Return type

float

property lifecycle_entries
Returns

The number of profiles that entered the lifecycle. It is the aggregation of entries for all stages. For stages, it represents all transitions into this stage from outside the lifecycle

Return type

int

property progression_rate
Returns

The number of transitions to a later stage or completion group/(profiles in stage at start date + transitions into the stage in time period)

Return type

int

property progressions
Returns

The number of transitions to a later stage or to the completion group

Return type

int

property stage_entries
Returns

The number of profiles that entered the stage. This can be from outside the lifecycle, progressions or dropdowns

Return type

int

property start_profiles
Returns

The number of profiles in a stage or lifecycle at the start date

Return type

int

class StageTransition

Data object for stage transitions.

property count
Returns

The number of profiles that moved to the stage

Return type

int

property rate
Returns

Number of transitions compared to all profiles that entered before or during the given time period.

Return type

float

property to_stage
Returns

The target stage of the transition

Return type

Stage

property transition_type
Returns

The transition type

Return type

StageTransitionType

class StageTransitionType

This enumeration defines all possible transition types between stages.

PROGRESSION

A transition to a higher stage

DROP_DOWN

A transition to a lower stage

class LifecyclePerformanceOverTime

This class represents a Lifecycle performance over time object.

property historical_results
Returns

The performance during the aggregation period

Return type

Sequence[HistoricalResult]

property lifecycle
Returns

Lifecycle for the performance object

Return type

Lifecycle

class HistoricalResult

This class represents a Lifecycle historical result object.

property end_date
Returns

The end date of the time period (exclusive)

Return type

date

property performance
Returns

The lifecycle performances for this time period

Return type

LifecyclePerformance

property start_date
Returns

The start date of the time period (inclusive)

Return type

date