🧭✨Future Charges (NEW)
✨ NEW TABLE - November 2025
🛠️ Partner API Alignment Migration
🧭 This table represents the post-migration state for
charges.1️⃣ Migrate to this table by April 2026
2️⃣ Between April 2026 and July 2026, remove FUTURE__ prefix 3
Charge session records enriched with charge point, team, and operator data. Contains detailed information about charging sessions including timing, energy consumption, pricing, and operational state.
SQL: FUTURE__charges
Schema
| Column Name | Data Type | Description |
|---|---|---|
| Primary ID | ||
| id | INTEGER | Primary key |
| Other IDs | ||
| charge_point_id | INTEGER | Identifier of the charge point where the charging session occurred |
| charge_point_site_id | INTEGER | Identifier of the site where the charge point is located |
| charge_point_auth_token_id | INTEGER | Identifier of the authentication token used to start the charge |
| charge_point_brand_id | INTEGER | Identifier of the charge point hardware brand/manufacturer |
| charge_point_model_id | INTEGER | Identifier of the specific charge point hardware model |
| charge_point_operator_id | INTEGER | Identifier of the charge point operator managing the charge point |
| charge_point_team_id | INTEGER | Identifier of the team responsible for operating the charge point |
| user_id | INTEGER | Identifier of the user who initiated the charging session |
| paying_team_id | INTEGER | Identifier of the team responsible for paying for the charge |
| sponsor_team_id | INTEGER | Identifier of the team sponsoring/subsidizing the charge, if applicable |
| application_id | INTEGER | Identifier of the application used to initiate the charge |
| vehicle_id | INTEGER | Identifier of the vehicle being charged |
| external_id | VARCHAR | External reference ID for the charging session |
| price_group_id | INTEGER | Identifier of the pricing group applied to the charge |
| cost_price_group_id | INTEGER | Identifier of the cost pricing group applied |
| promotion_code_id | INTEGER | Identifier of any promotion code applied to the charge |
| smart_charge_id | INTEGER | Identifier for smart charging session if applicable |
| Timestamps | ||
| created_at | TIMESTAMP_NTZ | Timestamp when the charge record was created in the system |
| updated_at | TIMESTAMP_NTZ | Timestamp when the charge record was last updated |
| starting_at | TIMESTAMP_NTZ | Timestamp when the charging session was initiated |
| charging_at | TIMESTAMP_NTZ | Timestamp when actual power transfer began |
| cable_plugged_in_at | TIMESTAMP_NTZ | Timestamp when the charging cable was physically connected |
| stopped_at | TIMESTAMP_NTZ | Timestamp when the charging session was stopped |
| released_at | TIMESTAMP_NTZ | Timestamp when the charge point was released after charging |
| failed_at | TIMESTAMP_NTZ | Timestamp when the charging session failed, if applicable |
| completed_at | TIMESTAMP_NTZ | Timestamp when the charging session was fully completed |
| fully_charged_at | TIMESTAMP_NTZ | Timestamp when the vehicle reached full charge |
| charge_point_deleted_at | TIMESTAMP_NTZ | Timestamp when the associated charge point was deleted, if applicable |
| paying_team_deleted_at | TIMESTAMP_NTZ | Timestamp when the paying team was deleted, if applicable |
| Filters | ||
| is_roaming_charge | BOOLEAN | Indicates if this is a roaming charging session |
| Attributes | ||
| connector_position | INTEGER | Physical position number of the connector on the charge point |
| charge_point_identifier | VARCHAR | External identifier of the charge point, often used in communication protocols |
| start_source | VARCHAR | Method or system used to initiate the charging session |
| user_gateway | VARCHAR | Interface or platform through which the user initiated the charge |
| team_type | VARCHAR | Classification of the team (e.g. professional, private, personal) |
| charge_type | VARCHAR | Classification of the charge session type |
| gateway | VARCHAR | Payment or authentication gateway used for the session |
| application_name | VARCHAR | Name of the application used to initiate the charge |
| state | VARCHAR | Current state of the charging session |
| failed_reason | VARCHAR | Reason for failure if the charging session failed |
| failure_code | VARCHAR | Specific error code if the charging session failed |
| stopped_reason | VARCHAR | Reason why the charging session was stopped |
| note | VARCHAR | Additional notes or comments about the charging session |
| start_meter_wh | NUMBER | Energy meter reading at start of charge in watt-hours |
| end_meter_wh | NUMBER | Energy meter reading at end of charge in watt-hours |
| estimated_wh | NUMBER | Estimated energy consumption for the charge in watt-hours |
| watt_hours | NUMBER | Total energy delivered during the charging session in watt-hours |
| meter_accuracy | NUMBER | Accuracy rating of the energy meter measurements |
| meter_validated | BOOLEAN | Indicates if the meter readings have been validated |
| soc | NUMBER | Current state of charge of the vehicle battery (percentage) |
| soc_source | VARCHAR | Source of the state of charge information |
| soc_start | NUMBER | State of charge at the start of charging session |
| price | NUMBER | Price charged for the charging session |
| price_limit | NUMBER | Maximum price limit set for the charging session |
| cost | NUMBER | Actual cost incurred for the charging session |
| payment_method | VARCHAR | Method used for payment processing |
| avg_co2_kwh | NUMBER | Average CO2 emissions per kWh for the energy delivered |
| avg_renewable | NUMBER | Percentage of renewable energy in the power mix |
| charge_auth_identifier | VARCHAR | Identifier used for charge authorization |
| roaming_provider | VARCHAR | Provider handling roaming services if applicable |
| Categorizations | ||
| type | VARCHAR | Classification of the charging session type ('sponsored', 'operator', 'external') |
| operator_role | VARCHAR | Role of the operator in relation to the charge (owner/payer/both) |
| Operator matching filters | ||
| paying_team_is_main_operator_match | BOOLEAN | Indicates if paying team matches the main operator |
| paying_team_is_parent_operator_match | BOOLEAN | Indicates if paying team matches the parent operator |
| charge_point_is_main_operator_match | BOOLEAN | Indicates if charge point matches the main operator |
| charge_point_is_parent_operator_match | BOOLEAN | Indicates if charge point matches the parent operator |
| charge_point_is_sponsor_operator_match | BOOLEAN | Indicates if charge point matches the sponsor operator |
| charge_point_is_sponsor_parent_operator_match | BOOLEAN | Indicates if charge point matches the sponsor parent operator |
Changes from Last Version
Added columns:
operator_role: ('owner' (of CP), 'payer', or 'both)type: ()Classification of the charging session type ('sponsored', 'operator', 'external')- new IDs: paying_team_id, promotion_code_id, cost_price_group_id, price_group_id, smart_charge_id, sponsor_team_id,
- new timestamps: paying_team_deleted_at charge_point_deleted_at ,
- Operator matching filters
- paying_team_is_main_operator_match
- paying_team_is_parent_operator_match
- charge_point_is_parent_operator_match
- charge_point_is_sponsor_operator_match,
- charge_point_is_sponsor_parent_operator_match
- charge_point_is_main_operator_match,
- new pricing columns: price_limit, cost, price, payment_method
- other: avg_renewable, charge_auth_identifier, note
Renamed columns:
- charge_point_group_id → charge_point_site_id
- co2 → avg_co2_kwh
Data inclusion criteria
- either the
charge_point_idis among ids of the operator'sFUTURE__charge_points - or the
paying_team_idis among the id's of the operator'sFUTURE__teams'
select charges.*
from FUTURE__charges as charges
left join FUTURE__charge_points as cp
on charges.charge_point_id = cp.id
left join FUTURE__teams as teams
on charges.paying_team_id = teams.id
where
-- Filter by operatorRole: 'owner' filters by charge_point_id, 'payer' filters by paying_team_id
-- Include charges where:
-- 1. The charge point is owned by the partner (operatorRole='owner')
-- 2. OR the charge is paid by a team belonging to the partner (operatorRole='payer')
cp.id is not null
or teams.id is not null
Data flow
| Upstream tables | Downstream tables |
|---|---|
FUTURE__charge_points | FUTURE__charge_configs |
FUTURE__teams | FUTURE__charge_pricings |
FUTURE__charge_pricing_breakdowns | |
FUTURE__charge_pricing_breakdown_specifications |
Alignment
Partner API
- Aligns with Partner API get/charges endpoint
- This endpoint has a mandatory
operatorRoleparam, so the SQL table has to be subset to match the API - use
operator_rolecolumn along with operator_match columns to align the API with the SQL table operatorRole= 'payer' →sql operator_role in ('payer', 'both') and paying_team_is_main_operator_match=trueoperatorRole= 'owner' →sql operator_role in ('owner', 'both') and (charge_point_is_main_operator_match=true or charge_point_is_parent_operator_match=true)
The charges table
charges table- To match
chargesone needs to aligncharge_pointsandteams
where (
-- For owner/both roles: charge_point must exist in OLD charge_points table
(operator_role in ('owner', 'both')
AND charge_point_id IN (SELECT id FROM FUTURE__charge_points WHERE integration_deleted_at is null))
OR
-- For payer role: paying_team must not be deleted
(operator_role = 'payer' AND paying_team_deleted_at is null)
)
Updated 4 days ago
