Download page How to Call Conga Composer from Apex.
How to Call Conga Composer from Apex
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.
Include any needed Composer parameters in the query string part of the request, but you must start the query string with the following parameters:
serverurl
sessionid
apimode
If present, remove theDS7 (background mode) parameterfrom 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.
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.