I'm trying to use Conga from mobile devices (SF1 in particular and I DO know that it is not officially supported yet) and running Conga in Background Mode satisfies my needs. However in order to run it from SF1, I have to create child browser window to navigate to https://composer.congamerge.com and pass the parameters.

Problem with above approach is that after request is completed, Conga redirects to master object page which in turn redirects to SF login page (due to missing session in mobile browser). I find this behaviour far from user friendly and would like to streamline the process. My obvious thought was that since we are passing to Conga server URL and session ID Conga should be able to do all the processing on their servers and they don't need a loaded page in the client browser. So I tried to trigger merge process using HTTP GET call to the same URL however I keep getting 400 Bad Request response.

public static String testCongaBackgroundMode(String sessionId, String serverUrl) {

    String sessId = UserInfo.getSessionId();
    String servUrl = Url.getSalesforceBaseUrl().toExternalForm()+'/services/Soap/u/29.0/'+UserInfo.getOrganizationId();

    String url2 = 'https://composer.congamerge.com'+
                          '&serverUrl='+EncodingUtil.urlEncode(servUrl, 'UTF-8')+


    Http http = new Http();
    HttpRequest req = new HttpRequest();

// Send the request, and return a response
    HttpResponse res = http.send(req);


    return res.getStatus() + ' => ' + res.getBody();

As you can see above I tried to get sessionID and server URL both on the server side and by passing values form VF page - neither options worked...

My question is - does anyone know if it is possible to run Conga Merge in background mode via HTTP Callout? If so, can anyone point out what I'm doing wrong?

  • Did you find a way to call conga composer from apex ? – Eduard Jul 12 '16 at 20:13
  • As far as I remember, in the version of Conga that I worked with (almost 2 years ago) you couldn't run composer completely in background. You still had to redirect (via Apex, or link or somehow else) to a composer URL which could perform certain operations in "background mode" (in reality just a page with zero dialog). I doubt this behaviour has changed since, however there was a new version released for mobile since which may be offering some improvements. – IvanR Jul 13 '16 at 9:47

Composer 8 does not currently support HTTP callout, but it can be accomplished with Composer 7 using https://www.appextremes.com/apps/conga/pm.aspx for the initial line URL.

But wait there's more... since background mode is desirable, Conga's recommended method for calling Composer via Salesforce1 is through our Workflow service which can execute a merge completely in the background based on an Outbound Message. So you simply need to create a Publisher Action that will initiate a Workflow trigger which will subsequently send the document(s) via email.

Our full support for Salesforce1 is on the very near horizon. We're in the final stages of internal testing.

Thanks for your patience.



  • Can I use Composer 7 and 8 interchangeably or is my Salesforce Conga app "tied" to one of those versions somehow? – IvanR Sep 11 '14 at 9:11
  • As long as you are using standard mergefields: <<FIELDNAME>> you can use them fairly interchangeably and the "&SC" parameters will be replaced with "&LG" parameters in Composer 7 – CongaPete Sep 22 '14 at 15:40
  • Be advised that there's a 500 events per month minimum required for the workflow. Nowhere is this documented, however. – humanoid Feb 27 '17 at 23:08

Try using the &OCNR=1 parameter. See documentation from conga. https://www.congasphere.com/parameters/OCNR.htm?Highlight=ocnr

  • A bit more elaboration might be welcome to the community – cropredy Apr 23 '16 at 6:32

UPDATE: Conga Composer 8 now does support HTTP Callouts. You can see how to do it using the Conga documentation here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.