(billing-alerts)= # Billing alerts ```{contents} :depth: 4 :backlinks: none ``` Fleio allows defining billing alerts to notify users when service usage or pricing rule usage passes a certain amount. Alerts can be defined for all clients or for a specific client. ## Alert types Fleio currently allows two types of alerts: `Pricing rule` and `Service usage` ### Pricing rule alerts These alerts are available only in `Fleio OpenStack Edition` or `Fleio OpenStack + Hosting Billing Edition`. When defining a pricing rule alert, the user must select a pricing rule the alert applies for. A staff user will be able to select any rule from any OpenStack pricing plan defined in Fleio. An enduser will be able to select any rule from the OpenStack pricing plan associated with his `OpenStack` service. A rule alert is triggered when the cost for the pricing rule during the current billing cycle is greater than the amount defined on the alerts. ### Service usage alerts These alerts are available in all Fleio editions. Service usage alert is triggered when the usage for a postpaid service (e.g., OpenStack service) for the current billing cycle is greater than the amount defined on the alerts. ## Enduser If an enduser has no alerts defined, the staff defined alerts are used for that enduser. ## Staff When defining a billing alerts, a staff user may select the user the alert applies to. Staff defined billing alerts are global and will apply to all endusers (or selected user) that have no alerts defined. ### Custom message templates Staff users can define custom message templates for alerts using {ref}`Message templates` page. Message templates should be created with `Billing related messages` category and the name should start with either `billing.alert.usage` for service usage alerts or `billing.alert.rule` for rule usage alerts.