Data Structure
The database structure for the template
All objects and some selected fields in the template are explained below. Please refer to our Bubble Best Practices document for guidance on how the Bubble database should be structured.
All data types and a few select fields are explained below. A good general rule to follow is that you shouldn't delete any fields that are included with the template and instead only add new ones.
Block entry
This data type is used to store content that goes into each homepage block. Each homepage block (template) will have a maximum number of block entries:
Testimonials section: Multiple entries
Featured section: Up to 3 entries
Process section: Up to 3 entries
Slideshow section: Between 3 to 5 entries
Capabilities section: Up to 9 entries
Video section: 1 entry
Press section: Between 3 to 5 entries
About section: 1 entry
Call-to-action section: 1 entry
Contact section: 0 entries
Category
This data type represents a category that can be linked to a Product
. Categories are not unique per product - they can be linked to any number of Products
. Categories are created, edited, and removed by app admins from the owner’s portal.
Field name
Type
Description
Title
text
The title of the category. All categories are displayed and identified with this name
Dummy
This data type allows you to quickly preview your page layout by it as your data source.
Feature backlog
This data type represents each feature that an Owner has added into the Backlog section of the Owner's Portal.
Flag
This data type is created each time a user chooses to flag (i.e., report) a product. This may or may not include a message. Only admin accounts can view flags.
Field name
Type
Description
Dismissed?
yes / no
Indicates whether or not this Flag
has been reviewed by an admin. Flags
with their Dismissed?
field set to yes are not shown in the list of flags in the owner’s portal
Product
Product
The Product
that the user has flagged
Reason
text
The explanation for flagging the product. This is viewable to admins in the owner’s portal
User
User
The creator of the Flag
and author of the message (if included)
Homepage block template
The data type is used for the homepage maker. App owners can add any number of homepage blocks / homepage sections straight from the owner's portal by starting from a homepage block template.
Homepage block
App Owners can add an unlimited number of homepage blocks. They can control the content and settings from the Owner's Portal.
Image
This data type represents a single image that is associated with a particular Product
. This image may be a primary image or standard image for a product.
Field name
Type
Description
Image
image
The actual image for this Image
instance
Product
Product
The Product
that this image was added for and represents
Message
This data type represents a single message within a message thread. A Message
is created each time a user sends a message in the chat module.
Field name
Type
Description
Attachment
file
The file that the message author has attached to the message. This is optional
Text
text
The content of the message
Thread
Thread
The overall message thread that this message is associated with. A Message
will always have one Thread
Users
User (list)
The list of users who are involved with this message’s Thread
. This field is used for setting privacy rules. In this app, this field should always have two users
Viewed by users
User (list)
The list of users who have viewed this message in the chat module. This allows you to determine which messages are unread
Order
Field name
Type
Description
Address 1
text
Address 2
text
Amount received
number
Charge ID
text
City
text
Customer
User
Fee charged
number
Fee charged (Stripe)
number
Payment date
date
Product
Product
Product owner
User
Quantity
number
Shipping fee
number
State
text
Status
text
Subtotal
number
Total
number
Total amount charged
number
Total amount charged (Stripe)
number
Tracking number
text
Zip code
text
Palette color
This data type is color palette list is referenced in the Air Color Picker plugin / element. Feel free to add more color entries for quick access when using the Air Color Picker element.
Product
This data type represents a product that users can search for and order on the platform. A Product
is created from the dashboard after a user registers as a seller and connects their Stripe account. A Product
is comprised of basic details and information that impacts how users can interact with the product.
Field name
Type
Description
Category
Category
Description
text
The description for the product displayed on the public product page
Image main
Image
The primary image for the product. This is used on the search and dashboard pages for the displayed list of products. This is the featured image on the product details page
Images
Image (list)
The secondary images for the product. These are shown only on the product details page and can be enlarged from that page. This list does include Image main
Inactive_admin?
yes / no
Indicates if the product has been deactivated by an app admin. Deactivated products do not appear on the search page and cannot be ordered by users
Inactive_user?
yes / no
Indicates if the product has been deactivated by the product owner. Deactivated products do not appear on the search page and cannot be ordered by users
Orders
Order (list)
Owner
User
The owner and creator of the product
Price
number
The per unit price of the product in US dollars. This is used...
Rating
number
The numeric average of every Rating
created for this product. This number has a minimum of 0 and a maximum of 5
Reviews
Review (list)
The list of Reviews
created for this product
Shipping fee
number
Title
text
The title of the product
Total in stock
number
Total sold
number
Push token
This represents a unique token to be used with OneSignal for push notification integrations for wrapped mobile apps.
Review
This data type represents a user-written review for a given product. A Review
is created when a user submits a review from product's details page. A user can review a Product
after they have successfully completed an order with that includes that Product
.
Field name
Type
Description
Author
User
The creator and author of this review
Product
Product
The Product
that this review is associated with. A user can create one Review
per product
Rating
number
The numeric rating that the user has selected for this review. This can range from 1 to 5
Text
Title
The description/explanation for this review
Title
text
The title of this review
Thread
This data type represents a message thread between two users. All messages sent within this thread are linked to this thread.
Field name
Type
Description
Inactive?
yes / no
Indicates whether the message thread is active and viewable
Last msg sent
date
The date and time of the most recently created message for this thread
Users
User (list)
The list of users who are involved with and have access to this thread. In this app, this field should always contain two users
User
The user data type represents each person who has an account in your application.
Field name
Type
Description
Date agreed to terms and privacy docs
date
Date agreed to terms and privacy docs during sign up
Inactive
yes / no
User is marked as inactive = yes when App owner deletes the user from the Owner's Portal
Last login
date
Captures the last date that the user loaded any page in the app
Owner?
yes / no
If Owner is yes then they will have access to the Owner's Portal
Signup method
text
E.g., E-mail, LinkedIn, Facebook, Twitter, or etc.
Website
This data type includes fields for all app-wide settings. Most of the data fields are controlled by the App Owner from the Owner's portal. There should only be a single object of this data type.
Field name
Type
Description
Ask for cookies?
yes / no
App Owner can control whether or not to ask users to accept cookies (if yes, a cookies banner will show on the homepage)
text
Contact / support email that all emails in the application come from. Whenever a new email action is created in the application, it should refer to this field instead of being hardcoded
Email HTML
text
List of blocks
List of homepage blocks
Homepage blocks / sections
Name
text
Name of your app / website. This is the field that should be referenced anywhere where the name is used (instead of hardcoded).
Primary color
text
App and email template primary color
Usersnap off?
yes / no
This turns off the Usersnap tool, which AirDev uses with its clients to submit feedback and bug reports.
Last updated
Was this helpful?