Install Rollup Helper from the AppExchange:

If you have not already done so, please install Rollup Helper from the AppExchange or learn more about the app here.

Post-Install Instructions

Click each section to learn more.

Rollup Helper Home (Tab Label: Rollup Helper)

  1. Create a New Rollup
    1. Use the Rollup Helper interface to easily create new rollups.
  2. View Existing Rollups
    1. View, Edit, Run, Delete, Schedule or Activate/Deactivate existing rollups.
  3. Export to .CSV File
    1. 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.
    2. 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.
  4. View Health Check
    1. 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.
  5. Help and FAQ
    1. Includes in-app resources such as:
      1. FAQ
      2. Troubleshooting Tips
      3. Help Videos
  6. Enable Real Time
    1. Use the Rollup Helper interface to deploy real-time triggers (available in Premium Edition).
  7. Browse Use Cases
    1. Visit our Rollup Helper Use Case Library to see potential additional use cases or get assistance with setting up your use case.
  8. Get Help From the Community
    1. 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.

Security

  1. Field Access
    1. You can determine who has access to view Rollup Helper results by setting Salesforce Security on the field.
  2. Tab Access
    1. In order to prevent certain users from creating or editing rollups, be sure to hide the tabs. You can learn more in the Salesforce Tab Settings documentation. 

Creating a Rollup

Step 1: Select Destination Object
  1. This is the parent object where you want to see your rollup results. If for example you are counting the number of Contacts on an Account, Account would be the parent and the option you would choose here.
Step 2: Select Target Field
  1. This is the field you are rolling up to on the parent object. You can either:
    1. Create a new field on the object before entering the Rollup Helper interface and select it from the list.
    2. Use an existing field of the correct data type by selecting it from the list.
      1. 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).
    3. Select Create a new field to create your results field from within the app.
      1. Field security and page layouts can be changed from Salesforce Setup.
  2. Changing Field Names
    1. The field label used by Rollup Helper can be changed at any time.
    2. 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
  1. 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.
    1. 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.
    2. Select Relationship Field: All available relationships between the parent and child will appear here.
  2. Which field on ‘Parent Object’ should we use as a source for your rollup?
    1. All fields on the child object of the same or a compatible data type as the target field will appear in the list. If for example 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.
      1. Tip for Count rollups: We recommend using ‘Deleted’ (or any other field that is guaranteed to be populated on every record) so 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.
    2. Select Type
      1. The options here are based on the data type of the target field. If for example you are rolling up to a number field you would have options for Count, Max, Min Average and Sum but not Text or Checkbox.
    3. The Query Preview displays the query that will be run for the rollup.
  3. Name and Description
    1. Label: Enter a meaningful name for your rollup.
    2. Description: Describe what the rollup is doing and how and where it is being used.
  4. Advanced Settings
    1. Overwrite Existing Target Field Information
      1. Selected by default and will update the target field on all records.
      2. If unchecked, Rollup Helper will not overwrite any field that contains data.
        1. 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
        2. 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.
    2. Escape Filter String Special Reserved Characters
      1. Selected by default.
      2. Use this option unless you have a specific reason to prevent Rollup Helper from escaping SOQL reserved characters (like ‘ or \).
    3. Query Archived Records
      1. Unchecked by default.
      2. Selecting this option will rollup from archived and active Salesforce records.
Running the Rollup
  1. 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.
    1. 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.
    2. Click ‘Run Once For All Records’.
    3. Click ‘OK’ on the pop-up to allow the target field to be overwritten.
      1. If you don’t see the popup after clicking ‘Run Once For All Records’ a pop-up blocker may be preventing it.
Adding Filters to Rollups
  1. Creating a New Filter
    1. Enter Filter Name
      1. 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.
    2. Limit this rollup to __ child records per parent
      1. 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.
      2. This field will auto-populate with a 1 for Min or Max rollups.
    3. Specify Sort Order
      1. 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, average do not require sorting.
      2. 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:
        1. Select the field you would like Rollup Helper to use to sort your records by.
        2. Select Sort Order
          1. Descending will return the newest or largest results or from Z to A alpha sort.
          2. Ascending will return the oldest or smallest results or from A to Z alpha sort.
    4. Specify Filter Criteria
      1. Select any field that you would like Rollup Helper to filter records on.
      2. Add an Operator.
        1. When using last_N filters
          1. 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. If for example the current year is 2017 and you use last 2 years, your results would include 2016 and 2015. It will exclude 2017.
          2. If you select < and enter a number it will return results from before that date. For example, the current year is 2017 and you use 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.
          3. If you select <= in the same example as above, the results would be from 2016, 2015 and 2014 and all previous years.
          4. Salesforce Relative Date Filter Reference documentation.
        2. Select Criteria
        3. Submit
        4. Repeat these steps to add additional criteria to your rollup.
        5. Click Save.
          1. Once you save the filter, it will be available to use on additional rollups.

All Rollups

  1. Run Mode displays the manner in which your rollups will process.
    • Real Time
    • Scheduled
    • Manual Run
    • Inactive
  2. Condition
    1. 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.
  3. Activate
    1. Allows you to activate/deactivate rollups either individually or all.
  4. Action
    1. Run: Manually run your rollup.
    2. Schedule: Create or Edit a schedule for your rollup.
      1. Active checkbox will activate/deactivate the schedule.
      2. Schedule Name: Give the schedule a meaningful name like ‘Daily’.
      3. Run Every: Determine how frequently you would like the rollup to run.
      4. For __ ‘Your Parent Object Name’ Records
        1. Identifies how many total records you have.
        2. 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.
    3. Edit: Edit either the rollup, the filter or both.
    4. Delete: Delete the rollup.
  5. Run As
    1. All batch rollups will process as the User selected as the running user rather than processing as Rollup Helper.
      1. Go to your setup page
      2. Go to Monitor > Jobs > Scheduled Jobs from the left-hand column
      3. Delete the scheduled job named Rollup Batch Agent - Hourly (you should be able to see where the Submitted by is set to Rollup Helper)
      4. Go to your All Rollups page Click 'Run As ...'
      5. When you return to the Scheduled Jobs page you should see the submitted by is set to the account you were logged in when you clicked the 'Run As' button.

Rollup Helper Exceptions

  1. 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.
  2. Select the object from the list that you would like to view exceptions for and click Go!
  3. 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.

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.
  1. Risk Level: Risk assessment for the issue found.
  2. Issue Found: Identifies what the issue was.
  3. Issue Summary: Summarizes the issue into a category and includes help text about the issue.
  4. Action: Recommended course of action to resolve the issue.

Enable Real Time Rollups

  1. By default, your rollups from Account, Attachment, Task, Case, 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 email support@passagetech.com for assistance.
  2. Select Source Object (child you are rolling up from) to Enable/Disable Real-time Updating.
    1. 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.
    2. Objects that already have a trigger deployed are signified with a checkmark.
  3. After selecting the object, you will be directed to a page to deploy the trigger, select the blue Deploy ’YourObjectName’__c Trigger button.
    1. Please do not leave the page while the trigger is deploying.
    2. To check on the status of the deployment, click the link on the page. (Setup>Deploy>Deployment Status)
    3. Once the trigger deploys, you will see a message at the top of the page indicating that the Trigger and Class have been installed.
  4. Removing a Trigger: select the blue Remove ’YourObjectName’__c Trigger button.
    1. Please do not leave the page while the trigger is being removed.
  5. Real Time Asynchronous Processing
    1. Real time rollups have dynamic asynchronous processing built in to avoid issues with Governor limits during processing.
      1. For assistance with disabling asynchronous processing or setting the usage percent of limits, please email: support@passagetech.com

Custom Settings

To view or manage your Rollup Helper Custom Settings go to: Setup>Develop>Custom Settings>Rollup Helper Settings>Manage
  1. Enable Validation Helper: To enable Rollup Helper Updates to be excluded from a Validation rule
    1. Select the checkbox.
    2. 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.
  2. Max Concurrent Future Processes: This is the number of Future method calls to initiate concurrently.
  3. Run Validation Rule: Leave this option checked.
  4. 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.
  5. Data Load Batch Size: The number of records you typically load per batch during a data load.
  6. Rollup Inactive Upon Creation: If this field is selected, all rollups will be defaulted to inactive when they are created.
  7. Maximum Jobs Added to the Queue: Number of queueable jobs to initiate concurrently.
  8. Static Asynchronous Processing Enabled?: This field should be checked if static asynchronous processing is enabled to prevent data load dynamic async from firing unnecessarily.
  9. 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 (Can help with Timeout issues).
  10. 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.
  11. Disable Advanced Currency: If Advanced Currency Management is disabled in your organization, select this check box.
  12. Max Concurrent Batch Processes: Number of batches to initiate concurrently.
  13. 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 5.
  14. Rollups Per Asynchronous Request: This setting modifies the number of rollups processed per asynchronous job request.
  15. 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.
  16. 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.
  17. 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.
  18. Cannot Disable Realtime By Script: If unchecked, the real-time disable script may be used to temporarily turn off rollups. For more details, please contact: support@passagetech.com
  19. Usage % of Limits: Determines how much of the limit to use. If 100 is entered then Rollup Helper will use all of the governor limit potentially and anything more than that will execute asynchronously in another execution context. By setting it lower it allows custom code.
  20. Limit Processing During Data Load: Check this if you are receiving time-out issues during a data load. Removes non-essential processing such as filtering out fields that don’t need to be updated.
  21. 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 (this date can be selected under each rollup’s advanced settings).
  22. Allow Validation Helper During Async: If this is checked, Enable Validation Helper will be active during asynchronous processing.
Note: Please make sure the combined total of available concurrent future, batch, and queueable processes equals at least 30 jobs.

Rollup Helper Jobs

  1. Rollup Helper Batch Agent - Hourly: This is a scheduled job that will check to see if any rollups are scheduled to run.
  2. Rollup Helper Schedule Monitor: This scheduled job only updates schedules that have “Run for All Records” checked.
  3. Rollup Helper Exception Monitor: This job generally runs during the normal execution path if an exception is logged. The job validates rollups and notifies the appropriate parties if new exceptions were created.
  4. Rollup Batch Agent: This job is responsible for running asynchronous rollups. It is normal behavior for this job to abort itself.

Migrating Rollups

Where feasible, it is widely considered a best practice to test data processing systems in a non-production environment first before implementing and testing changes in production. Rollup Helper includes an Export Rollups page. This page allows you to move your rollups from one org to another. The most popular use case for the Export Rollups page is to move tested rollups from a sandbox environment into to a production environment. You can also use this function to take tested and functional rollups from one client’s production environment into another client’s production environment, provided the other client has the same object and use case.
  1. From the Rollup Helper Home page, select Export Rollups.
  2. Either select specific rollups and choose Export Selected, or, select Export All.
  3. Scroll down and select Download, which creates a .csv file that can be imported into another org.
  4. 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 & import your rollups, check out the Import Rollups Using Data Import Wizard pdf.
  5. Contact support@passagetech.com 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.
  1. Manual Batch Run
    1. Rollup Helper will update all records that it queries for the rollup as the User that ran the rollup.
  2. Scheduled Batch Run
    1. 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.
      1. To change the running user:
        1. Go to Setup>Scheduled Jobs and delete the Rollup Helper Batch Agent - Hourly job.
        2. Log in as the User you would like Rollup Helper to run as.
        3. On the All Rollups page, click the “Set Username as Running User” button.
  3. Real-time
    1. Rollup Helper will update records based on the User that modified the source record and triggered the rollup.
  4. Asynchronous Real-Time
    1. By default, Rollup Helper will update the record based on the User the batch agent has been logged under.
    2. If you would like Rollup Helper to update the records based on the User who last modified the record:
      1. Go to Setup>Custom Settings>Manage Rollup Helper Settings
      2. Select the checkbox, “Process Queue Items Based on Modified By” and Save.

Best Practices

  1. 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 date criteria accurate.
  2. 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.
  3. When scheduling rollups:
    1. 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 2 hours, the schedule should not be more frequent than every 3 hours.
    2. Optimally, rollups should be scheduled during non-peak business hours and not overlapping with other schedules that update the same parent object whenever possible.
  4. 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.
  5. 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 email support.
  6. The efficiency of a Rollup Helper query will also be improved if any unnecessary sort orders are removed from filters.
  7. 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.
  8. 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.
  9. When refreshing a Sandbox, be sure to follow the migration steps because filters are not automatically brought over.
  10. 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).
  11. 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.
  12. 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.

Additional Information

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.

 Select the Salesforce object where your target field for the rollup results resides.

Define the criteria for your rollup.

 Select the criteria to query in Salesforce 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.

 This will query all of the records in your Salesforce org and give you an estimated run time based on the number of records to be processed.

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.

 From the All Rollups Tab, you can Run, Schedule, Edit,&nbsp;Delete or Activate/Deactivate your rollups in Salesforce as well as edit the filter and change the Run Mode.

For any additional assistance, please email: support@passagetech.com

Copyright 2017 - Passage Technology LLC - All Rights Reserved