Clayton Hotel Reservation System Data Model and Lightning App Setup
Clayton Hotel Reservation System
Part I: Creating the Data Model
This section outlines the steps to create the data model for the Clayton Hotel Reservation System.
Guest Object
Create a New Object
Navigate to Object Manager in Setup and click New Object.
Custom Object Information
Label:
GuestPlural Label:
GuestsStarts with vowel sound: Uncheck
Object Name: Auto-populated as
GuestDescription: Enter a description or leave it empty.
Record Name: Auto-populated as
Guest Namewith data typeText. Rename this toFirst Name.
Note: Every new object is assigned a “Name” attribute in addition to attributes like “Last Modified By”, “Owner”, and “Created By”. The “Name” field can be renamed to any of the Text attributes.
Optional Features: Check the required optional features.
Save: Click
Save.Object Details: Note the object details, especially the API Name, which is used for referencing the object in code.
Adding Fields & Relationships to Guest Object
Fields & Relationships: In the Details page, click
Fields & Relationships.
Note: Each Field Label has a Field Name, which will be referenced in code when interacting with object attributes.New Field: Click
New.Data Type: Select
Auto Numberas the data type.Field Label: Enter
Guest ID.Display Format: Set the display format as
GST-{00000}.Starting Number: Set the starting number to
1.Save & New: Click
Next,Next, thenSave & New.Repeat for Other Fields: Repeat the above steps to add the following fields for the Guest Object:
Last Name:
TextEmail:
EmailPhone:
PhoneAddress:
Text Area
Final Save: After creating all fields, click
Save.
Hotel Object
Follow the same steps as above to create the Hotel object with the following specifications:
Object Creation: Follow similar steps as the
Guestobject.Fields & Relationships:
Hotel ID:
Auto Number, Format:HTL-{00000}Address:
Text AreaLocation:
Text AreaServices:
Picklist (Multi-Select)Values:
Room Service,Parking,Free WiFi,Spa,Housekeeping,Swimming Pool,Airport Transfers,Bar
Note: The Name field is created when the object is first created
Room Object
Object Creation: Follow similar steps as the
Guestobject.Fields & Relationships:
Room ID:
Auto Number, Format:RM-{00000}Room Type:
PicklistValues:
Single Standard,Double Standard,Twin Deluxe,Double Studio,Junior Suite,Executive Suite,Presidential Suite
Occupancy Limit:
NumberBed Type:
PicklistValues:
Single,King Single,Double,Queen,King
Price Per Night:
Currency(Length: 5; Decimal Places: 2)Availability:
CheckboxAccessibility:
Checkbox
Note: The Name field is created when the object is first created
Reservation Object
Object Creation: Follow similar steps as the
Guestobject.Fields & Relationships:
Reservation ID:
Auto Number, Format:RES-{00000}Check-in Date:
DateCheck-out Date:
DateGuest:
Lookup(Related ToGuest)Room:
Lookup(Related ToRoom)Reservation Date:
DateReservation Status:
PicklistValues:
Pending,Confirmed,Checked-in,Cancelled
Payment Status:
PicklistValues:
Pending,Paid,Rejected
Total Price:
Currency
Note: The Name field is created when the object is first created
Invoice Object
Object Creation: Follow similar steps as the
Guestobject.Fields & Relationships:
Invoice ID:
Auto Number, Format:INV-{00000}Guest:
Lookup(Related ToGuest)Reservation:
Lookup(Related ToReservation)Amount Paid:
Currency(Length: 5; Decimal Places: 2)Payment Status:
PicklistValues:
Pending,Completed
Invoice Date:
Date
Note: The Name field is created when the object is first created
Case Object
Object Creation: Follow similar steps as the
Guestobject.Fields & Relationships:
Case ID:
Auto Number, Format:CS-{00000}Guest:
Lookup(Related ToGuest)Case Type:
PicklistValues:
Support,Complaint,Inquiry
Case Status:
PicklistValues:
Open,In-progress,Closed
Description:
Text Area (Rich)Date Opened:
DateDate Closed:
DateResolution Notes:
Text Area (Rich)
Note: The Name field is created when the object is first created
Part II: Create a Lightning App for the Clayton Hotel Reservation System
App Manager: In the Quick Find box, type
App manager.Select App Manager
New Lightning App: Click on
New Lightning App.App Name: Enter
Clayton Hotel Services.Image: Upload an image or leave it blank.
Click Next
App Options: Leave the default settings and click
Next.Utility Items: Leave the default settings and click
Next.Navigation Items: Select
Home, move it to the Selected Items area, and clickNext.User Profiles: Select
System Administratorand move it to the Selected Profiles area.Save & Finish: Click
Save & Finish.
Part III: Create Tabs for the App
Tabs: In the Quick Find box, type
tabs.Select Tabs
New Tab: Click
Newto create a new tab.Object: Select
Hotelas the Object.Tab Style: Choose any Tab Style.
Click Next
New Custom Object Tab: Leave the default settings and click
Next.Add to Custom Apps: Uncheck the
Include Tabcheckbox, scroll down, and selectClayton Hotel Services (Clayton_Hotel_Service).Save: Click
Save.Repeat: Repeat the above steps to create Tabs for
Guest,Room,Reservation,Invoice, andCase.
Part IV: Launch the App
App Launcher: Click on the App Launcher.
Search App: Type
Clayton Hotel Servicesand select the newly created app.
Congratulations! The Clayton Hotel Reservation Application has been successfully created.
Note: Subsequent tutorials will expand on this data model to include additional features like automated processes, data validation, approval processes, business logic, page customizations, APIs, and Virtual Assistants.