Create A Conga Query With Conga Query Builder
Due to the complicated nature of SOQL statements, our support staff can only assist with the creation of SOQL statements generated through our tools, such as Conga Query Builder.
Queries can be used instead of 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:
- Navigate to .
- Click
. - Type a
and . - Leave the
If you already have a SOQL query, you can enter it into the SOQL Select Statement field.
If you already have a query, you can stop after step 6.
field blank.
- Click .
- Click
. - Click an object in the list to select it as the base object of your query.
The object should be the lowest level object where you want to read data from.
- Click Next.
- Click on the columns you want to display and click
Click the headers to access additional fields.
to move them to the Selected Fields area.
- Click Next.
- Set the Field dropdown to the ID of the object where your button resides.
- Set the Operator dropdown to equals.
- Leave the Value field blank.
You can specify additional selection criteria if needed.
- (Optional) Choose a sort order and number of rows to display.
- Click Next.
- On the resulting page, you see your SOQL statement.
You can also test your query from this page.
- (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 is displayed in a pop-up window so make sure you have any pop-up blockers disabled or set to allow pop-ups from Salesforce.
- 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 are overwritten.
Let's say you want to access contact information for accounts. To create that query you would:
- Click All Tabs.
- Click Conga Queries.
- Click New.
- Type a for the name and for the description.
- Leave the field blank.
- Click .
- Click Conga Query Builder.
- Click Contact.
- Click Next.
- Click on the columns you want to display and click
Let's move the following:
- Business Phone
- First Name
- Last Name
- Title
to move them to the Selected Fields area.
- Click Next.
- Set the Field dropdown to Account ID.
- Set the Operator dropdown to equals.
- Leave the Value field blank.
- Click Next.
- Your SOQL statement is displayed.
SELECT Phone, FirstName, LastName, Title FROM Contact WHERE AccountId = '{pv0}'
- 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.
- Click Preview.
- In the pop-up window you should see the first 20 rows of contacts associated with the Account ID.
- Close the pop-up window.
- Click Save.