Data Lifecycle
This page applies to the data lifecycle of Profiles that powers email, SMS, and Push V2 channels.
Profiles store all data sent by API or SDK, as attributes, events, and reachability information.
They can be anonymous or identified once you attach a Custom ID to them after login or signin.
Profile anatomy
Identifiers
Profile ID
The profile ID is a unique ID automatically generated by Batch.
Installation ID
The installation ID is an anonymous ID generated by Batch the first time users open your app or your website. That ID changes each time users reinstall your app or web session data is wiped.
Custom ID
The custom user ID is a native field you can use to attach a unique user ID to a profile. That ID will act as a reconciliation identifier between Batch Profile base and your own backend.
Attributes
Native attributes
They have preset names and formats and are designed to capture common and essential information about profiles. They can be automatically collected by Batch (e.g. app version after SDK implementation)
Custom attributes
Any attribute specific to your needs and industry that is relevant to better target profiles and personalize messages (e.g. a loyalty status)
Events
They are used to trigger automations and refine targeting (eg. add_to_cart event)
How to create a profile?
Batch automatically generates new profiles in 3 scenarios:
- When a user starts your app or visits your website for the first time
- When the Profile API is called with a Custom ID that isn't yet known to Batch
- When a Custom ID is set via SDK, and this Custom ID isn't yet known to Batch
Developers do not need to explicitly declare the creation of a new Profile. Batch handles this process automatically, either updating an existing profile or creating a new one based on the data set via API or SDK.
Each profile has a unique profile_id generated by Batch. Other identifiers can be linked to it depending on its position in the lifecycle:
- Custom ID: The custom ID is a native field you can use to attach a unique user ID to a profile. That ID will act as a reconciliation identifier between Batch Profile base and your own backend. It can only be attached to 1 profile at a time.
- Installation ID: The installation ID is an anonymous ID generated by Batch the first time users open your app or your website. That ID changes each time users reinstall your app or web session data is wiped. Think about it as a device identifier that can travel from one profile to another depending on login/logout actions on your app or website. It can only be attached to 1 profile at a time.
Anonymous Profiles
Before you identify a profile with a Custom ID, Batch generates an anonymous profile.
The installation ID that triggered the creation of the profile is attached to the Profile.
Anonymous profiles are reachable via push notifications once they opt-in.
Logged-in Profiles
Logged-in Profiles are Profiles with a Custom ID that has been shared:
- via Profile API with any attribute update or event tracking
- via SDK with the identify method
Logged-in Profiles are reachable via email, push notifications and SMS.
What happens when setting a Custom ID on an anonymous profile?
The profile lifecycle in Batch is closely aligned with real-life user interactions. Understanding how data is stored against profiles can be clarified by examining common user actions: sign-in, login, and logout.
Sign-in
Definition: This occurs when you set a Custom ID that is not yet known to Batch.
Process: The Custom ID will be assigned to the initial profile, and all previously collected data will be retained within this profile.
Login
Definition: This happens when you set a Custom ID that Batch already associates with another profile. This situation can arise if the user has previously logged in on another device or if data was sent via the Profile API using this Custom ID.
Process: The anonymous profile will become orphaned, and all installations will be linked to the already existing profile. To transfer attributes from the anonymous profile to the logged-in profile, resend data via SDK after the identify call.
Orphaned Profiles
Definition: Orphaned Profiles are profiles that lack both Custom IDs and Installation IDs. This happens after a login from a previously anonymous profile.
Process: These profiles become unreachable and are excluded from all dashboard analytics and exports.
How are attributes reconciled on Profiles?
The majority of attributes on Profiles are reconciled using the "last update rule". This means that the most recently written value for an attribute will be displayed in the Profile view and used for targeting and personalization purposes, regardless of the attribute's source (SDK or API). This rule applies to:
- All custom attributes
- Email address
- Phone number
- Marketing email subscription status
- Marketing SMS subscription status
Exceptions
Certain native attributes follow different priority rules when being reconciled. These exceptions are as follows.
Region and Language
Priority order:
- Set via API
- Set via SDK
- Automatically collected by the SDK
Timezone
Priority order:
- Automatically collected by the SDK
- API set
GDPR & Privacy
Profiles are compatible with the GDPR API, as well as all privacy requests made from the dashboard. To respond to privacy requests (data export and data deletion), Batch finds the Profile that matches the identifier in the privacy request and follows standard identity resolution process.
It means that when a data request is made with an Installation ID, Batch will not be able to find a Profile that holds this Installation as well as a custom user ID. To read or delete a logged in Profile (with a custom user ID), it is necessary to provide its custom user ID in the privacy request.
Inactive profiles
Profiles that have not been active for a certain period of time are classified as inactive and deleted.
What is an inactive profile?
A profile will be considered inactive if no activity is detected for it for a certain period. By default, the period of inactivity is set to 390 days. You can reach out to your Customer Success Manager to shorten this period.
Activity on a profile may be:
- Data sent from a mobile application or website via Batch SDKs. Example: an open or a visit, change of opt-in status for push notifications, custom attribute or event tracking, etc.
- Custom data tracking via Custom Data API or Profile API
- User event tracking via Trigger Events API or Profile API
- Upload or update of email subscription information via Profile API, Email Subscription API or mobile and web SDKs. Example: modification of email address, update of opt-in status for email marketing, etc.
- Engagement events with emails received: open or click.
What is the impact of these deletions?
Once a profile's data has been deleted, it can no longer be targeted by all messages based on the Profile based data model. This implies email, SMS, and push V2 messages.
If an activity takes place for a user after their profile has been deleted (e.g., a user returns to the application 14 months after their last activity), a new profile will be created for them.
This behavior is consistent with the profile lifecycle management in Batch. When a profile is deleted due to inactivity, the system essentially "forgets" about that user. Upon the user's return and subsequent activity, Batch treats them as a new user, creating a fresh profile to store their data.