Merged PR 4697: Churn update
# Description Added churn details from hubspot (free text detailing churn reason) # Checklist - [x] The edited models and dependants run properly with production data. - [x] The edited models are sufficiently documented. - [x] The edited models contain PK tests, and I've ran and passed them. - [ ] I have checked for DRY opportunities with other models and docs. - [ ] I've picked the right materialization for the affected models. # Other - [ ] Check if a full-refresh is required after this PR is merged. Churn update Related work items: #28501
This commit is contained in:
commit
8c97f03487
4 changed files with 18 additions and 0 deletions
|
|
@ -593,6 +593,7 @@ select
|
||||||
end as days_between_last_contacted_and_churn,
|
end as days_between_last_contacted_and_churn,
|
||||||
d.amount_times_contacted,
|
d.amount_times_contacted,
|
||||||
d.cancellation_category,
|
d.cancellation_category,
|
||||||
|
d.cancellation_details,
|
||||||
case
|
case
|
||||||
when mabd.deal_lifecycle_state = '{{churned_state}}' then true else false
|
when mabd.deal_lifecycle_state = '{{churned_state}}' then true else false
|
||||||
end as is_churning,
|
end as is_churning,
|
||||||
|
|
|
||||||
|
|
@ -1668,6 +1668,14 @@ models:
|
||||||
Number of times the deal was contacted according
|
Number of times the deal was contacted according
|
||||||
to Hubspot.
|
to Hubspot.
|
||||||
|
|
||||||
|
- name: cancellation_category
|
||||||
|
data_type: text
|
||||||
|
description: Categorization as to why they cancelled the account
|
||||||
|
|
||||||
|
- name: cancellation_details
|
||||||
|
data_type: text
|
||||||
|
description: Free text with additional comments on why they cancelled the account
|
||||||
|
|
||||||
- name: is_churning
|
- name: is_churning
|
||||||
data_type: boolean
|
data_type: boolean
|
||||||
description: |
|
description: |
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@ select
|
||||||
days_between_last_contacted_and_churn as days_between_last_contacted_and_churn,
|
days_between_last_contacted_and_churn as days_between_last_contacted_and_churn,
|
||||||
amount_times_contacted as amount_times_contacted,
|
amount_times_contacted as amount_times_contacted,
|
||||||
cancellation_category as cancellation_category,
|
cancellation_category as cancellation_category,
|
||||||
|
cancellation_details as cancellation_details,
|
||||||
is_churning as is_churning,
|
is_churning as is_churning,
|
||||||
churn_reason as churn_reason,
|
churn_reason as churn_reason,
|
||||||
created_bookings as created_bookings,
|
created_bookings as created_bookings,
|
||||||
|
|
|
||||||
|
|
@ -1644,6 +1644,14 @@ models:
|
||||||
Number of times the deal was contacted according
|
Number of times the deal was contacted according
|
||||||
to Hubspot.
|
to Hubspot.
|
||||||
|
|
||||||
|
- name: cancellation_category
|
||||||
|
data_type: text
|
||||||
|
description: Categorization as to why they cancelled the account
|
||||||
|
|
||||||
|
- name: cancellation_details
|
||||||
|
data_type: text
|
||||||
|
description: Free text with additional comments on why they cancelled the account
|
||||||
|
|
||||||
- name: is_churning
|
- name: is_churning
|
||||||
data_type: boolean
|
data_type: boolean
|
||||||
description: |
|
description: |
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue