Price Group Pricings

Table name: price_group_pricings

Contains pricing configurations and rules for price groups (both team-owned and operator-owned),
defining various charging tariffs, fees, and pricing structures. This model filters pricing data
to include only those associated with partner-specific price groups, enabling partner-customized
pricing management.

📘

New model

This table is the replacement for the soon-to-be-deprecated team_price_group_pricings. It includes pricings for both team-owned and operator-owned price groups.

SQL: price_group_pricings

Schema

Column NameData TypeDescription
Primary ID
idINTEGERPrimary key
Other IDs
price_group_idINTEGERForeign key referencing the price group this pricing configuration belongs to
team_idINTEGERForeign key referencing the team associated with this pricing configuration (null for operator-owned price groups)
operator_idINTEGERForeign key referencing the operator managing this price group
owner_idINTEGERID of the owner (team or operator) that owns the parent price group
owner_typeVARCHARType of owner — Team for team-owned price groups, Operator for operator-owned
tariff_idINTEGERForeign key referencing the tariff structure associated with this pricing
tag_idINTEGERForeign key referencing tags used for categorizing or filtering this pricing configuration
Timestamps
created_atTIMESTAMP_NTZTimestamp when the pricing configuration was initially created
updated_atTIMESTAMP_NTZTimestamp when the pricing configuration was last modified
deleted_atTIMESTAMP_NTZTimestamp when the pricing configuration was soft deleted, null if still active
from_timestampTIMESTAMP_NTZStart timestamp when this pricing configuration becomes effective
to_timestampTIMESTAMP_NTZEnd timestamp when this pricing configuration expires, null for indefinite duration
Attributes
typeVARCHARType of pricing configuration (tariff, fee, fixed_kwh, fixed_min, spot)
descriptionVARCHARHuman-readable description explaining the purpose and details of this pricing rule
amountNUMBERBase monetary amount for this pricing configuration, in the system's default currency
vatNUMBERValue-added tax rate applied to this pricing configuration, expressed as a decimal
percentageNUMBERPercentage-based pricing component, used for percentage-based fees or discounts
start_min_after_chargingINTEGERNumber of minutes after charging begins when this pricing rule takes effect
start_min_after_fully_chargedINTEGERNumber of minutes after vehicle reaches full charge when this pricing rule activates
end_at_fully_chargedBOOLEANIndicates whether this pricing rule automatically ends when the vehicle is fully charged
amount_minNUMBERMinimum monetary amount that can be charged under this pricing configuration
amount_maxNUMBERMaximum monetary amount that can be charged under this pricing configuration
intervalVARCHARTime interval for recurring pricing applications, such as hourly or daily billing cycles
masterBOOLEANIndicates whether this is the master pricing configuration for the group

Inclusion Criteria

  • the price_group_id must exist in the partner's price_groups.id

Data flow

Upstream tablesDownstream tables
price_groupsNone

Alignment

Monta API

  • Aligns with the pricing objects in the Monta API get/price-groups endpoint
  • the masterPrice object requires that the master = true. There should be exactly 1 master price record per price_group_id
  • the fees object - where master = false and tariff_id is null. There can be 0 to many fee records per price_group_id
  • the tariffs object - where master = false and tariff_id is not null. There can be 0 to many tariff records per price_group_id

Migration from team_price_group_pricings

This table replaces team_price_group_pricings and includes pricings for both team-owned and operator-owned price groups. The team_price_group_pricings table remains available during a transition period. Key differences:

  • team_price_group_id is renamed to price_group_id
  • Adds owner_id, owner_type, and operator_id columns
  • team_id is null for operator-owned price groups

Changes vs previous version

Summary

  • Adds owner_id, owner_type, and operator_id columns
  • team_price_group_id is renamed to price_group_id
  • Includes pricings for operator-owned price groups as new rows — filter on owner_type = 'Team' to get the same results as team_price_group_pricings

Added columns (3)

  • owner_id — ID of the owner (team or operator) that owns the parent price group
  • owner_type — Type of owner (Team or Operator)
  • operator_id — Foreign key referencing the operator managing this price group

Removed columns (0)

Renamed columns (1)

  • team_price_group_id -> price_group_id

New rows

Pricings for operator-owned price groups are now included. To replicate the old team_price_group_pricings results, filter on owner_type = 'Team'.


Did this page help you?