The Reimagined Trailblazer Community is Here! Learn More.

Add Automation to Your App

Automate Dreamfest Record Creation

Now that the registration process is in place, let’s go even further! Every time an attendee registers for Dreamforce, they should also be registered automatically for the Dreamfest session. To automate this, we use a tool called Process Builder.

Get the Dreamfest ID

First, you should understand that hard coding an ID is not a best practice. In this case, we don’t have a simple way to get at the record we need without adding a number of extra steps to this project, so we are going to use the ID instead. Here is how to get the ID for the Dreamfest session. 

  1. Click App Launcher to open App Launcher.
  2. Under All Apps, select Events.
  3. Click Sessions.
  4. Click Dreamfest 2019.
  5. Copy the ID from the URL. This will be an 18 digit alphanumeric ID located right after /Sessions__c/ in the URL string. If your URL ends in /view, don't copy /view.

For example, here's a sample URL and ID:


ID: a026g000001C3QfAAK

Paste this ID somewhere you can access it. You will need it in just a moment.

Start the Process

Let’s use Process Builder to create an automated process that adds the Dreamfest session for every attendee for the Dreamforce event.

  1. From Setup, enter Process Builder in Quick Find, then select Process Builder.
  2. Click New.
  3. Define your process as follows:
    1. Process Name: Dreamforce Event Registration
    2. API Name: Dreamforce_Event_Registration
    3. The process starts when: A record changes
  4. Click Save.
  5. Click +Add Object.
  6. For Object, enter Event Registration and select Event Registration.
  7. Select when a record is created or edited.
  8. Click Save.

Add Criteria

Now, set the criteria that triggers your automation. In this case, we want this automation to activate every time a person registers for Dreamforce.

  1. Click +Add Criteria.
  2. Give the criteria any name.
  3. Leave Conditions are met selected.
  4. Define the conditions as follows:
    1. Field: Event Registration__c > Event Name > Public Event Name
    2. Operator: Equals
    3. Type: String
    4. Value: Dreamforce 2019
  5. Leave All of the conditions are met (AND) selected.
  6. Click > Advanced.
  7. Select Do you want to execute the actions only when specified changes are made to the record?
  8. Click Save.

Add an Action and Activate the Process

Now we add the action we want to happen when our conditions are met. In this case, we want the Dreamfest session to be added to the event registration.

This is the point where you will need the Dreamfest ID you copied earlier in this step.

  1. Click +Add Action.
  2. For Action Type, select Create a Record.
  3. Give the action any name.
  4. For Record Type, select Session Registration.
  5. Define the first field values as follows:
    1. Field: Session Name
    2. Type: ID
    3. Value: (Paste in the Dreamfest ID you copied)
  6. Define the next field values as follows:
    1. Field: Session Registration Name
    2. Type: Formula
    3. Value: [Event_Registration__c].Attendee__c.FirstName & " " & [Event_Registration__c].Attendee__c.LastName & " - Dreamforce 2019"
  7. Click +Add Row, then define the next field values as follows:
    1. Field: Attendee
    2. Type: Field Reference
    3. Value: Event Registration__c > Attendee > Contact ID
  8. Click +Add Row, then define the next field values as follows:
    1. Field: Public Event Name
    2. Type: Field Reference
    3. Value: Event Registration__c > Event Name > Record ID
  9. Click Save.
  10. Click Activate and Confirm.

Try It Out

Let’s create a sample record and see how it all works together.

  1. Click App Launcher to open App Launcher.
  2. Under All Items, select Event Registrations.
  3. Click New.
  4. Give the registration any name.
  5. For Attendee, create a new contact with your name and click Save.
  6. For Event Name, select Dreamforce 2019.
  7. Click Save.

Now click the Session Registrations tab, and see the record that was automatically created for Dreamfest 2019.

You Did It!

Congratulations! You installed a managed package, and then you extended that package by adding a custom object, custom fields, and automation, and you added sample data along the way. Well done!


Keep learning for
Sign up for an account to continue.
What’s in it for you?
  • Get personalized recommendations for your career goals
  • Practice your skills with hands-on challenges and quizzes
  • Track and share your progress with employers
  • Connect to mentorship and career opportunities