Conga Trigger solutions require Conga Queries to gather additional data for merged documents. Salesforce Reports do not successfully retrieve template data for Conga Trigger solutions.

Users must convert existing reports used in Conga Trigger solutions to Conga Queries to ensure that template data merge successfully. Converting a data gathering report to a Conga Query also requires updates to merge field syntax in a Conga Trigger solution's Conga Templates.

Follow the steps below to convert reports to Conga Queries and make the necessary merge field syntax updates in.

To convert a Report to a Conga Query

  1. Navigate to the Salesforce Report used in the Conga Trigger solution to reference the fields needed for the SOQL query.
    • It is recommended to keep the report open in a separate browser tab for reference.
    • In the example below, the report is pulling Quote information related to an Account record.
  2. Click the Conga Queries tab.
  3. Click New to create a new Conga Query record.
  4. Enter a value for the Name field and click Save.
  5. Launch Conga Query Builder to write the SOQL Select Statement.
  6. Select the lowest level object as the base object and then click Next.
    The lowest level object in the example report above is Quote, therefore Quote is selected as the base object in the Query Builder.
  7. Select all of the same fields referenced in the report and then click Next.
    Use the directional arrows to move fields into the Selected Fields section.
  8. Enter selection criteria that match the same filters on the report and click Next.
    In the example above, Quote ID equals "" is the only filter in the report. This filter functions as pv0 and dynamically filters the report by the specific Quote record that a user initiates the Trigger solution on.
  9. Enter sample data values that fulfill the query criteria in the pv fields and click Preview.
    • This ensures that the results returned from the query match the results of the report. Clicking the Preview button runs the query and shows the retrieved data.
    • It is highly recommended to use the same criteria, such as a record Id, to test that the report and query both return the same results.
      • To test the report in our example, the same sample Quote Id used to test the query is inserted in the report's pv0 filter.
      • The report and Conga Query must return the same results as demonstrated above.
  10. Click Save.
  11. Repeat Steps 1-10 for each report used to gather data for a Trigger solution.

After creating a Conga Query that returns the same results as the existing report, users must update the merge fields in Conga Template. It is recommended to first update the Conga Trigger solution's corresponding button to obtain the new merge field syntax and test the updated template.

For more information on a Conga Trigger solution's corresponding button, see Convert a CQG Button to a Formula Field.

To update Merge Field Syntax in the Template

  1. Copy the Conga Query's 15 digit record Id from the browser URL.
  2. Navigate to Salesforce Setup → Object Manager → Master Object where the button is created → Buttons, Links, and Actions → click the Button hyperlink → Edit.
  3. Add the QueryID parameter and use the copied Conga Query record ID as the parameter value. 
    Example:

    &QueryID=[Quotation]00N5f00000NytMC
    CODE
    • Use the same alias as the previous ReportID parameter. Keeping the same alias for the QueryID parameter prevents the query dataset from being renamed and results in less work when editing merge field syntax in the template. In the example above, the alias for the Query ID is Quotation which was also the alias for the ReportID parameter.
    • If an existing alias for the ReportID parameter does not exist, choose and enter a new alias for the QueryID parameter value.
  4. Remove the ReportID parameter and click Save.
  5. Navigate to a sample object record and click the recently edited button to access the CQG user interface.
    • If present, remove the DS7 parameter.
  6. Click Tools & Settings in the CQG window and then click Template Builder.
  7. Click the + button next to the new query dataset to display all available merge fields.
    • Use the directional arrows to select merge fields from the new dataset.
  8. Copy and paste the merge field syntax into the template to replace the previous dataset's merge field syntax.
    • If the same alias is used for the QueryID parameter, the TableStart:dataset syntax remains the same and does not require updating. In the example above, TableStart:Quotation and TableEnd:Quotation is the correct syntax for both the ReportID and QueryID parameter values.
    • Although the report and query retrieve the same fields, merge field syntax produced from queries may differ than merge syntax produced from reports. Ensure that all merge fields produced from the query use the correct syntax taken directly from the Template Builder.
  9. Save the new template file locally.
  10. Click the Back arrow button in the CQG window.
  11. Navigate to the Local Template tab and click Select File to select the new template version with updated merge fields.
  12. Click Preview or Merge & Download to merge and download the local template
    • Ensure that all merge fields successfully merge data.
  13. (Optional) Repeat Steps 1-12 for all new Conga Queries replacing reports.
  14. Click the Conga Templates tab.
  15. Click the Conga Template record(s) referenced in the CQG button and the Conga Trigger formula field.
  16. Click Upload Files and upload the new template file to the existing Conga Template record.

To update the Conga Trigger Formula Field

After confirming that data successfully populates in the corresponding button, it is time to update the Conga Trigger formula field.

  1. Copy the Conga Query's 15 digit record Id from the browser URL.
  2. Navigate to Salesforce Setup → Object Manager → Master Object where the formula field is created → Fields & Relationships → click the Formula Field hyperlink → Edit.
  3. Add the QueryID parameter and use the copied Conga Query record ID as the parameter value. 
    Example:

    "&queryid=[Quotation]00N5f00000NytMC" +
    CODE
    • Use the same alias as the previous ReportID parameter. Keeping the same alias for the QueryID parameter prevents the query dataset from being renamed and results in less work when editing merge field syntax in the template. In the example above, the alias for the Query ID is Quotation which was also the alias for the ReportID parameter.
    • If an existing alias for the ReportID parameter does not exist, choose and enter a new alias for the QueryID parameter value.
  4. Remove the ReportID parameter and click Save.
  5. Test the Conga Trigger solution on a sample record to ensure that all data populates successfully in the output document.