Skip to main content
Conga Support

Create A Conga Query With Conga Query Builder

Queries can be used instead of a reports in Salesforce. Conga Queries contain a SOQL SELECT statement that is specifically tuned to work in conjunction with Conga Composer and Conga Mail Merge. See About Conga Query Manager for more information.

To Create a Conga Query:

  1. Click All Tabs.
  2. Click Conga Queries.
  3. Click New.
  4. Type a Name and Description.
    congaquery02a.png
  5. Leave the SOQL Select Statement field blank.

    If you already have a SOQL query, you can enter it into the SOQL Select Statement field.
    In that case, you can stop after step 6.

  6. Click Save.
  7. Click Conga Query Builder.
  8. Click an object in the list to select it as the base object of your query.

    This should be the lowest level object you want to read data from.

  9. Click Next.
  10. Click on the columns you want to display and click >> to move them to the Selected Fields area.

    Click the headers to access additional fields.

  11. Click Next.
  12. Set the Field dropdown to the ID of the object where your button resides. 
  13. Set the Operator dropdown to equals.
  14. Leave the Value field blank.

    You can specify additional selection criteria if needed.

  15. (Optional) Choose a sort order and number of rows to display.
  16. Click Next
  17. On the resulting page, you will see your SOQL statement.

    You can also test your query from this page.

  18. (Optional) To test your query, enter the Salesforce ID of an appropriate record into the pv0, pv1, pv2, pv3, or pv4 fields and click Preview.

    The information will be displayed in a pop-up window so make sure you have any pop-up blockers disabled or set to allow pop-ups from Salesforce.

  19. When you have completed testing, click Save.

    If you manually edit the SOQL query generated by the Query Builder, do not use the Query Builder again for that record because your edits will be overwritten.

Let's say you want to access contact information for accounts. To create that query you would:

  1. Click All Tabs.
  2. Click Conga Queries.
  3. Click New.
  4. Type a Account Contacts for the name and Gather contact information for accounts for the description.
  5. Leave the SOQL Select Statement field blank.
  6. Click Save.
  7. Click Conga Query Builder.
  8. Click Contact.
  9. Click Next.
  10. Click on the columns you want to display and click >> to move them to the Selected Fields area.

    Let's move the following:

    • Business Phone
    • First Name
    • Last Name
    • Title
  11. Click Next.
  12. Set the Field dropdown to Account ID.
  13. Set the Operator dropdown to equals.
  14. Leave the Value field blank.
  15. Click Next
  16. Your SOQL statement is displayed.
    SELECT Phone, FirstName, LastName, Title FROM Contact WHERE AccountId = '{pv0}'
  17. To test your query, enter an Account ID in the pv0 field.

    If you do not wish to test your query, skip to step 21.

  18. Click Preview.
  19. In the pop-up window you should see the first 20 rows of contacts associated with the Account ID.
  20. Close the pop-up window.
  21. Click Save.
  • Was this article helpful?