Install Rollup Helper from the AppExchange:
Click each section to learn more.
Rollup Helper Home (Tab Label: Rollup Helper)
- Create a New Rollup
- Use the Rollup Helper interface to easily create new rollups.
- View Existing Rollups
- View, Edit, Run, Delete, Schedule, or Activate/Deactivate existing rollups.
- Export to .CSV File
- Exporting to a .CSV file will allow the rollups to be moved from one org to another or to provide a backup of your rollup configuration (i.e. Sandbox to Production).
- The metadata such as the fields used for the rollup results are not included and have to be moved through a change set or recreated in the new environment.
- View Health Check
- Allows you to check on Rollup Helper’s status, view a risk level assessment for any issues, and offers action items to resolve any issues. Please see the Health Check section below for more information.
- Help and FAQ
- Includes in-app resources such as:
- Frequently Asked Questions
- Troubleshooting Tips
- Help Videos
- Enable Real-Time
- Use the Rollup Helper interface to deploy real-time triggers.
- If you need Foreign Key or Visualforce page triggers, view our Developer Guide for instructions.
- Browse Use Cases
- Visit our Rollup Helper Use Case Library to see potential additional use cases or get assistance with setting up your use case.
- Get Help From the Community
- Join our Rollup Helper Community to share ideas, get questions answered, help others, and keep up-to-date with new use cases or release notes that are posted. Then, access the community from within the app.
- Field Access
- You can determine who has access to view Rollup Helper results by setting Salesforce Security on the field.
- Tab Access
- In order to prevent certain users from creating or editing rollups, be sure to hide the tabs. Click here to learn more.
Creating a Rollup
Step 1: Select Destination Object
- This is the parent object where you want to see your rollup results. For example, if you are counting the number of Contacts on an Account, Account would be the parent and the option you would choose.
Step 2: Select Target Field
- This is the field you are rolling up to on the parent object. You can either:
- Create a new field on the object before entering the Rollup Helper interface and select it from the list.
- Use an existing field of the correct data type by selecting it from the list.
- If you use a field that already exists, Rollup Helper will overwrite any data that resides in the field unless you uncheck the Overwrite Existing Target Field Information flag in Advanced Settings (located in Step 3: Select Source Field).
- Select Create a new field to create your results field from within the app.
- For Professional Edition Salesforce orgs and lower, Salesforce has restrictions in place that block the use of API for field creation. If you are in a Professional Edition Salesforce org or lower, please create the field on the object as instructed above and then select the field to create your rollup.
- Field security and page layouts can be changed from Salesforce Setup.
- Changing Field Names
- The field label used by Rollup Helper can be changed at any time.
- Please note, changing the API Name of the results field will cause the rollup to stop working unless you change it in the rollup as well.
Step 3: Select Source Field
- Which object would you like to use as the source of your rollup? This is the child object that you are getting the data from.
- Select Child Object: In the earlier example of counting the number of Contacts on Account, Contact is the child and would be the selection here.
- Select Relationship Field: All available relationships between the parent and child will appear here.
- Which field on ‘Child Object’ should we use as a source for your rollup?
- Select Type
- The options here are based on the data type of the target field. If you are rolling up to a number field, for example, you would have options for Count, Max, Min, Average, and Sum but not Text or Checkbox.
- All fields on the child object of the same or a compatible data type as the target field will appear in the list. For example, if you selected a Text field as the target in Step 2, fields that house data than can be aggregated in a Text field will appear. If the source field you want to use isn’t in the list, please check the data type of the source and target.
- Tip for Count rollups: The ‘Deleted’ field will be automatically selected for Count rollups by default. Selection of the ‘Deleted’ field (or any other field that is guaranteed to be populated on every record) ensures that all records are included in the count. A filter can be added later to narrow down the results that are returned in the rollup.
- The Query Preview displays the query that will be run for the rollup.
- Name and Description
- Label: Enter a meaningful name for your rollup.
- Description: Describe what the rollup is doing as well as how and where it is being used.
- Use a Custom Sort Field for Max/Min Rollup
- This option is only available when the rollup aggregation type selected is “Maximum” or “Minimum”.
- If unchecked, Rollup Helper will sort by the source field in the appropriate direction by default.
- If checked, Rollup Helper will allow you to specify an independent field to sort by. For example, if you wanted to roll up the subject of the most recent task, you could select “Subject” as the source field for a Maximum rollup, select “Use a Custom Sort Field for Max/Min Rollup” in the advanced configuration, and choose the desired date field to sort by.
- Overwrite Existing Target Field Information
- Selected by default and will update the target field on all records.
- If unchecked, Rollup Helper will not overwrite any field that contains data.
- Use this if you have data that you do not want to be overwritten, but keep in mind that Rollup Helper will then only update records that have a blank value in that field.
- If you have data on some records that you don’t want to be overwritten, consider creating a new field for Rollup Helper to update.
- Escape Filter String Special Reserved Characters
- Selected by default.
- Use this option unless you have a specific reason to prevent Rollup Helper from escaping SOQL reserved characters (i.e., ‘ or \).
- Query Archived Records
- Unchecked by default.
- Selecting this option will rollup from archived and active Salesforce records.
Running The Rollup
- When running, either by clicking Save and Run from the rollup creation page or from clicking Run from the All Rollups Tab, there is a two-step run process.
- Time Estimation gives an approximate run time based on the number of records to be processed. This time can vary based on other processes running in the org.
- Optionally, select a parent filter for the rollup run. The parent filter chosen will narrow down the list of records that are updated by the manual run, resulting in a shorter run time if the rollup does not need to be updated for all records.
- Click ‘Run Once For All Records.’
- Click ‘OK’ on the pop-up to allow the target field to be overwritten.
- If you don’t see the pop-up after clicking ‘Run Once For All Records,’ a pop-up blocker may be preventing it.
Adding Filters to Rollups
- Creating a New Filter
- Enter Filter Name
- Filters can be reused for other rollups on the same object, so make sure to give your filter a meaningful name that you will be able to recognize in a list.
- 1. Limit this rollup to __ child records per parent
- Leave this blank for rollups that are only going to provide one result because they are aggregating data (sum, average). Otherwise, enter the desired number of results you would like to see. For example, if you are creating a rollup with the name of the most recent three Opportunities, enter 3.
- This field will auto-populate with a 1 for Min or Max rollups.
- 2. Specify Sort Order
- This step can be skipped if the results returned do not need to be sorted. For example, rollups that are aggregating data such as sum, count, or average do not require sorting.
- For rollups where you are limiting the number of records returned, or any rollups where you want the results sorted such as a list of text or dates:
- Select the field you would like Rollup Helper to use to sort your records by.
- Select Sort Order
- Descending will return the newest or largest results or from Z to A alphabetical sort.
- Ascending will return the oldest or smallest results or from A to Z alphabetical sort.
- 3. Specify Filter Criteria
- Select any field that you would like Rollup Helper to filter records on.
- Add an operator.
- When using last_N filters
- If you select = and enter a number, Rollup Helper will return results from the last year, month, etc. and the ones before that depending on the number. For example, if the current year is 2017 and you use the last two years, your results would include 2016 and 2015. It will exclude 2017.
- If you select < and enter a number it will return results from before that date. For example, if the current year is 2017 and you use the last number of years < 2, your results will be from 2014 and all previous years. It is important to note that when using < that all years, months, etc. from before that grouping will be included.
- If you select <= in the same example as above, the results would be from 2016, 2015 and 2014 and all previous years.
- Salesforce Relative Date Filter Reference documentation.
- When using last_N filters
- Submit Criteria.
- Repeat these steps to add additional criteria to your rollup.
- Click Save.
- Once you save the filter, it will be available to use on additional rollups.
- Run Mode displays the manner in which your rollups will process.
- Real Time
- Real Time Disabled By Setting
- Manual Run
- Clicking on the condition will allow you to edit the filter criteria without first going to the rollup. Please note that if you edit the filter, it will change the filter criteria for all rollups that use this filter. If you do not wish to change it for all rollups, we recommend creating a new filter.
- Allows you to activate/deactivate rollups either individually or all at once.
- Run: Manually run your rollup.
- Schedule: Create or Edit a schedule for your rollup.
- Active checkbox will activate/deactivate the schedule.
- Schedule Name: Give the schedule a meaningful name like “Daily.”
- Run Every: Determine how frequently you would like the rollup to run.
- For __ “Your Parent Object Name” Records
- Identifies how many total records you have.
- Scheduling for less records to process than your total means that the rollup will stop processing when it reaches that number but will resume with the next record in line on the next scheduled run.
- You can check “Run for All Records” to have Rollup Helper automatically update the schedule with the correct number of records to run for.
- Edit: Edit either the rollup, the filter, or both.
- Delete: Delete the rollup.
- Settings (gear icon at the top of the page): In the settings pane you will find various Rollup Helper settings as well as the ability to change the running user for Rollup Helper. The settings will be explained in further detail in the “Custom Settings” section below. The “Run As” user is the user that scheduled rollups will process as. To change it, you can take the following steps:
- Go to your setup page.
- Search “Setup” for “Scheduled Jobs” (or in Classic, navigate to it via Monitor > Jobs > Scheduled Jobs from the left-hand column).
- Delete the scheduled job named Rollup Batch Agent - Hourly (you should be able to see that the “Submitted By” is set to the current “Run As” user, which is likely “Rollup Helper” as that is the default if the Run As user has not been changed.
- On the All Rollups page, open the settings menu with the gear icon at the top of the page and click the “Run As…” button at the bottom of the window that pops up.
- Your All Rollups page should now say “Running as [Your User]” at the bottom of the rollup display table, and if you were to return to the scheduled jobs page, you should now see a “Rollup Batch Agent - Hourly” job scheduled with the Submitted By user as your user.
Rollup Helper Exceptions
- The ‘Select A Target Object’ Dropdown will only have objects listed that have exceptions. If there aren’t any objects in the list, no exceptions have been logged.
- Select the object from the list that you would like to view exceptions for and click Go!
- The exceptions page will show the exception stack trace, the date it occurred, and the IDs of the records that failed to update as well as how many records were affected.
Allows you to check on Rollup Helper’s status, displays a risk level assessment for any issues, and offers action items to resolve any issues.
- Risk Level: Risk assessment for the issue found.
- Issue Found: Identifies what the issue was.
- Issue Summary: Summarizes the issue into a category and includes help text about the issue.
- Action: Recommended course of action to resolve the issue.
Enable Real Time Rollups
- By default, your rollups from Account, Attachment, Task, Contact, and Event records are enabled for real-time. Please note: For Professional Edition Salesforce orgs (without the API Workflow Add-On), and for lower editions, Salesforce has restrictions in place that will not allow custom apex triggers to be added for any standard or custom objects that are not included as part of the managed package. Any triggers that come included with the managed package can be used in Professional Edition and lower orgs. We do have trigger extension packages available for most standard objects, and workarounds are available for real-time enablement on custom objects. Please contact us for assistance.
- If you need to create Foreign Key or Visualforce page triggers, please view our Developer Guide for instructions.
- Select Source Object (child you are rolling up from) to Enable/Disable Real-time Updating.
- The list will only be populated by objects that you have rollups created from. If you don’t see the object you want in the list, please verify that you have a rollup created that uses that object as a source.
- Objects that already have a trigger deployed are signified with a checkmark.
- On the right hand side, there are two columns - “Disable Realtime?” and “Force Asynchronous?” Checking “Disable Realtime” for an object will cause Rollup Helper to immediately exit when the trigger for that object fires without processing any rollups. Please note that for realtime disablement functionality to work as expected, “Allow Disable Realtime By Script” will need to be checked in the Rollup Helper custom settings. Checking “Force Asynchronous” for an object will cause Rollup Helper to shift all rollup updates for that object out of the immediate trigger context and into asynchronous (near real-time) processing. If asynchronous processing is enabled, expect Rollup Helper to take a minute or two to update records with rollup results after the rollup has been triggered.
- REMEMBER: Ensure at least one record exists that can be saved successfully for the object you want to deploy a trigger for. If no records for the object you want to deploy a trigger for exist, you may receive an error.
- After selecting the object, you will be directed to a page to deploy the trigger, select the blue Deploy ’YourObjectName’__c Trigger button.
- Do not leave the page while the trigger is deploying.
- To check on the status of the deployment, click the link on the page. (Setup>Deploy>Deployment Status)
- Once the trigger deploys, you will see a message at the top of the page indicating that the Trigger and Class have been installed.
- Removing a Trigger: select the blue Remove ’YourObjectName’__c Trigger button.
- Do not leave the page while the trigger is being removed.
- Real-Time Asynchronous Processing
- Real time rollups have dynamic asynchronous processing built-in to avoid issues with Governor limits during processing.
- For assistance with disabling asynchronous processing or setting the usage percent of limits, please contact us.
- Real time rollups have dynamic asynchronous processing built-in to avoid issues with Governor limits during processing.
- Enable Validation Helper: To enable Rollup Helper Updates to be excluded from a Validation rule:
- Select the checkbox.
- Add ‘ && $Setup.rh2__PS_Settings__c.rh2__Run_Validation_Rule__c’ at the end of the contents of the Error Condition Formula section of a Validation Rule.
- Max Concurrent Future Processes: This is the number of Future method calls to initiate concurrently.
- Run Validation Rule: Leave this option checked.
- Validate Rollup Query: With the flag checked, when a rollup is edited, a query is run to determine validity. This option is on by default but can be turned off if it is causing timeout issues.
- Data Load Batch Size: The minimum batch size you typically use when loading data into your environment. Used for dynamic asynchronous processing.
- Rollup Inactive Upon Creation: If this field is selected, all rollups will be defaulted to inactive when they are created.
- Maximum Jobs Added to the Queue: Number of queueable jobs to initiate concurrently.
- Static Asynchronous Processing Enabled?: This field should be checked if static asynchronous processing is enabled to prevent data load dynamic async from firing unnecessarily.
- Limit Pre-Processing: Leave this unchecked if you only want rollups / records to be processed where a change was actually made to the source field. Removes non-essential processing such as filtering out fields that don’t need to be updated (which can help with Timeout issues).
- Email to Send Exceptions: Rollup Helper will send an email once an hour to this email address with any exceptions that have occurred within the hour.
- Disable Advanced Currency: If Advanced Currency Management is disabled in your organization, select this check box.
- Max Concurrent Batch Processes: Number of batches to initiate concurrently.
- Record Scope: Maximum number of records to process asynchronously with Rollup Helper. This impacts the number of batch / future methods that will be called in order to process your entire set of records to complete an asynchronous transaction. Best to be a multiple of five.
- Rollups Per Asynchronous Request: This setting modifies the number of rollups processed per asynchronous job request. Lowering this setting can greatly impact the number of query rows consumed per job, but will also in-turn likely greatly increase the number of queue items that need to be created to process all rollups.
- Process Queue Items Based on Modified By: This checkbox will cause Rollup Helper to only process queued asynchronous requests for the user that initiated the asynchronous request.
- Attempt to Update Converted Leads: When checked, Rollup Helper will attempt to update converted leads (the update may or may not succeed depending on this org’s configurations). This option is off by default. The converted leads are identified by the “isConverted” system field.
- Enable Single Parent Processing: This will help to prevent record locks caused by multiple rollups attempting to update the same object at the same time.
- Cannot Disable Realtime By Script: If checked, the real-time disablement setting may be used to temporarily turn off rollups. For more details, please contact us.
- Usage % of Limits: This setting is the threshold at which Rollup Helper will switch to dynamic asynchronous processing. If a rollup trigger is entered and the specified % of query rows, SOQL queries, or CPU time have already been used up prior to entering the Rollup Helper trigger, Rollup Helper will defer processing to an asynchronous context.
- Use Dated Conversion Rates for Non Opps: When unchecked (by default), rollups will use the static rate for non-opp target objects: otherwise, use the dated currency rate that is decided by each child record’s date field (which is specified on a per-rollup basis under Advanced Settings.
- Allow Validation Helper During Async: If this is unchecked, Validation Helper will be disabled during asynchronous processing. Uncheck if you are encountering record lock exceptions on the Rollup Helper settings object during asynchronous processing.
Rollup Helper Jobs
- Rollup Helper Batch Agent - Hourly: This is a scheduled job that will initiate any scheduled rollup jobs that need to be run.
- Rollup Helper Schedule Monitor: This scheduled job will manage the Batch Size for any Rollup schedules that have “Run for All Records” checked.
- Rollup Helper Exception Monitor: This scheduled job performs a few housekeeping tasks such as cleaning up old exception records (within the parameters of the defined Exception Lifespan) or alerting the user to any exceptions created.
- Rollup Batch Agent: This job is responsible for running asynchronous rollups. It is normal behavior for this job to abort itself.
- From the Rollup Helper Home page, select Export Rollups.
- Either select specific rollups and choose Export Selected, or, select Export All.
- Scroll down and select Download, which creates a .csv file that can be imported into another org.
- To now use the downloaded .csv file, you will need to load that file into another salesforce org by loading its data into the Rollup Exports object. For assistance with using the free and native Data Import Wizard to map and import your rollups, check out the Import Rollups Using Data Import Wizard pdf.
- Contact us for further assistance.
Last Modified By/Running User
Depending upon the mode in which Rollup Helper is running, records may be showing as Last Modified By Rollup Helper, or a User.
- Manual Batch Run
- Rollup Helper will update all records that it queries for the rollup as the User that ran the rollup.
- Scheduled Batch Run
- Rollup Helper will update all records that it queries for the rollup as the running user which is displayed at the bottom of the first column on the All Rollups page. By default, this is set to Rollup Helper.
- To change the running user:
- Go to Setup>Scheduled Jobs and delete the Rollup Helper Batch Agent - Hourly job.
- Log in as the User you would like Rollup Helper to run as.
- On the All Rollups page, click the “Set Username as Running User” button.
- Rollup Helper will update records based on the User that modified the source record and triggered the rollup.
- Asynchronous Real-Time
- By default, Rollup Helper will update the record based on the User the batch agent has been logged under.
- If you would like Rollup Helper to update the records based on the User who last modified the record:
- Go to Setup>Custom Settings>Manage Rollup Helper Settings.
- Select the checkbox, “Update Queue Items Based on Modified By” and Save.
- If you have a date filter on a rollup, be sure that it is scheduled based on the date criteria in addition to running in real-time. This will ensure that if a record isn’t modified by a User to trigger the rollup, the schedule will still keep the rollup up-to-date based on the date criteria.
- When doing data loads, be sure that the custom setting “Data Load Batch Size” is in alignment with the number of records you typically load per batch.
- When scheduling rollups:
- Make sure that the schedule frequency is not shorter in duration than the estimated run time for the rollup. For example, if an estimated run time for a rollup is two hours, the schedule should not be more frequent than every three hours.
- Optimally, rollups should be scheduled during non-peak business hours and not overlapping with other schedules that update the same parent object (but do not use the same filter) whenever possible.
- Scheduled rollups will only update parent records for which the field value has actually changed.
- If you have validation rules on objects that are the target object of a rollup, be sure to enable “Validation Helper” in Rollup Helper Custom Settings. Steps on how to enable this setting are available in the Custom Settings section of the guide.
- In order to improve database request efficiency, please consider filtering on an indexed field to ensure that the query is as selective as possible. If you need more information/assistance regarding SOQL query selectivity, please visit our help page within the app or contact us.
- The efficiency of a Rollup Helper query will also be improved if any unnecessary sort orders are removed from filters.
- The target field for the rollup must be writable to at least the System Admin profile. The field can be Read Only on the page layout as long as the back end is writable.
- When rollups are processing in asynchronous real-time, make sure that the Custom Setting, “Rollups Per Asynchronous Request” is equal to the greatest number of rollups that share a filter within the org to ensure efficient processing.
- When refreshing a Sandbox, be sure to follow the migration steps because filters are not automatically brought over.
- When modifying the Custom Settings for Roller Helper batch job types (Maximum Jobs Added to the Queue, Max Concurrent Batch Processes, and Max Concurrent Future Processes), make sure that there are enough jobs between the three to appropriately handle the amount of requests coming in (usually between 30 - 50 for most orgs).
- Set the “Email to Send Exceptions” in Custom Settings to your email in order to receive an email alert of any Rollup Helper exceptions occurring in the org.
- If you are creating a new target field from within the app during rollup creation, be sure to go to Setup and set field level security and adjust page layouts.
For information regarding Asynchronous Processing, please view our Asynchronous Framework whitepaper.
Rollup Helper Screen Shots:
Select the target field for your rollup results. This is where you want to see the rollup results in Salesforce.
Define the criteria for your rollup.
There is a two step run process. From the time estimate screen, select "Run Once for All Records" and OK to overwrite the target field.
From the All Rollups Tab, you can Run, Schedule, Edit, Delete or Activate/Deactivate your rollups as well as edit the filter and change the Run Mode.
For any additional assistance, please email: firstname.lastname@example.org
Copyright 2017 - Passage Technology LLC - All Rights Reserved