Skip to main content

Update the Data Model and Import Data

Add a Custom Object

Now that you’ve installed the package, there are a few things you need to do to customize your event app. First, add an additional object to track registrations for the event.

  1. Click setup gear and select Setup.
  2. Click the Object Manager tab.
  3. Click Create and select Custom Object.
  4. Define the new custom object as follows:
    • Label: Event Registration
    • Plural Label: Event Registrations
    • Object Name: Event_Registration
    • Record Name: Event Registration Name
    • Data Type: Text
  1. Leave all other default values as is, and click Save.

Add a Custom Field for the Registration ID

Add a custom field to your Event Registration object to track a unique ID for each attendee’s registration. Use a text field for this purpose.

  1. From the Event Registration custom object, click Fields & Relationships.
  2. Click New.
  3. Select Text and click Next.
  4. Define the field as follows:
    • Field Label: Registration ID
    • Length: 20
    • Field Name: Registration_ID
  1. Leave everything else as is, and click Next, Next, and Save & New.

Add a Custom Field for Attendees

Add a custom field to your Event Registration object to track attendees for your event. Use the standard Contacts object to store the attendee information.

  1. Select Master-Detail Relationship and click Next.
  2. For Related To, select Contact and click Next.
  3. Define the field as follows:
    • Field Label: Attendee
    • Field Name: Attendee
    • Child Relationship Name: Event_Registrations
  1. Leave everything else as is, and click Next, Next, Next, and Save & New.

Add a Custom Field for the Event Names

Add a custom field to your Event Registration object to track the names of your events. Use the existing custom object Public Events from the package you installed to store your event names.

  1. Select Master-Detail Relationship and click Next.
  2. For Related To, select Public Events and click Next.
  3. Define the field as follows:
    • Field Label: Event Name
    • Field Name: Event_Name
    • Child Relationship Name: Event_Registrations
  1. Leave everything else as is, and click Next, Next, Next, and Save & New.

Add a Custom Field for Dietary Needs

Add a custom field to your Event Registration object to track dietary needs for your attendees. Use a picklist field for this purpose.

  1. Select Picklist and click Next.
  2. Define the field as follows:
    • Field Label: Dietary Needs
    • Field Name: Dietary_Needs
    • Values: Select Enter values, with each value separated by a new line
    • Enter the following values:
      • Vegetarian
      • Gluten-free
      • Vegan
      • Diabetic
      • Other
  1. Leave everything else as is, and click Next, Next, and Save & New.

Add a Custom Field for the Registration Fee

Add a custom field to your Event Registration object to track how much it costs to attend your event. Use a currency field for this purpose.

  1. Select Currency and click Next.
  2. Define the field as follows:
    • Field Label: Registration Fee
    • Field Name: Registration_Fee
    • Length: 18
    • Decimal Places: 0
  1. Leave everything else as is, and click Next, Next, and Save & New.

Add a Custom Field for the Attendee Type

Add a custom field to your Event Registration object to track information about your attendees. Specifically, you want to track if they are a customer, a partner, or an employee. Use a picklist field for this purpose.

  1. Select Picklist and click Next.
  2. Define the field as follows:
    • Field Label: Type
    • Field Name: Type
    • Values: Select Enter values, with each value separated by a new line
    • Enter the following values:
      • Customer
      • Partner
      • Employee
  1. Leave everything else as is, and click Next, Next, and Save.

Add a Custom Tab

Add a custom tab for your Event Registration object, so you can view your event registration records. 

  1. From Setup, click Home.
  2. Enter tabs in the Quick Find box, then select Tabs.
  3. In the Custom Object Tabs section, click New.
  4. For Object, select Event Registration.
  5. For Tab Style, click the magnifier icon and select any image.
  6. Click Next, Next, and Save.

Now that you’ve created the Event Registration object and added custom fields, you need to add a couple of fields to the Public Events object included in the package you installed.

  1. From Setup, click Object Manager.
  2. Enter public in the Quick Find box and select Public Events.

Add a Custom Field for Registration Revenue

Add a custom field to the Public Events object to track revenue for your event.

  1. From the Public Events object, click Fields & Relationships.
  2. Click New.
  3. Select Roll-Up Summary and click Next.
  4. Define the field as follows:
    • Field Label: Registration Revenue
    • Field Name: Registration_Revenue
  1. Click Next.
  2. For Summarized Object, select Event Registrations.
  3. For Select Roll-Up Type, select SUM.
  4. For Field to Aggregate, select Registration Fee.
  5. Leave everything else as is, and click Next, Next, and Save & New.

Add a Custom Field for Number of Registrations

Now, add a custom field to the Public Events object to track the number of people who have registered for your event.

  1. Select Roll-Up Summary and click Next.
  2. Define the field as follows:
    • Field Label: Number of Registrations
    • Field Name: Number_of_Registrations
  1. Click Next.
  2. For Summarized Object, select Event Registrations.
  3. For Select Roll-Up Type, select COUNT.
  4. Leave everything else as is, and click Next, Next, and Save.

Create Records for an Event and a Session

Now that you’ve created the object and custom fields you need, create records in your Trailhead Playground for an upcoming event and session.

  1. Click app launcher to open App Launcher.
  2. Enter events in the search box and select Events.
  3. Click the Public Events tab.
  4. Click New.
  5. Define the public event as follows:
    • Public Event Name: Dreamforce 2023
    • Start Date: 9/12/2023 8:00 AM (we won't check this)
    • End Date: 9/14/2023 4:00 PM (we won't check this)
    • Event Type: Dreamforce
    • Region: AMER
    • Venue: Moscone Center
    • Venue State: CA
    • Venue Address: 747 Howard St
    • Venue City: San Francisco
    • Venue Postal Code: 94103
  1. Leave everything else as is, and click Save.

Next, click the Sessions tab to create a session record.

  1. From Sessions, click New.
  2. Define the session as follows:
    • Session Name: Dreamfest 2023
    • Public Event Name: enter Dreamforceand select Dreamforce 2023
    • Date: 9/13/2023 (we won't check this)
    • Time: 7:00 PM (we won't check this)
    • Level: Beginner
  1. Leave everything else as is, and click Save.

Import Data

Now that you’ve created records for an upcoming event and session, add attendees. Rather than adding them one by one, use the import wizard. And good news! The contacts you need are already in your Trailhead Playground. All you need to do is upload the event registration records and match them to the existing contacts by name. 

Note

Not seeing these contacts in your playground? Use the CSV to do an initial import of just the contacts, mapping Contact: First Name to CSV Header: First Name and Contact: Last Name to CSV Header: Last Name. 

  1. Download the CSV file.
  2. Click setup gear and select Setup.
  3. From Setup, enter data import in the Quick Find box, then select Data Import Wizard.
  4. Click Launch Wizard!
  5. For What kind of data are you importing?, click Custom Objects and select Event Registrations.
  6. For What do you want to do?, select Add new records.
  7. For Match by, select Name.
  8. For Which Contact field in your file specifies the Master/Detail relationship?, select Contact Name.
  9. For Which Public Events field in your file specifies the Master/Detail relationship?, select Public Events Name.
  10. For Where is your data located?, drag the downloaded CSV to Drag CSV file here to upload.
  11. Click Next.
  12. Map the spreadsheet as follows:
    • Mapped Salesforce Object: Attendee to CSV Header: Attendee
    • Mapped Salesforce Object: Event Name to CSV Header: Event Name
    • Mapped Salesforce Object: Registration Fee to CSV Header: Registration Cost
    • Mapped Salesforce Object: Registration ID to CSV Header: Registration ID
    • Mapped Salesforce Object: Event Registration Name to CSV Header: Registration Name
  1. There will be two unmapped fields, for First Name and Last Name. Leave those as is. Click Next.
  2. Click Start Import.
  3. Click OK.

Now if you check the Dreamforce 2023 record, you can find the rollup summary for the revenue for your event and the number of people who have registered.

One Step Left!

Your data model is in place and you imported your data. Good work. In the last step of the project, you add automation. Let’s head there next.

Resources

Share your Trailhead feedback over on Salesforce Help.

We'd love to hear about your experience with Trailhead - you can now access the new feedback form anytime from the Salesforce Help site.

Learn More Continue to Share Feedback