💾Data types
Bullet Launch comes with a number of data types and option sets already added.
Activity
This is a data type for logging selected user activities across the app and displaying them to the users in their activity feed. The activity feed is in the UI Dashboard Header by clicking on the bell icon.
Activities are created by database trigger events in the backend workflows section. This enables them to react to changes in specified data without needing workflow triggers on individual pages and elements.
The activities you choose to log are up to you. By default users will be shown all activities logged across their entity. You can customise this further if needed.
Action (text) - plain text explaining what occurred.
By user (User) - the user who performed the activity.
Entity (Entity) - the entity of the user who perfomed the activity.
Comment
This is an optional data type for allowing users to comment or add updates on specific items, such as a project, a listing, or a post.
The comments can be linked to any data type and displayed using the UI: Comments Section reusable.
Content (text) - the content of the comment.
Entity (Entity) - the entity of the user who commented (for privacy rules).
Example data (Example data) - the example data the comment is linked to. You will need to create a new field for the data type you wish to link your comments to.
Parent comment (Comment) - in case you want to allow nested comments/replies.
Read by (list of Users) - in case you want to highlight comments/updates the current user hasn't read yet.
User
This is the default Bubble data type which holds all of the users of your app. You can't delete it, but you can add new fields to it.
In general try to keep the user data type as lightweight as possible because it's loaded whenever a user loads a page in the app.
Storing the user's avatar on the user may sound like it's not keeping things lightweight, but it's really only storing the image URL, so the data size is small.
Access revoked (yes/no) - if set to yes the user will get logged out every time they try to log in. You can give entity owners control of this flag if you want to.
Avatar (image) - user profile picture, uploaded during onboarding or from their account settings.
Entity (Entity) - this links the user to a entity. This field should not be empty for any user except an App Admin.
Dark mode (yes/no) - specifies whether to show the dark mode version of the app.
First (text) - user's first name, collected during onboarding or from their account settings.
Last (text) - user's last name, collected during onboarding or from their account settings.
Onboarding step (number) - use this field to determine which stage a user has reached in your onboarding flow. Increment it by 1 at each stage, and use conditionals only show onboarding if this number is below a certain value.
Pending payment (yes/no) - this field is used when a user is attempting to subscribe to a plan but is logged out, it ensures that once they are logged in the payment process will be triggered.
Pending payment for price plan (OS - Pricing - Plans) - this field is used when a user is attempting to subscribe to a plan but is logged out, it ensures that once they are logged in the payment process will be triggered. It stores the plan the user clicked on.
Role (OS - User Roles) - this is the role the user holds within the app. By default there are three roles but you can add as many as you want. This is used for privacy rules and for hiding/showing features so do not delete it.
x Stripe customer ID - this saves the user's Stripe customer ID into the database. It's useful to have as a backup in case the Stripe plugin is deleted, which means all the built-in Stripe fields are lost.
🏢 Entity
All users are linked to a entity in BL. You can change the name of this data type to company, group, organisation, team, or any other word to describe a collection of users.
The purpose of this data type is:
A group of users can share the benefits of a single subscription e.g. a team leader can upgrade to a paid plan on behalf of everyone in the team.
It separates the data between entities using privacy rules to ensure no member of one entity will see data from another entity.
Conversely it groups the data of one entity so you can give all (or some) users from a entity access to all of that entity's data (if you wish).
In other words, rather than having a single system with individual users who just have their own data, it enables you to make a "multi-tenanted" SaaS product where multiple groups of users can share data securely within gated perimeters controlled by privacy rules.
Current subscription (subscription) - this links to the latest subscription thing created for this entity. It enables checks of a entity's current subscription status and current plan and is used throughout the app for paywall purposes.
Logo (image) - the entity's logo and can be updated in the dashboard settings.
Name (text) - this is the name of the entity and can be updated in the dashboard settings.
💳 Subscription
This is for saving subscription billing information from Stripe or Lemon Squeezy. Each one is linked to a entity and owned by a user who is the person who set up the subscription.
To see details about a entity's current subscription you can look at the
Cancel at period end? (yes/no) - this is a Stripe flag which is "yes" if the subscription has been cancelled but will remain active until the end of the current subscription period. In this situation the status of the subscription will remain "active" until It is used to acknowledge that the subscription has been cancelled but
Entity (entity) - this is a helper field linking the subscription to the entity that owns it for the purposes of privacy rules.
Current period end date (date) - the date of the next payment.
Current period start date (date) - the date of the last payment.
Frequency (text) - this is a Stripe field indicating the frequency of the subscription.
OS Plan (OS - Pricing - Plans) - this is the plan the entity is subscribed to.
Owner (User) - the user who created the subscription.
Status (text) - this is a Stripe field indicating the status of the subscription, which can be "active" or "canceled".
Stripe Plan ID (text) - this is a Stripe field containing the Stripe Price ID of the plan.
Type (OS - Subscription types) - this indicates whether the subscription is with Stripe or Lemon Squeezy.
🔐 App settings
This saves app-wide information to make it easier for app admin (you) to update and prevent the need for hard-coding information in the Bubble editor. It's up to you whether you keep this or prefer to hard code the information. The latter will reduce workload unit usage.
All of these fields can be altered from the Admin dashboard in the settings tab, or directly in the database itself.
Legal entity name (text) - the name of your company/legal entity. This is used in your privacy policy, terms and conditions, and in the copyright notice in the footer.
Postmark enabled (yes/no) - if you have integrated Postmark for emails, switching this to "yes" will mean all emails are sent from Postmark instead of the default Bubble emails.
Site name (text) - this is the name of your app and is used to generate your terms & conditions and privacy policy, as well as used in place of a logo.
Support email (text) - this is used as the sender address for all outbound email, as well as in your terms & conditions and privacy policy.
🔐 FAQ
This stores FAQs for your site which are displayed in the Support section of the dashboard.
Answer (text) - Answer to the question
Question (text) - The question
🔐 Terms & Privacy
This stores the terms & conditions and privacy policy for your app.
App description (text) - This is a description of your app and the data it collects to enable OpenAI to generate custom policy wording for you.
Privacy policy (text) - Your privacy policy, optionally generated by OpenAI. This is visible on the legal page of your app.
Terms and conditions (text) - Your terms and conditions, optionally generated by OpenAI. This is visible on the legal page of your app.
🔐💬 CHAT - Conversation
BL comes with user-to-user chat functionality. This data type stores a conversation between two or more users. It has messages linked to it.
Users (Users - list) - a list of users who are involved in this conversation.
Notifications scheduled for (Users - list) - when a new message is sent within a conversation, a notification email is scheduled to be sent in the future to notify the recipient that there are new messages. To avoid scheduling a notification every time a new message is sent, this remembers who is awaiting a notification and prevents duplicate notifications being scheduled.
Last message (date) - stores the date of the last message on the conversation, so it can be displayed in the list of conversations without needing to do nested searches (this is for performance reasons).
🔐💬 CHAT - Message
BL comes with user-to-user chat functionality. This data type stores a conversation between two or more users. It has messages linked to it.
Allowed Users (Users - list) - a list of users who are allowed to view this message, for privacy rules use.
Body (text) - this is the body of the message.
Conversation (conversation) - the conversation this message is part of.
JSON (text) - this stores the body of the message in JSON format and is used if the message is being sent to or from OpenAI, for example in case you want to have an AI Bot in the conversation.
Read by (Users - list) - a list of users who have read this message. A user is added to this list if they sent the message or if they load the messages list. This prevents notifications about this message being sent to the user.
Sender (User) - the message sender. This is used to determine whether the message was sent by a user or created by an API call to OpenAI.
🪄AI Generation
This is an optional data type which you can choose to keep or delete. It enables the Create content UI reusable element to function. It acts as a storage container for any AI generations done from this interface. It consists of a number of input fields of different types which have corresponding output fields of different types (e.g. text, file, image), together with input prompts.
You are free to rename, alter, or remove this data type if you don't want it.
🪄GPT Prompt
This stores the GPT prompts for generating Terms and conditions and Privacy policy. These could instead be hard-coded into the workflow actions but having them in the database makes them easier to view and edit.
You can add other GPT prompts here for other parts of your app.
You are free to rename, alter, or remove this data type if you don't want it.
🤷 Example data
This is a generic data type holding example data for the purposes of showcasing the functionality of the app in the example dashboard.
You are free to rename, alter, or remove this data type if you don't want it.
🏢 Entity
Last updated