Commit graph

1438 commits

Author SHA1 Message Date
Oriol Roqué Paniagua
9cbb748b0f Merged PR 5389: Adapt Test Account flag with Claim dedicated source
# Description

Applies the new dedicated source of truth of "is this account fake" based on Claims. This removes the previous logic.

In terms of differences, not much because:
1. New logic applied in the backend is pretty much the same as we had with a few improvements
2. This exclusion is only applied for New Dash. I checked the number of test accounts in New Dash and these are 2, the same ones in the new logic and for the old (currently in production). So no real impact.

Impact will come at the moment to start handling exclusions for KPIs, but this will done later on dedicated PRs to assess impacts properly.

# 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.
- [X] I have checked for DRY opportunities with other models and docs.
- [X] I've picked the right materialization for the affected models.

# Other

- [ ] Check if a full-refresh is required after this PR is merged.

Related work items: #27319
2025-06-04 12:58:40 +00:00
Joaquin
5fdb5ffcde id_deal unique test 2025-06-04 12:28:52 +02:00
Pablo Martin
8b8b8441d3 Merged PR 5365: New version of CIH users through activity
# Description

This PR adds a new version to `int_core__check_in_cover_users`. The new version respectes the public interface of V1, but changes the strategy to determine which users get included in the list. Instead of relying on their account configuration (v1), v2 simply looks at whether they had any VR created offering CIH in the past 30 days.

This approach changes the semantic of the model, but we deem the new one reasonable.

The motivation behind this change is to ensure this models (1) keeps working after the activation of the Guest Products FF and (2) stays simple. Trying to follow a strategy where we look at both old and new configs was deemed very complex and didn't add much value.

# 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.
- [X] I have checked for DRY opportunities with other models and docs.
- [X] I've picked the right materialization for the affected models.

# Other

- [ ] Check if a full-refresh is required after this PR is merged.

Related work items: #30165
2025-06-04 08:55:55 +00:00
Pablo Martin
a401153472 be more precise 2025-06-04 10:54:27 +02:00
Pablo Martin
0c11cfe739 removed unused upstream models 2025-06-04 10:53:24 +02:00
Pablo Martin
159813544f comment on why user and not host 2025-06-04 10:53:01 +02:00
Pablo Martin
54fca806b9 6 months, not one 2025-06-04 10:48:16 +02:00
Oriol Roqué Paniagua
8b8e4143ce Merged PR 5381: Removes multi-user test on New Dash onboarding
# Description

It doesn't look like the multi-user cases per deal are going to be fixed any time soon.
Also, this test was only covering it for newly onboarded deals, while we have more cases for migrated deals that this test was not covering.

# Checklist

- [X] dbt compiles

Related work items: #30479
2025-06-04 08:08:40 +00:00
Joaquin Ossa
536ab9b2a1 Merged PR 5364: Outstanding Payments
# Description

Adds a field that helps categorize whether we owe money to an account or they owe money to Truvi.
Outstanding Resolutions or Outstanding Invoices

The idea is to include this field as a filter in the Invoicing & Crediting report to help Finance and Resolutions in the payment and approval process.

# 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.

Outstanding Payments

Related work items: #30204
2025-06-03 12:53:59 +00:00
Joaquin
1b362024f1 addressed comments 2025-06-03 14:17:47 +02:00
Joaquin
d50442e887 New model for deals total due amount 2025-06-03 11:53:40 +02:00
Joaquin
2746977671 commit wip 2025-06-03 10:53:22 +02:00
Joaquin
f768be9ea5 commit wip 2025-06-03 09:31:56 +02:00
Oriol Roqué Paniagua
affeac612a Merged PR 5366: Adds Incident data to Booking Summary
# Description

This PR moves the categorisation of Bookings with Incidents from the flagging specific model to Booking Summary, effectively keeping this at Booking ID level.

This also handles the direct dependency with the flagging categorisation model.

I also improved the documentation and test coverage on the Booking Summary as it's becoming more and more central to many areas.

# 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.
- [X] I have checked for DRY opportunities with other models and docs.
- [X] I've picked the right materialization for the affected models.

# Other

- [ ] Check if a full-refresh is required after this PR is merged.

Related work items: #30676
2025-06-02 15:56:54 +00:00
Pablo Martin
92b144d78e Merged PR 5357: Adapt vr_check_in_cover model for Guest Products
# Description

This PR prepares the existing `int_core__vr_check_in_cover` model for the activation of the Guest Products feature flag.

It creates a second logic path which identifies VRs that have CIH in them ~~through product bundles~~ through looking at `stg_core__verification_request_to_guest_product `, and unions it with the old stuff.

The new CTE only gets called after the FF gets activated. This is defined in a var that we will need to adjust depending on when do we really activate the FF.

Note that these items are still pending:
- update the var to the right value once Lawrence pulls the trigger.
- clarify what the hell happens with CIH being "pushed" or not to ALL old dash hosts. This PR currently assumes this will NOT happen. If it will happen, we will need to change things.

# 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.
- [X] I have checked for DRY opportunities with other models and docs.
- [X] I've picked the right materialization for the affected models.

# Other

- [ ] Check if a full-refresh is required after this PR is merged.

Related work items: #30165
2025-06-02 14:22:58 +00:00
Pablo Martin
1a35839deb new version and docs 2025-06-02 16:02:33 +02:00
Joaquin
cf5eaac593 Removed total 2025-06-02 15:59:34 +02:00
Joaquin
0fdfe651a2 Outstanding Payments 2025-06-02 15:58:01 +02:00
Pablo Martin
c6a06b49e9 mention double logic in docs 2025-05-30 15:50:30 +02:00
Pablo Martin
7339cf4c87 change logic in new CTE to use new tables 2025-05-30 15:47:35 +02:00
Oriol Roqué Paniagua
d33e5ff2b2 Merged PR 5353: Switch int_core__booking_summary to int_booking_summary
# Description

This PR does the following:
* Moves `core/int_core__booking_summary` to `cross/int_core__booking_summary`
* Renames the model `cross/int_core__booking_summary` to `cross/int_booking_summary`
* Same for schema entry. In the new schema, I just added in the description how to retrieve exclusively New Dash Bookings for usability purposes.

Then, it adapts any dependency on `int_core__booking_summary` to `int_booking_summary`

No additional changes - inclusion of Resolution Incidents data will come later in a different PR.

# 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.
- [X] I have checked for DRY opportunities with other models and docs.
- [X] I've picked the right materialization for the affected models.

# Other

- [ ] Check if a full-refresh is required after this PR is merged.

Related work items: #30676
2025-05-30 12:51:10 +00:00
Oriol Roqué Paniagua
a9a1e68624 Merged PR 5333: Reporting version of Stay Disrupt Conversion Funnel
# Description

Reporting version of Stay Disrupt Conversion Funnel. It's just a copy from the intermediate model.

# 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.
- [X] I have checked for DRY opportunities with other models and docs.
- [X] I've picked the right materialization for the affected models.

# Other

- [ ] Check if a full-refresh is required after this PR is merged.

Related work items: #30277
2025-05-29 14:57:07 +00:00
Oriol Roqué Paniagua
5ddba42e12 Merged PR 5342: Booking Summary - add months
# Description

Adds the month equivalent for creation, check in and check out dates for Booking Summary, for reporting purposes

# 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.

Related work items: #30609
2025-05-28 12:37:43 +00:00
Pablo Martin
f1883aaa7a second cte, then we union 2025-05-27 15:03:48 +02:00
Pablo Martin
34985f3de1 wrap final select in cte 2025-05-27 15:01:47 +02:00
Pablo Martin
6a9787a85b change from model var to project var 2025-05-27 14:49:29 +02:00
Oriol Roqué Paniagua
06a4f679ea Merged PR 5322: First version of Stay Disrupt conversion funnel
# Description

First version of Stay Disrupt conversion funnel. It's a simple monthly compute of:
Active accounts -> Accounts that offered SD in GJ started in month -> Accounts that have had payments paid of SD in month
Total Guest Journeys Started -> GJ that offered SD in month-> Payments paid of SD in month

Some details:
* It also includes CIH, and data starts on 1st Jan 2025. This is to create report. This needs to be changed once the report is created.
* Note that Accounts that offered SD in GJ started in month and GJ that offered SD in month is equal to 0 as no data flows through the new flow. The rest has data.
* I consider all users, not only New Dash, knowing that I don't know if someone knows which users will have a certain Guest Product enabled.

Model is "agnostic" to the GP if we want, though the name still aims to be only for SD.

# 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.
- [X] I have checked for DRY opportunities with other models and docs.
- [X] I've picked the right materialization for the affected models. **View to start with**

# Other

- [ ] Check if a full-refresh is required after this PR is merged.

Related work items: #30277
2025-05-27 09:41:49 +00:00
Oriol Roqué Paniagua
9f7f92912f Merged PR 5311: Adds Confident Stay Revenue as a Main KPIs and Account Performance metric
# Description

Creates a new metric: Confident Stay Revenue.

This includes:
* Setting the computation in `int_mtd_vs_previous_year_metrics`
* Configuring the metric behavior in `int_mtd_aggregated_metrics`. It follows the same as CIH.
* Adding the metric in the completion test. I didn't add it in the outlier test in purpose as any new value would trigger the outlier since there's no history to compare against.

Few notes:
* I confirm it displays no value, as the product has not been launched.
* Note that the inclusion of Confident Stay in Guest Revenue was already handled in the previous PR.

Next steps to complete the ticket:
* Add in the Data Glossary of Main KPIs the definition of Confident Stay Revenue
* Add in the Data Glossary of Account Performance the definition of Confident Stay Revenue

# 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.
- [N/A] I have checked for DRY opportunities with other models and docs.
- [N/A] I've picked the right materialization for the affected models.

# Other

- [ ] Check if a full-refresh is required after this PR is merged.

Related work items: #30278
2025-05-26 09:22:15 +00:00
Oriol Roqué Paniagua
0e1741ad9d Merged PR 5285: Adds Stay Disrupt (Confident Stay) Fees in KPIs Guest Payments flow
# Description

Propagates Stay Disrupt Guest Product in KPIs flow, within Guest Payments. This is done by:
* Adding a new measure on `stay_disrupt_fees_in_gbp` in the daily model `int_kpis__metric_daily_guest_payments`
* Adding stay_disrupt_fees_in_gbp in the `total_guest_payments_in_gbp` measure in the daily model `int_kpis__metric_daily_guest_payments`

Afterwards this gets propagated downstream. No changes in the `total_guest_payments_in_gbp` measure in following models. However, a new measure for `stay_disrupt_fees_in_gbp` is created in the 4 Guest Payments related models of:
* `int_kpis__metric_monthly_guest_payments`
* `int_kpis__agg_monthly_guest_payments`
* `int_kpis__metric_mtd_guest_payments`
* `int_kpis__agg_mtd_guest_payments`

Note that this also affects the schema entry of KPIs for both description and completion tests, in the case of aggregation models.

Considering the almost non-existent usage of Guest KPIs report, I will not bother propagating Confident Stay in Product Guest KPIs, nor the report itself:

![image.png](https://guardhog.visualstudio.com/4148d95f-4b6d-4205-bcff-e9c8e0d2ca65/_apis/git/repositories/54ac356f-aad7-46d2-b62c-e8c5b3bb8ebf/pullRequests/5285/attachments/image.png)

However, total Guest Revenue would include Confident Stay in Guest KPIs as well.

Next steps, in a separated PR:
* Propagation of new measure `stay_disrupt_fees_in_gbp` so it's available in Main KPIs.

# 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.
- [X] I have checked for DRY opportunities with other models and docs.
- [X] I've picked the right materialization for the affected models.

# Other

- [ ] Check if a full-refresh is required after this PR is merged.

Related work items: #30278
2025-05-23 10:33:26 +00:00
Oriol Roqué Paniagua
14c099b6b2 Merged PR 5296: Drop Monthly Growth Score By Deal legacy models
# Description

Drop Monthly Growth Score By Deal legacy models in Intermediate and Reporting.
This includes schema entries.
These models were already identified as to be deprecated on the 23rd May 2025, so, today.

# Checklist

- [X] Project compiles, no additional warning is raised.

Related work items: #29826
2025-05-23 10:32:56 +00:00
Oriol Roqué Paniagua
e6819f05cc Merged PR 5281: First version of stg_core__user_product_bundle_to_guest_product
# Description

First version in staging of stg_core__user_product_bundle_to_guest_product.

This table informs which Guest Products are enabled for a given New Dash bundle (or program).

Be aware that for these to be effective, the bundle needs to be applied and active to an active listing that generates bookings.

# 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.
- [X] I have checked for DRY opportunities with other models and docs.
- [X] I've picked the right materialization for the affected models.

# Other

- [ ] Check if a full-refresh is required after this PR is merged.

Related work items: #30165
2025-05-22 08:15:26 +00:00
Pablo Martin
f20d7a49ab deprecate old version 2025-05-20 17:46:02 +02:00
Oriol Roqué Paniagua
f199bbd105 Merged PR 5265: Updates exposures
# Description

Adds exposures for New Dash Onboarding report

# Checklist

- [X] dbt Compiles **Though I get the expected warnings due to the v1/v2 on Guest Product Payments and the deprecation of the old Account Growth report**

Related work items: #30249
2025-05-20 10:11:45 +00:00
Oriol Roqué Paniagua
747fa1b731 Merged PR 5261: Adds contract signed month in onboarding reporting
# Description

Adds contract signed month + not null test

# 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.

Related work items: #30249
2025-05-20 05:53:30 +00:00
Oriol Roqué Paniagua
56aeb701cd Merged PR 5256: Reporting version of New Dash Onboarding
# Description

Reporting version of New Dash Onboarding

It also adds a missing description of a field.
It also adapts the logic for Hubspot Onboarding Owner, after a discussion with Alex. It still does not cover 100% of the cases but he's investigating the rest.

# 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.

Related work items: #30249
2025-05-19 15:41:48 +00:00
Pablo Martin
cf2d7251db add version metadata in schema file 2025-05-19 15:51:59 +02:00
Pablo Martin
cf0c9fd3fa bring v1 back to starting code 2025-05-19 15:48:55 +02:00
Pablo Martin
128d12d372 put the new stuff into a v2 2025-05-19 15:48:13 +02:00
Pablo Martin
92c8331ae4 refactor 2025-05-19 15:44:06 +02:00
Oriol Roqué Paniagua
8c7c3e84cf Merged PR 5246: Ordered services in HS and added new boolean
# Description

Improvements on onboarding data:
* Hubspot services that clients expressed their interest in are now sorted alphabetically. This is needed for:
* A new boolean to compare current active services applied in listings vs. services that captured the interest of the client on onboarding. This can help identify clients that we might need to follow up to ensure all programs are created and applied.

# 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.

Related work items: #30249
2025-05-19 08:40:14 +00:00
uri
fea129bcee Materialise guest product payments as table 2025-05-16 20:11:04 +02:00
Oriol Roqué Paniagua
5455bd2c01 Merged PR 5242: Adds new model in intermediate for new dash deal onboarding
# Description

Adds new model in intermediate for new dash deal onboarding.
Adds additional fields in new dash tables for services completion at program level.

# 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.

Related work items: #30249
2025-05-16 17:09:30 +00:00
Oriol Roqué Paniagua
43a20a3c22 Merged PR 5238: Brings additional sales info from hubspot
# Description

Brings additional info from Hubspot Deals regarding onboarding process

# 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.

Related work items: #30249
2025-05-16 11:08:17 +00:00
Oriol Roqué Paniagua
ca3fc4add9 Merged PR 5234: Remove 2 fields that no longer exist
# Description

Removes 2 fields that no longer exist in the backend. Needed to do since I need to bring another table to sync_core.

No PBI dependencies found.

Fields are:
* flag_as_problem in SH User
* autonavigate in VerificationSet

# Checklist

- [X] The edited models and dependants run properly with production data.
- [ ] 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

- [X] Check if a full-refresh is required after this PR is merged.

Related work items: #30229
2025-05-16 10:06:08 +00:00
Oriol Roqué Paniagua
53874ab08a Merged PR 5227: Fix Billable Services New Dash
# Description

Fixes Billable Services categorisation. We were not handling Guest Agreement exclusion. I just changed so instead of including services as billable by default, it's the other way around.

# 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.
2025-05-15 15:01:21 +00:00
Oriol Roqué Paniagua
baf9d2767c Merged PR 5215: Switch from 20th to 12th for invoicing cap
# Description

After a discussion with Nathan, the invoicing cycle has again been reduced by quite a few days.
We agreed to move the cap from 20th to 12th of the following month.

# 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.

Related work items: #30147
2025-05-15 14:10:27 +00:00
Oriol Roqué Paniagua
ae9bb524b7 Merged PR 5214: Integrates Guest Product new flow Payments
# Description

Integrates Guest Product Payments coming from the new flow of Guest Products.

This also removes few fields that will not be used or that do not make sense for GP specifically.

# 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.
- [X] I have checked for DRY opportunities with other models and docs.
- [X] I've picked the right materialization for the affected models.

# Other

- [ ] Check if a full-refresh is required after this PR is merged.

Related work items: #30110
2025-05-15 07:00:11 +00:00
Oriol Roqué Paniagua
d5dd6df1c1 Merged PR 5201: Eliminates Verification Payments v2 + updates exposures
# Description

Eliminates Verification Payments v2 + updates exposures

# Checklist

- [X] Project compiles

Related work items: #30024
2025-05-13 14:48:34 +00:00
Oriol Roqué Paniagua
4cac5aefa5 Merged PR 5191: Guest Journey Payments to reporting
# Description

Guest Journey Payments to reporting. This aims to substitute core__verification_payments_v2, which is in use in the report of Guest Payments within Business Overview.

In order to avoid re-doing PBI work, I already set  id_guest_product_payment as text for future usage. Similarly, superhog fees are called truvi fees.

# 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.
- [X] I have checked for DRY opportunities with other models and docs.
- [X] I've picked the right materialization for the affected models.

# Other

- [ ] Check if a full-refresh is required after this PR is merged.

Related work items: #30024
2025-05-13 07:40:53 +00:00
Oriol Roqué Paniagua
3badc02c9f Merged PR 5187: Switch models that use int_core__verification_payments
# Description

Switches all models that still use int_core__verification_payments, except for the equivalent in reporting that needs a parallel GJ Payments to do a proper refactor.

# 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.
- [X] I have checked for DRY opportunities with other models and docs.
- [X] I've picked the right materialization for the affected models.

# Other

- [ ] Check if a full-refresh is required after this PR is merged.

Related work items: #30024
2025-05-12 15:58:53 +00:00