diff --git a/models/intermediate/cross/int_mtd_aggregated_metrics.sql b/models/intermediate/cross/int_mtd_aggregated_metrics.sql index 737e064..4177787 100644 --- a/models/intermediate/cross/int_mtd_aggregated_metrics.sql +++ b/models/intermediate/cross/int_mtd_aggregated_metrics.sql @@ -692,6 +692,17 @@ "display_exclusion": "INVOICING", "include_in_account_reporting": false, }, + { + "order_by": 249, + "metric": "Invoiced Flex API Revenue", + "value": "xero_flex_api_net_fees_in_gbp", + "previous_year_value": "previous_year_xero_flex_api_net_fees_in_gbp", + "relative_increment": "relative_increment_xero_flex_api_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", diff --git a/models/intermediate/cross/int_mtd_vs_previous_year_metrics.sql b/models/intermediate/cross/int_mtd_vs_previous_year_metrics.sql index 56d554d..07fdadd 100644 --- a/models/intermediate/cross/int_mtd_vs_previous_year_metrics.sql +++ b/models/intermediate/cross/int_mtd_vs_previous_year_metrics.sql @@ -233,6 +233,7 @@ with 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_flex_api_net_fees_in_gbp, invoiced_revenue.xero_guesty_net_fees_in_gbp, -- HOST RESOLUTIONS -- @@ -488,6 +489,7 @@ select {{ 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_flex_api_net_fees_in_gbp") }}, {{ calculate_safe_relative_increment("xero_guesty_net_fees_in_gbp") }}, -- HOST RESOLUTIONS -- diff --git a/models/intermediate/kpis/int_kpis__agg_monthly_invoiced_revenue.sql b/models/intermediate/kpis/int_kpis__agg_monthly_invoiced_revenue.sql index abbcaf6..007b3e6 100644 --- a/models/intermediate/kpis/int_kpis__agg_monthly_invoiced_revenue.sql +++ b/models/intermediate/kpis/int_kpis__agg_monthly_invoiced_revenue.sql @@ -51,6 +51,7 @@ sum( xero_screen_and_protect_net_fees_in_gbp ) as xero_screen_and_protect_net_fees_in_gbp, + sum(xero_flex_api_net_fees_in_gbp) as xero_flex_api_net_fees_in_gbp, sum(xero_guesty_net_fees_in_gbp) as xero_guesty_net_fees_in_gbp, sum(xero_apis_net_fees_in_gbp) as xero_apis_net_fees_in_gbp, sum( diff --git a/models/intermediate/kpis/int_kpis__agg_mtd_invoiced_revenue.sql b/models/intermediate/kpis/int_kpis__agg_mtd_invoiced_revenue.sql index 70b048b..990b488 100644 --- a/models/intermediate/kpis/int_kpis__agg_mtd_invoiced_revenue.sql +++ b/models/intermediate/kpis/int_kpis__agg_mtd_invoiced_revenue.sql @@ -51,6 +51,7 @@ sum( xero_screen_and_protect_net_fees_in_gbp ) as xero_screen_and_protect_net_fees_in_gbp, + sum(xero_flex_api_net_fees_in_gbp) as xero_flex_api_net_fees_in_gbp, sum(xero_guesty_net_fees_in_gbp) as xero_guesty_net_fees_in_gbp, sum(xero_apis_net_fees_in_gbp) as xero_apis_net_fees_in_gbp, sum( diff --git a/models/intermediate/kpis/int_kpis__metric_daily_invoiced_revenue.sql b/models/intermediate/kpis/int_kpis__metric_daily_invoiced_revenue.sql index e83b89a..1de19a4 100644 --- a/models/intermediate/kpis/int_kpis__metric_daily_invoiced_revenue.sql +++ b/models/intermediate/kpis/int_kpis__metric_daily_invoiced_revenue.sql @@ -188,6 +188,13 @@ select else 0 end ) as xero_screen_and_protect_net_fees_in_gbp, + sum( + case + when ixsdm.accounting_root_aggregation = 'Flex API' + then ixsdm.line_amount_wo_taxes_in_gbp + else 0 + end + ) as xero_flex_api_net_fees_in_gbp, sum( case when ixsdm.accounting_root_aggregation = 'Guesty Resolutions' diff --git a/models/intermediate/kpis/int_kpis__metric_monthly_invoiced_revenue.sql b/models/intermediate/kpis/int_kpis__metric_monthly_invoiced_revenue.sql index 04f8174..d5ff007 100644 --- a/models/intermediate/kpis/int_kpis__metric_monthly_invoiced_revenue.sql +++ b/models/intermediate/kpis/int_kpis__metric_monthly_invoiced_revenue.sql @@ -56,6 +56,7 @@ select sum( ir.xero_screen_and_protect_net_fees_in_gbp ) as xero_screen_and_protect_net_fees_in_gbp, + sum(ir.xero_flex_api_net_fees_in_gbp) as xero_flex_api_net_fees_in_gbp, sum(ir.xero_guesty_net_fees_in_gbp) as xero_guesty_net_fees_in_gbp, sum(ir.xero_apis_net_fees_in_gbp) as xero_apis_net_fees_in_gbp, sum( diff --git a/models/intermediate/kpis/int_kpis__metric_mtd_invoiced_revenue.sql b/models/intermediate/kpis/int_kpis__metric_mtd_invoiced_revenue.sql index 47cb643..fdd5c06 100644 --- a/models/intermediate/kpis/int_kpis__metric_mtd_invoiced_revenue.sql +++ b/models/intermediate/kpis/int_kpis__metric_mtd_invoiced_revenue.sql @@ -56,6 +56,7 @@ select sum( ir.xero_screen_and_protect_net_fees_in_gbp ) as xero_screen_and_protect_net_fees_in_gbp, + sum(ir.xero_flex_api_net_fees_in_gbp) as xero_flex_api_net_fees_in_gbp, sum(ir.xero_guesty_net_fees_in_gbp) as xero_guesty_net_fees_in_gbp, sum(ir.xero_apis_net_fees_in_gbp) as xero_apis_net_fees_in_gbp, sum( diff --git a/models/intermediate/kpis/schema.yml b/models/intermediate/kpis/schema.yml index cdb0106..fb9248a 100644 --- a/models/intermediate/kpis/schema.yml +++ b/models/intermediate/kpis/schema.yml @@ -4471,6 +4471,13 @@ models: in a given date and per specified dimension. This is an API service. + - name: xero_flex_api_net_fees_in_gbp + data_type: decimal + description: | + Sum of daily Flex API Net Fees, in GBP, without taxes + in a given date and per specified dimension. This is an + API service. + - name: xero_athena_net_fees_in_gbp data_type: decimal description: | @@ -4694,6 +4701,13 @@ models: in a given month and per specified dimension. This is an API service. + - name: xero_flex_api_net_fees_in_gbp + data_type: decimal + description: | + Sum of daily Flex API Net Fees, in GBP, without taxes + in a given date and per specified dimension. This is an + API service. + - name: xero_athena_net_fees_in_gbp data_type: decimal description: | @@ -4911,6 +4925,13 @@ models: in a given month up to the given date and per specified dimension. This is an API service. + - name: xero_flex_api_net_fees_in_gbp + data_type: decimal + description: | + Sum of daily Flex API Net Fees, in GBP, without taxes + in a given date and per specified dimension. This is an + API service. + - name: xero_athena_net_fees_in_gbp data_type: decimal description: | @@ -4990,6 +5011,7 @@ models: - xero_e_deposit_net_fees_in_gbp - xero_check_in_hero_api_net_fees_in_gbp - xero_screen_and_protect_net_fees_in_gbp + - xero_flex_api_net_fees_in_gbp - xero_athena_net_fees_in_gbp - xero_guesty_resolutions_net_fees_in_gbp - xero_guesty_net_fees_in_gbp @@ -5114,6 +5136,13 @@ models: for a given date, dimension and value. This is an API service. + - name: xero_flex_api_net_fees_in_gbp + data_type: decimal + description: | + Sum of daily Flex API Net Fees, in GBP, without taxes + in a given date and per specified dimension. This is an + API service. + - name: xero_athena_net_fees_in_gbp data_type: decimal description: | @@ -5191,6 +5220,7 @@ models: - xero_e_deposit_net_fees_in_gbp - xero_check_in_hero_api_net_fees_in_gbp - xero_screen_and_protect_net_fees_in_gbp + - xero_flex_api_net_fees_in_gbp - xero_athena_net_fees_in_gbp - xero_guesty_resolutions_net_fees_in_gbp - xero_guesty_net_fees_in_gbp @@ -5316,6 +5346,13 @@ models: for a given date, dimension and value. This is an API service. + - name: xero_flex_api_net_fees_in_gbp + data_type: decimal + description: | + Sum of daily Flex API Net Fees, in GBP, without taxes + in a given date and per specified dimension. This is an + API service. + - name: xero_athena_net_fees_in_gbp data_type: decimal description: | diff --git a/seeds/stg_seed__accounting_aggregations.csv b/seeds/stg_seed__accounting_aggregations.csv index 28c4478..5091e84 100644 --- a/seeds/stg_seed__accounting_aggregations.csv +++ b/seeds/stg_seed__accounting_aggregations.csv @@ -22,6 +22,7 @@ account_code,root_aggregation,kpis_aggregation,financial_l1_aggregation,financia "221",Guesty Resolutions,Invoiced API Revenue,4-Mediation and Resolution,41-Guesty Resolutions,411-Guesty Resolutions "222",Check In Cover,Accounting Guest Revenue,3-Guest Products,31-Check In Cover,311-Check In Cover "223",Check In Cover,Accounting Guest Revenue,3-Guest Products,31-Check In Cover,311-Check In Cover +"225",Flex API,Invoiced API Revenue,3-Guest Products,34-Flex API,341-Flex API "226",Check in Hero API,Invoiced API Revenue,3-Guest Products,32-Check in Hero API,321-Check in Hero API "227",Basic Protection,Invoiced Operator Revenue,1-Guest Screening and Protection,17-Protection Services,171-Basic Protection "228",Waiver Pro,Invoiced Operator Revenue,1-Guest Screening and Protection,19-Waiver Pro,191-Waiver Pro @@ -37,12 +38,11 @@ account_code,root_aggregation,kpis_aggregation,financial_l1_aggregation,financia "238",Basic Damage Deposit,Accounting Guest Revenue,2-Deposit Management,21-Deposit Management Services,214-Basic Damage Deposit "239",Resolution Process for Deposit Management Services,Accounting Resolutions,2-Deposit Management,21-Deposit Management Services,215-Resolution Process for Deposit Management Services "240",Screen and Protect API,Invoiced API Revenue,1-Guest Screening and Protection,18-Screen and Protect API,181-Screen and Protect API +"241",Damage Waiver - Truvi Risk,Accounting Guest Revenue,3-Guest Products,33-Damage Waiver - Truvi Risk,331-Damage Waiver - Truvi Risk +"242",Damage Waiver - Truvi Risk,Accounting Guest Revenue,3-Guest Products,33-Damage Waiver - Truvi Risk,331-Damage Waiver - Truvi Risk +"243",Confident Stay,Accounting Guest Revenue,3-Guest Products,35-Confident Stay,351-Confident Stay "301",Damage Host-Waiver Payments,Damage Host-Waiver Payments,5-Damage Host-Waiver Payments,51-Damage Host-Waiver Payments,511-Damage Host-Waiver Payments "316",Host Resolutions Payments,Host Resolutions Payments,4-Mediation and Resolution,42-Host Resolutions,421-Host Resolutions "323",Host Resolutions Payments,Host Resolutions Payments,4-Mediation and Resolution,43-E-Deposit Resolutions,431-E-Deposit Resolutions "324",Host Resolutions Payments,Host Resolutions Payments,4-Mediation and Resolution,44-Check In Hero Resolutions,441-Check In Hero Resolutions -"241",Damage Waiver - Truvi Risk, Accounting Guest Revenue,3-Guest Products,33-Damage Waiver - Truvi Risk,331-Damage Waiver - Truvi Risk -"242",Damage Waiver - Truvi Risk, Accounting Guest Revenue,3-Guest Products,33-Damage Waiver - Truvi Risk,331-Damage Waiver - Truvi Risk -"329",Host Resolutions Payments,Host Resolutions Payments,4-Mediation and Resolution,45-Screen and Protect API - Resolution,451-Screen and Protect API - Resolution -"225",Flex API,Accounting Guest Revenue,3-Guest Products,34-Flex API,341-Flex API -"243",Confident Stay, Accounting Guest Revenue,3-Guest Products,35-Confident Stay,351-Confident Stay \ No newline at end of file +"329",Host Resolutions Payments,Host Resolutions Payments,4-Mediation and Resolution,45-Screen and Protect API - Resolution,451-Screen and Protect API - Resolution \ No newline at end of file