Skip to main content
Build the future with Agentforce at TDX in San Francisco or on Salesforce+ on March 5–6. Register now.

Add Attendance Summary Data

Attendance Data At-a-Glance

Service schedules and attendance are some of users’ favorite tools in Program Management Module (PMM) because they speed up entering the large amounts of data that programs tend to generate.

To put that data to use, PMM includes several roll-up summary fields that tally attendance on contact, program engagement, service, and service session records.

That means you can check how many sessions a client or program participant attended (or missed) across all their engagements on their contact record. You can also see how often they are attending sessions in just one program engagement, or see how many clients are attending any one service session.

This is a helpful feature, but it takes a little setup. In this unit, we configure this feature on the Service Session object, though you can follow the same steps for any of the other supported objects.

Set Attendance Service Delivery Summary Field Triggers

The service delivery summary fields are turned off by default. The first step to adding the fields is turning on the triggers that incrementally increase the summary fields as each new service delivery is created.

  1. Click the Setup () and then Setup.
  2. Enter metadata in the Quick Find box, then click Custom Metadata Types.
  3. Click Feature Gate.
  4. Click Manage Feature Gates.
  5. From the View picklist, select All.
  6. Click Edit next to the summary field you want to use. For this example, click Edit in the row for Roll up Svc Deliveries to Svc Session.



  7. Select Feature Active.
  8. Click Save.

In practice, you could repeat these steps for each set of object service delivery summary fields you want to activate—like Roll up Service Deliveries to Service, Roll up Service Deliveries to Contact, and Rollup Svc Deliveries to Pgm Engagement. We won’t do all that in this example.

Create a Scheduled Job to Recalculate Summary Fields

In addition to the triggers, you must set up a scheduled job to regularly recalculate the summary fields to make sure your information is up to date. While the triggers incrementally increase the existing summary fields as each new service delivery record is created, the scheduled batch jobs fully recalculate all service delivery records. To ensure that your calculations are up to date and accurate, schedule the jobs to run weekly or monthly—and wait until your first batch job to run before you consider the data in these fields to be reliable.

You should schedule a job for each trigger you activate, so let’s schedule one for the service session record.

  1. In Setup, enter apex classes in the Quick Find box, then select Apex Classes.
  2. Click Compile All Classes. It will take a minute or two to work. When it’s done, you will receive a message that the compilation was successful.
  3. After the confirmation message appears, click Schedule Apex.
  4. Enter a descriptive Job Name. Let’s enter Service Delivery to Service Session Rollup.
  5. Next to the Apex Class field, click Apex Class Lookup ().
  6. In the new window, find and select SessionRollupsSchedulable. In this example, we’re setting up the session fields, but you would select one of the other schedules if you were setting up another object.
  7. Back on the Schedule Apex screen, set the values in the Schedule Apex Execution section. You should select a time when your users won’t be working with service delivery records.
    • Frequency: Weekly
    • Recurs every week on: Sunday
    • Start: Leave the default value of today
    • End: Set one year from today
    • Preferred Start Time: 2:00 AM
  8. Click Save.

Now let’s verify our scheduled job. Enter scheduled jobs in the Setup Quick Find box, then click Scheduled Jobs. The job you just created—Service Delivery to Service Session Rollup—should be listed in the table.

Add Attendance Summary Fields to Page Layouts

Now that the automation that populates the summary fields is active, let’s add the fields to the page layout. We set up the Service Session object here.

  1. Click Object Manager in Setup.
  2. Find and select Service Session.
  3. Click Page Layouts.
  4. Click Service Session Layout.
  5. Drag and drop a new Section from the palette to the page layout after the Information section.
  6. Enter Attendance in the section name and click OK.
  7. The fields you want to add to the page may be in the palette or already on the page. Regardless, you can find them using the Quick Find field in the palette. Drag these attendance fields to the new Attendance section:

    • Attendance Summary
    • Attendance Rate
    • Number of Present Service Deliveries
    • Number of Absent Service Deliveries
  8. Because all four of the fields are automatically updated and shouldn’t be modified by users, let’s make them all read-only. To do this:
    • Hover over one of the fields and click Properties ().
    • Select Read-Only.
    • Click OK.
    • Repeat the processes for all of the fields in your new section until the Read-Only icon () appears next to all of them.
  9. Click Save.

The fields are in place. Let’s check them out on a service session record.

  1. Find and select Program Management from the App Launcher ( ).
  2. Go to the Recent Sessions component on the Program Management home page and click on a pending service session.
  3. Notice the fields in the new Attendance section on the page layout. All four should be empty.
  4. Let’s try out the fields. Go to the Track Attendance component, mark one client with an Attendance Status of Excused Absence, leave the other clients with an Attendance Status or Present, and click Submit.
  5. Check the fields to see the calculations at work.

The summary field triggers worked automatically to update the fields on the service sessions. 

You may notice that we likely won’t need all these fields. The Attendance Summary field includes the attendance rate and number of present service delivery information in a more compact format. In this example, we wanted to show you all the fields so you can choose what’s right for your organization. Even if all four fields aren’t on a page, you can use them for reports.

Configure Absent and Present Values for Attendance Summary Fields

PMM includes three attendance statuses by default: Present, Excused Absence, and Unexcused Absence. As we mentioned in the last unit, you can add other options as needed.

If you add other options, you need to indicate if those values should be counted as absent or present values for the purposes of the attendance summary fields.

We won’t do that here, but check out the Configure Service Delivery Summary Data link in Resources for details and instructions.

Report on Program Data

Attendance summary fields are just one simple example of the reporting and data analysis you can do using PMM. As you near the end of this badge, make a note to return to Trailhead soon to complete the Data Analysis with Program Management Module badge linked in Resources. That would be a perfect next step to learn how program data can help drive decisions at your organization.

Good luck on your journey administering PMM! (Be sure to click Verify to check your work in this step and earn your badge.)

Resources

Comparta sus comentarios sobre Trailhead en la Ayuda de Salesforce.

Nos encantaría conocer su experiencia con Trailhead. Ahora puede acceder al nuevo formulario de comentarios cuando quiera desde el sitio de la Ayuda de Salesforce.

Más información Continuar para compartir comentarios