Conga Product Documentation

Welcome to the new doc site. Some of your old bookmarks will no longer work. Please use the search bar to find your desired topic.

download

How to Call Conga Composer from Apex

As this method is outdated, Conga recommends using Composer API. Composer API required access to Conga Advantage Platform, please contact your Customer Success representative for more information.
CAUTION: Due to the complicated nature of supporting programmers and programming languages, the integration of Conga with Visualforce, Apex, Javascript (or other programming languages), and custom code is not supported.

Calling Conga Composer from Apex:

  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. The Apex request should set the endpoint to: https://composer.congamerge.com/composer8/index.html
  4. Include any needed Composer parameters in the query string part of the request, but you must start the query string with the following parameters:
    1. serverurl
    2. sessionid
    3. apimode
    Note:

    If present, remove the DS7 (background mode) parameter from the Composer Endpoint URL. DS7 may interfere with the APIMode parameter.

APIMode Value

Action in Conga Composer

1

Attaches the document to the master object

2

Reserved

3

Delivers the document via Conga Sign

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.

Warning: 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.