sh-notion/notion_data_team_no_files/Credit Notes Downstream Analysis 1de0446ff9c980d9a0c1fd9477d7fcb7.md
Pablo Martin a256b48b01 pages
2025-07-11 16:15:17 +02:00

40 lines
No EOL
2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Credit Notes Downstream Analysis
# Base Model
`int_xero__credit_notes`
![image.png](image%202.png)
# Downstream Models
- `int_xero__credit_note_line_items`
- No aggregations
- `int_xero__sales_denom_mart`
- No aggregations
- `int_xero__sales_monthly_trends`
- Aggregated at accounting financial level, need to update seed model with Resolution account codes
- `xero__credit_note_line_items`
- No aggregations
- `xero__credit_notes`
- No aggregations
- `xero__net_fees`
- Double check on this, but it shouldnt affect since its grouped by `item_code` which is null for Host Resolution payments.
Indeed this change doesnt affect for the reason previously mentioned
- `xero__net_fees_by_deal`
- This model would be affected by it since its aggregating all invoices and credit notes regardless of the type they are by `date` and `id_deal` .
- Possible solution would be to add a new field `is_resolution_payout` in `xero__credit_notes` and use this field to filter out all credit notes from Resolutions Payouts
- `xero__sales_denom_mart`
- No aggregations
- `xero__sales_monthly_trends`
- No aggregations
- We do need to include the new `account_code` for all Resolutions Payouts to `stg_seed__accounting_aggregations`
- `int_kpis__metric_daily_invoiced_revenue`
- It does add new records but with all dimension values as 0 since the model adds the values filtering be `accounting_root_aggregation` or `accounting_kpis_aggregation` set for the different account codes in `stg_seed__accounting_aggregations`
This already adds records with all dimension values as 0 for every other account code that is not in `stg_seed__accounting_aggregations`
- `int_kpis__metric_daily_total_and_retained_revenue`
- No impact since it aggregates by the different revenue sources
- `int_kpis__metric_monthly_invoiced_revenue`
- No impact since it aggregates by the different revenue sources
- `int_kpis__metric_mtd_invoiced_revenue`
- No impact since it aggregates by the different revenue sources