Skip to main content
Conga Support

How to Call Conga Composer from Apex

Calling Conga Composer from Apex can be accomplished by following these guidelines:

Due to the complicated nature of supporting programmers and programming languages, the integration of Conga with Visualforce, Apex and Javascript (or other programming languages) is not supported.

  1. Create a Remote Site setting record for “https://composer.congamerge.com”
  2. In your code, make an HTTP GET call with a long timeout (~60 seconds)
  3. Your code should call https://composer.congamerge.com/composer8/index.html
  4. Include the typical querystring parameters in the request
  5. Include an APIMode parameter in the Conga Composer endpoint URL:

APIMode Value

Action in Conga Composer

1

Attaches the document to the master object

2

Reserved

3

Reserved

4

Reserved

5

Attaches the document to the Documents Tab (requires &DocFolderId)

6

Attaches the document to Salesforce Content (requires &ContentWorkspaceId)

12

Emails the document according to the Email parameters

13

Delivers the document via Adobe eSign

17 DocuSign

When successful, the API Mode parameter results in a Salesforce Record ID, or an error message.

Calling Conga Composer in a programmatic loop, whether from Apex or any other programming language, constitutes a violation of the Master Services Agreement and is subject to immediate suspension of your account.  This includes the use of script, code, program or alike to mimic the functionality of Conga products or services.