Charge Pricing Breakdowns

Table name: FUTURE__charge_pricing_breakdowns

🛠️ Partner API Alignment Migration

🧭 This table represents the post-migration state for charge_pricing_breakdows.

1️⃣ Migrate to this table by April 2026

2️⃣ Between April 2026 and July 2026, remove FUTURE__ prefix

Contains detailed pricing breakdowns for charging sessions, including total costs, fees, and adjustments. This model filters pricing breakdown data to only include records associated with partner charges.

SQL: FUTURE__charge_pricing_breakdowns

Schema

Column NameData TypeDescription
Primary ID
idINTEGERPrimary key
Other IDs
charge_idINTEGERForeign key referencing the associated charging session
currency_idINTEGERForeign key referencing the currency used for pricing
Timestamps
created_atTIMESTAMP_NTZTimestamp when the pricing breakdown record was first created
updated_atTIMESTAMP_NTZTimestamp when the pricing breakdown record was last modified
Attributes
typeVARCHARCategorizes the type of pricing breakdown (e.g., standard, promotional, special rate)
precisionINTEGERIndicates the decimal precision used for price calculations
total_priceNUMBERTotal calculated price including all components and adjustments
total_master_priceNUMBERPrimary price component before additional fees or adjustments
total_secondary_priceNUMBERSecondary or supplementary price component, if applicable
total_feesNUMBERSum of all additional fees applied to the charge
total_adjustmentsNUMBERNet value of all price adjustments, including discounts or surcharges

Changes from Last Version

  • Renamed column: charge_pricing_breakdown_id → id to standardize primary key naming.
  • No other changes to schema or data types; existing fields remain unchanged.
  • This table is downstream of FUTURE__charges which is downstream of models with relaxed inclusion criteria.

Data inclusion criteria

  • This table works with FUTURE__charges table, requiring that charge_id is among the partner's FUTURE__charges.id records.

Data flow

Upstream tablesDownstream tables
FUTURE__chargesFUTURE__charge_pricing_breakdown_specifications

Alignment

The charge_pricing_breakdowns table

-- is downstream of FUTURE__charges which has relaxed inclusion criteria -- one needs to align FUTURE__charges and use that id list to filter this table -- easiest is to ìnner join with FUTURE__charges and align that table:

     inner join FUTURE__charges as c
      on t.charge_id = c.id
            where
              -- Match OLD model logic: filter by operator_role and ensure CP/team are in OLD tables
              (
                -- For owner/both roles: charge_point must exist in OLD charge_points table
                (c.operator_role in ('owner', 'both')
                 AND c.charge_point_legacy_alignment_flag = true)
                OR
                -- For payer role: paying_team must not be deleted
                (c.operator_role  in ('payer', 'both') AND c.paying_team_deleted_at is null)
              )