Merged PR 5005: New API invoices

# Description

Added new invoices metrics for CIH and S&P API for KPI and Accounting models

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

New API invoices

Related work items: #29276
This commit is contained in:
Joaquin Ossa 2025-04-16 15:24:25 +00:00
commit 84eda4554f
10 changed files with 146 additions and 0 deletions

View file

@ -670,6 +670,28 @@
"display_exclusion": "INVOICING",
"include_in_account_reporting": false,
},
{
"order_by": 247,
"metric": "Invoiced Check In Hero API Revenue",
"value": "xero_check_in_hero_api_net_fees_in_gbp",
"previous_year_value": "previous_year_xero_check_in_hero_api_net_fees_in_gbp",
"relative_increment": "relative_increment_xero_check_in_hero_api_net_fees_in_gbp",
"number_format": "currency_gbp",
"increment_sign_format": "positive",
"display_exclusion": "INVOICING",
"include_in_account_reporting": false,
},
{
"order_by": 248,
"metric": "Invoiced Screen & Protect Revenue",
"value": "xero_screen_and_protect_net_fees_in_gbp",
"previous_year_value": "previous_year_xero_screen_and_protect_net_fees_in_gbp",
"relative_increment": "relative_increment_xero_screen_and_protect_net_fees_in_gbp",
"number_format": "currency_gbp",
"increment_sign_format": "positive",
"display_exclusion": "INVOICING",
"include_in_account_reporting": false,
},
{
"order_by": 250,
"metric": "Guest Revenue",

View file

@ -231,6 +231,8 @@ with
-- APIs REVENUE --
invoiced_revenue.xero_apis_net_fees_in_gbp,
invoiced_revenue.xero_e_deposit_net_fees_in_gbp,
invoiced_revenue.xero_check_in_hero_api_net_fees_in_gbp,
invoiced_revenue.xero_screen_and_protect_net_fees_in_gbp,
invoiced_revenue.xero_guesty_net_fees_in_gbp,
-- HOST RESOLUTIONS --
@ -483,6 +485,8 @@ select
-- APIs REVENUE --
{{ calculate_safe_relative_increment("xero_apis_net_fees_in_gbp") }},
{{ calculate_safe_relative_increment("xero_e_deposit_net_fees_in_gbp") }},
{{ calculate_safe_relative_increment("xero_check_in_hero_api_net_fees_in_gbp") }},
{{ calculate_safe_relative_increment("xero_screen_and_protect_net_fees_in_gbp") }},
{{ calculate_safe_relative_increment("xero_guesty_net_fees_in_gbp") }},
-- HOST RESOLUTIONS --