Removed deal lifecycle First-Booked
This commit is contained in:
parent
5186cd2cac
commit
d7f454b326
2 changed files with 6 additions and 18 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue