From 5186cd2cac6e172a793a3767be2f5b4542626f85 Mon Sep 17 00:00:00 2001 From: Joaquin Ossa Date: Mon, 27 Jan 2025 12:40:52 +0100 Subject: [PATCH 1/2] Renamed Onboarding MRR per New Account --- models/intermediate/cross/int_mtd_aggregated_metrics.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/intermediate/cross/int_mtd_aggregated_metrics.sql b/models/intermediate/cross/int_mtd_aggregated_metrics.sql index 3fbc1d4..faae9a6 100644 --- a/models/intermediate/cross/int_mtd_aggregated_metrics.sql +++ b/models/intermediate/cross/int_mtd_aggregated_metrics.sql @@ -307,7 +307,7 @@ }, { "order_by": 203, - "metric": "Expected Onboarding MRR", + "metric": "Expected Onboarding MRR per New Account", "value": "expected_mrr", "previous_year_value": "previous_year_expected_mrr", "relative_increment": "relative_increment_expected_mrr", From d7f454b32673dcffd902e009c7ac7d6c96717538 Mon Sep 17 00:00:00 2001 From: Joaquin Ossa Date: Mon, 27 Jan 2025 14:55:53 +0100 Subject: [PATCH 2/2] Removed deal lifecycle First-Booked --- .../kpis/int_kpis__lifecycle_daily_deal.sql | 16 +++------------- models/intermediate/kpis/schema.yml | 8 +++----- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/models/intermediate/kpis/int_kpis__lifecycle_daily_deal.sql b/models/intermediate/kpis/int_kpis__lifecycle_daily_deal.sql index a3bfafb..70f700f 100644 --- a/models/intermediate/kpis/int_kpis__lifecycle_daily_deal.sql +++ b/models/intermediate/kpis/int_kpis__lifecycle_daily_deal.sql @@ -142,11 +142,10 @@ select second_to_last_time_booked_date_utc, cancellation_date_utc, case - -- 01-New: The deal has been created this month and has not had any booking. + -- 01-New: The deal has been created this month. -- Additionally, the deal has not been offboarded in hubspot. when - not deal_has_at_least_one_booking - and deal_was_created_this_month + deal_was_created_this_month and not deal_has_been_offboarded then '01-New' -- 02-Never Booked: The deal has been created before this month and has not @@ -156,19 +155,12 @@ select and not deal_was_created_this_month and not deal_has_been_offboarded then '02-Never Booked' - -- 03-First Time Booked: The deal has been booked for the first time and it - -- has been created this month. Additionally, the deal has not been offboarded - -- in hubspot. - when - deal_has_first_booking - and has_been_booked_within_current_month - and not deal_has_been_offboarded - then '03-First Time Booked' -- 04-Active: The deal has had at least 1 booking in its history and it's -- been less than 12 months since the last booking and has not been offboarded -- in hubspot and is not reactivated and is not FTB when deal_has_at_least_one_booking + and not deal_was_created_this_month and has_been_booked_within_last_12_months and not deal_has_been_offboarded -- not reactivated @@ -176,8 +168,6 @@ select had_previous_booking_more_than_12_months_before_the_last and has_been_booked_within_current_month ) - -- not FTB - and not (deal_has_first_booking and has_been_booked_within_current_month) then '04-Active' -- 05-Churning: The deal has been offboarded this month. Alternatively, The -- deal has been booked at least once and it's been 12 months since the last diff --git a/models/intermediate/kpis/schema.yml b/models/intermediate/kpis/schema.yml index 60e0dc6..bac9776 100644 --- a/models/intermediate/kpis/schema.yml +++ b/models/intermediate/kpis/schema.yml @@ -309,10 +309,9 @@ models: deal regarding its activity. This information is encapsulated in the following columns: deal_lifecycle_state: contains one of the following states - - 01-New: Deals that have been created in the current month, without bookings, that are not offboarded. + - 01-New: Deals that have been created in the current month, that are not offboarded. - 02-Never Booked: Deals that have been created before the current month, without bookings, that are not offboarded. - - 03-First Time Booked: Deals that have been booked for the first time in the current month, that are not offboarded. - - 04-Active: Deals that have booking activity in the past 12 months (that are not FTB nor reactivated), that are not offboarded. + - 04-Active: Deals that have booking activity in the past 12 months (not reactivated), that are not offboarded. - 05-Churning: Either Deals that are offboarded in that month or Deals that are becoming inactive because of lack of bookings in the past 12 months - 06-Inactive: Either Deals that have been previously offboarded or Deals that have not had a booking for more than 12 months. - 07-Reactivated: Deals that have had a booking in the current month that were inactive or churning before, that are not offboarded. @@ -387,7 +386,7 @@ models: data_type: character varying description: | Contains the lifecycle state of a deal. The accepted values are: - 01-New, 02-Never Booked, 03-First Time Booked, 04-Active, 05-Churning, 06-Inactive, + 01-New, 02-Never Booked, 04-Active, 05-Churning, 06-Inactive, 07-Reactivated. Failing to implement the logic will result in alert. data_tests: - not_null @@ -395,7 +394,6 @@ models: values: - 01-New - 02-Never Booked - - 03-First Time Booked - 04-Active - 05-Churning - 06-Inactive