# Technical Integration Guide - Mobile App Notifications

Bettermile enables you to create a customized tracking experience by sending real-time tracking events to your backend. This guide explains how to leverage these tracking events
for an example use case to implement notifications in a customer's mobile app.

## Integration Steps

1. **Availability Messages:** With those messages, we send you parcel IDs that have become “real-time trackable” at this very moment. As soon as a parcel is trackable, we
send [availability events](/products/tracking/apis/rtt/rtt-parcel-monitoring#operation/availabilityEvent) via [webhook](/products/tracking/resources/invitations/custom#webhook-integration).
2. **Subscribing to Parcels:** To receive subsequent updates on parcels, you must subscribe to them via the [Tracking Subscribe](/products/tracking/apis/rtt/rtt-parcel-monitoring#operation/parcelTrackingSubscribe)
endpoint. To reduce load and minimize costs, we recommend subscribing only to parcels for which you plan to send notifications to consignees.
3. **Tracking Messages:** We push all updates for subscribed parcels via the tracking [webhook](/products/tracking/apis/rtt/rtt-parcel-monitoring#operation/trackingEvent).


## Sequence Diagram


```mermaid
%%{
  init: {
    'theme': 'base',
    'themeVariables': {
      'primaryColor': '#C8E7F2',
      'noteBkgColor': '#FFDF9C',
      'secondaryColor': '#DDDDDD'
    }
  }
}%%
sequenceDiagram
    actor C as Consignee
    participant T as Tenant
    participant B as Bettermile
    B->>T: Webhook push: [availability event]
    T->>+B: Subscribe to get Tracking Updates
    note left of T: subscribe to notifications<br>only for customers who have<br>the Tenant's app installed
    B->>-T: [tracking event]
    B->>T: Webhook push: [tracking event]
    T->>C: Mobile Notification
```