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.
- Click and select Setup.
- Click the Object Manager tab.
- Click Create and select Custom Object.
- 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
- 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.
- From the Event Registration custom object, click Fields & Relationships.
- Click New.
- Select Text and click Next.
- Define the field as follows:
- Field Label:
Registration ID
- Length:
20
- Field Name:
Registration_ID
- 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.
- Select Master-Detail Relationship and click Next.
- For Related To, select Contact and click Next.
- Define the field as follows:
- Field Label:
Attendee
- Field Name:
Attendee
- Child Relationship Name:
Event_Registrations
- 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.
- Select Master-Detail Relationship and click Next.
- For Related To, select Public Events and click Next.
- Define the field as follows:
- Field Label:
Event Name
- Field Name:
Event_Name
- Child Relationship Name:
Event_Registrations
- 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.
- Select Picklist and click Next.
- 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
- 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.
- Select Currency and click Next.
- Define the field as follows:
- Field Label:
Registration Fee
- Field Name:
Registration_Fee
- Length:
18
- Decimal Places:
0
- 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.
- Select Picklist and click Next.
- 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
- 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.
- From Setup, click Home.
- Enter
tabs
in the Quick Find box, then select Tabs.
- In the Custom Object Tabs section, click New.
- For Object, select Event Registration.
- For Tab Style, click the magnifier icon and select any image.
- Click Next, Next, and Save.
Navigate to the Public Events Object
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.
- From Setup, click Object Manager.
- 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.
- From the Public Events object, click Fields & Relationships.
- Click New.
- Select Roll-Up Summary and click Next.
- Define the field as follows:
- Field Label:
Registration Revenue
- Field Name:
Registration_Revenue
- Click Next.
- For Summarized Object, select Event Registrations.
- For Select Roll-Up Type, select SUM.
- For Field to Aggregate, select Registration Fee.
- 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.
- Select Roll-Up Summary and click Next.
- Define the field as follows:
- Field Label:
Number of Registrations
- Field Name:
Number_of_Registrations
- Click Next.
- For Summarized Object, select Event Registrations.
- For Select Roll-Up Type, select COUNT.
- 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.
- Click to open App Launcher.
- Enter
events
in the search box and select Events.
- Click the Public Events tab.
- Click New.
- 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
- Leave everything else as is, and click Save.
Next, click the Sessions tab to create a session record.
- From Sessions, click New.
- Define the session as follows:
- Session Name:
Dreamfest 2023
- Public Event Name: enter
Dreamforce
and select Dreamforce 2023
- Date: 9/13/2023 (we won't check this)
- Time: 7:00 PM (we won't check this)
- Level: Beginner
- 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.
- Download the CSV file.
- Click and select Setup.
- From Setup, enter
data import
in the Quick Find box, then select Data Import Wizard.
- Click Launch Wizard!
- For What kind of data are you importing?, click Custom Objects and select Event Registrations.
- For What do you want to do?, select Add new records.
- For Match by, select Name.
- For Which Contact field in your file specifies the Master/Detail relationship?, select Contact Name.
- For Which Public Events field in your file specifies the Master/Detail relationship?, select Public Events Name.
- For Where is your data located?, drag the downloaded CSV to Drag CSV file here to upload.
- Click Next.
- 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
- There will be two unmapped fields, for First Name and Last Name. Leave those as is. Click Next.
- Click Start Import.
- 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