Unlike a CQG button or link which contains a URL with various parameters to define your merge operation, Conga Batch uses a formula field on your Master Object to host those instructions. 

Important

  • Conga Batch can only merge data from the Quote object with CQG.
  • Based on your business use case, you must assign field-level access of the formula filed to the users using profiles or permission sets. For more information, see Salesforce Field-Level Security.

To convert a button into a formula field

  1. Create a custom formula field on your Master Object with Return Type of Text and label it. It is helpful to include the type of delivery method (ex: download, email, etc.), the template, and the master object in the Label such as, “Conga Batch Download Simple Quotation”
  2. Copy the button URL from your working button and paste it into your formula field’s formula window.

    Example:

    /apex/csfb__Conga_Composer?SolMgr=1
    &serverUrl={!API.Partner_Server_URL_370}
    &userName={!$User.Username}
    &Id={!blng__Quote__c.Id}
    &TemplateId=a0I80000000laT3
    &FP0=1
    &AC0=1
    &AC1=Quotation+for+{!Opportunity.Name}
    CODE
  3. Remove the following unnecessary lines:

    /apex/csfb__Conga_Composer?SolMgr=1&serverUrl={!API.Partner_Server_URL_370}&userName={!$User.Username} 
    CODE

    You should be left with just the &Id parameter and what follows it. For example:

    &Id={!blng__Invoice__c.Id}
    &TemplateId=a0I80000000laT3
    &FP0=1
    &AC0=1
    &AC1=Quotation+for+{!Opportunity.Name}
    CODE
  4. Convert the remaining lines into a valid Salesforce formula.
    The formula must adhere to the following rules:
    1. Literal text strings (a.k.a. static text) must be enclosed in quotes (" … ")
    2. Literal spaces within literal text strings must be replaced with plus signs (+)
    3. Merge fields from the button must be replaced with the corresponding field available in the formula. For example, {!Opportunity.Id} would be replaced with Id
    4. Each element (literal text strings and fields) must be joined with the concatenation operator (+) or (&).

    Example:

    "&id="+ Id +"&TemplateId=a0I80000000laT3" +"&FP0=1" +"&AC0=1" +"&AC1=Quotation+for+" + Name +
    CODE
  5. Append the QMode parameter to indicate how Conga Batch should deliver the merged output files.
    Example:

     + "&QMode=Download"
    CODE
Button URLFormula
/apex/csfb__Conga_Composer?SolMgr=1
&serverUrl={!API.Partner_Server_URL_370}
&userName={!$User.Username}
&Id={!blng__Quote__c.Id}
&TemplateId=a0I80000000laT3
&FP0=1
&AC0=1
&AC1=Quotation+for+{!Opportunity.Name}
"&id=" + Id + 
"&TemplateId=a0I80000000laT3" + 
"&FP0=1" + 
"&AC0=1" + 
"&AC1=Quotation+for+" + Name + 
"&QMode=Download"