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
  1. Create a New Object

    • Navigate to Object Manager in Setup and click New Object.

  2. Custom Object Information

    • Label: Guest

    • Plural Label: Guests

    • Starts with vowel sound: Uncheck

    • Object Name: Auto-populated as Guest

    • Description: Enter a description or leave it empty.

    • Record Name: Auto-populated as Guest Name with data type Text. Rename this to First 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.

  3. Optional Features: Check the required optional features.

  4. Save: Click Save.

  5. 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
  1. 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.

  2. New Field: Click New.

  3. Data Type: Select Auto Number as the data type.

  4. Field Label: Enter Guest ID.

  5. Display Format: Set the display format as GST-{00000}.

  6. Starting Number: Set the starting number to 1.

  7. Save & New: Click Next, Next, then Save & New.

  8. Repeat for Other Fields: Repeat the above steps to add the following fields for the Guest Object:

    • Last Name: Text

    • Email: Email

    • Phone: Phone

    • Address: Text Area

  9. 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 Guest object.

  • Fields & Relationships:

    • Hotel ID: Auto Number, Format: HTL-{00000}

    • Address: Text Area

    • Location: Text Area

    • Services: 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 Guest object.

  • Fields & Relationships:

    • Room ID: Auto Number, Format: RM-{00000}

    • Room Type: Picklist

      • Values: Single Standard, Double Standard, Twin Deluxe, Double Studio, Junior Suite, Executive Suite, Presidential Suite

    • Occupancy Limit: Number

    • Bed Type: Picklist

      • Values: Single, King Single, Double, Queen, King

    • Price Per Night: Currency (Length: 5; Decimal Places: 2)

    • Availability: Checkbox

    • Accessibility: Checkbox
      Note: The Name field is created when the object is first created

Reservation Object
  • Object Creation: Follow similar steps as the Guest object.

  • Fields & Relationships:

    • Reservation ID: Auto Number, Format: RES-{00000}

    • Check-in Date: Date

    • Check-out Date: Date

    • Guest: Lookup (Related To Guest)

    • Room: Lookup (Related To Room)

    • Reservation Date: Date

    • Reservation Status: Picklist

      • Values: Pending, Confirmed, Checked-in, Cancelled

    • Payment Status: Picklist

      • Values: 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 Guest object.

  • Fields & Relationships:

    • Invoice ID: Auto Number, Format: INV-{00000}

    • Guest: Lookup (Related To Guest)

    • Reservation: Lookup (Related To Reservation)

    • Amount Paid: Currency (Length: 5; Decimal Places: 2)

    • Payment Status: Picklist

      • Values: 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 Guest object.

  • Fields & Relationships:

    • Case ID: Auto Number, Format: CS-{00000}

    • Guest: Lookup (Related To Guest)

    • Case Type: Picklist

      • Values: Support, Complaint, Inquiry

    • Case Status: Picklist

      • Values: Open, In-progress, Closed

    • Description: Text Area (Rich)

    • Date Opened: Date

    • Date Closed: Date

    • Resolution 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

  1. App Manager: In the Quick Find box, type App manager.

  2. Select App Manager

  3. New Lightning App: Click on New Lightning App.

  4. App Name: Enter Clayton Hotel Services.

  5. Image: Upload an image or leave it blank.

  6. Click Next

  7. App Options: Leave the default settings and click Next.

  8. Utility Items: Leave the default settings and click Next.

  9. Navigation Items: Select Home, move it to the Selected Items area, and click Next.

  10. User Profiles: Select System Administrator and move it to the Selected Profiles area.

  11. Save & Finish: Click Save & Finish.

Part III: Create Tabs for the App

  1. Tabs: In the Quick Find box, type tabs.

  2. Select Tabs

  3. New Tab: Click New to create a new tab.

  4. Object: Select Hotel as the Object.

  5. Tab Style: Choose any Tab Style.

  6. Click Next

  7. New Custom Object Tab: Leave the default settings and click Next.

  8. Add to Custom Apps: Uncheck the Include Tab checkbox, scroll down, and select Clayton Hotel Services (Clayton_Hotel_Service).

  9. Save: Click Save.

  10. Repeat: Repeat the above steps to create Tabs for Guest, Room, Reservation, Invoice, and Case.

Part IV: Launch the App

  1. App Launcher: Click on the App Launcher.

  2. Search App: Type Clayton Hotel Services and 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.