Skip to main content
Conga Support

Determine Which Records to Include in Your Batch

When launching Conga Conductor from the Conductor record, a Salesforce report or SOQL query is used to determine which Salesforce records are included in the batch operation. The report or query is also referred to as the “Master Object source.” You may only use one Master Object source – either a report or a query, not both. However, queries tend to run faster than reports and work better with larger data tables.

Build a Report for the Master Object Source

We need to create a Salesforce report that contains a list of Master Object IDs. Conga Conductor will use this report to determine which records are included in the batch operation. The Salesforce ID of this report will be referenced in the Report Id field under Master Object Source on the Conga Conductor record.

To build a report for the master object source:

  1. Create a new Report folder called Conga Conductor Reports.

    This folder will be used in a later step to house the Master Object Source Report.

  2. Clear the High Assurance Session Required setting to allow Conga Composer and Conga Conductor to access exported report data. Do this from Setup > Customize > Reports and Dashboards Settings > Access Policies.

    If this setting is enabled, the session security level required to export reports is increased, preventing Composer and Conductor access to the report data.

  3. Ensure that the Conga Conductor Reports folder is accessible by the users who will run the Conductor solution.

  4. Choose the Salesforce Report Type that matches your master object.

    The Report Type you select when building your Master Object Source Report must include the same object type as the Master Object specified in the Conga Composer solution you converted to Conga Conductor (see Convert a Conga Composer Button to a Formula Field Using the Conga Formula Builder for further details).

    For example, if you built your Composer solution with the Opportunity as the master object, your Master Object Source Report Type for Conductor must also include Opportunities (e.g. Opportunities report type, Opportunities with Contact Roles Report Type, Opportunities with Products Report Type, etc.).

  5. Include the Master Object ID as the first (far left) column on the report.

  6. This is the only field that is required for Conga Conductor to read the report and determine the records included in the batch.

  7. You may include other fields as columns on the report to assist in your reading of the report (e.g. a name field) but the first ID column encountered (as read left-to-right) must be the column of Master Object IDs (see image below). Keep in mind that the fewer fields included on the report, the faster it will run.

  8. Define the filter criteria of the report so that the proper records are included in the Conga Conductor batch (i.e. Time Frame, Opportunity Status, etc.).

  9. Optimize the processing time of your report and the overall speed of the Conductor solution by using simple report filters whenever possible. The operators “equals,” “contains,” and “starts with” minimize the possibility of a timeout.

  10. Save the report in the Conga Conductor Reports folder.

  11. We recommend naming the report as “Conductor - [Name of Conga Conductor Record].” Using our previous example, our report name is “Conductor - Batch Simple Proposal - Oppty.”

How to Build a SOQL Query for the Master Object Source

Instead of a Salesforce report, you may use a SOQL query as the Master Object Source. Queries are typically used when reports are not available due to Salesforce security settings or if the desired records cannot be retrieved using a report. Just like using a report as the Master Object Source, Conga Conductor will use this query to determine which records are included in the batch operation. The Salesforce ID of the Conga Query record will be referenced in the Query Id field under Master Object Source on the Conga Conductor record.

Referencing a SOQL query as the Master Object Source requires use of the Conga Queries object. If you do not have this object installed in Salesforce, please contact Conga Support for assistance.

For assistance using SOQL queries, please see the Force.com SOQL Reference Guide.

To build a SOQL query for the master object source:

  1. Create the Conga Query record.
    • Give the record a Name and, optionally, a Description.
    • We recommend naming the query as “Conductor - [Name of Conga Conductor Record].” Continuing with the same example, our query name is “Conductor - Batch Simple Proposal - Oppty.” Save the record.
      Ensure that the user who will run the Conductor solution has access to: the Conga Queries object, the fields on the object and the specific Conga Query record.
  2. Launch Conga Query Builder to write the SOQL Select Statement.
    • The base object you select when building your Master Object Source query must match the Master Object specified in the Conga Composer solution you converted into a Conga Conductor formula field (see Convert a Conga Composer Button to a Formula Field Using the Conga Formula Builder for further details).
    • In other words, if you built your Composer solution with the Opportunity as the Master Object, the base object for your Master Object Source query for Conductor will also be Opportunity.
      The Conga Conductor formula field is located on the Master Object. This Master Object must be selected as the base object (the “FROM” object) in the query.
  3. Select the Master Object ID as the first field in the query.
    • This is the only field that is required for Conga Conductor to read the query and determine which records to include in the batch.
    • You may include other fields in the query to assist in your reading of the query (e.g. a name field) as desired, keeping in mind that the fewer fields included on the query, the faster it will run.
  4. Define the selection criteria of the query so that the proper records are included in the Conga Conductor batch.
    • You may also choose a sort order and limit the number of rows as needed.
    • Optimize the processing time of your query and the overall speed of the Conductor solution by using simple filters whenever possible. The operators “equals,” “contains,” and “starts with” minimize the possibility of a timeout.
  5. Confirm the accuracy of your SOQL statement and Save.
    • Ensure that the Master Object ID (typically, “Id”) is included as a field in the SELECT clause, that your filter criteria in the WHERE clause are correct, and so forth.