What is Recursive Merge?
Recursive merge combines merge fields within another merge field to process Salesforce data into a output document. More specifically, recursive merge allows you to add additional data retrieved from a merge field referenced within a Salesforce field. The term recursive is used to describe a process that repeats itself.
The first merge occurs when a Salesforce field's corresponding merge field is placed in a Conga Template. The Salesforce field's text contains merge field syntax. The second merge occurs automatically after the initial merge field is processed. The second merge produces the value of the merge fields referenced in the text of the Salesforce field. The merge produces field values, for example record names or specific dates in an output document.
The RM parameter (Recursive Merge parameter) specifically provides functionality to reference and merge text-based merge fields from a Salesforce field. It is designed for Conga Contracts for Salesforce solutions using Conga Composer.
The RM parameter requires Composer Enterprise Edition and is only compatible with text-based merge fields for Word templates.
Recursive merge can make Clauses dynamic and specific to a current record on the document being generated. Below is an example of a Managed Clause on the Contract object using recursive merge in the Composer-generated Contract document.
Example of Recursive Merge
The text-based merge field syntax is referenced within the Clause's and Managed Clause's Text field.
The Managed Clause's Text field is then referenced into a Conga Composer Word Template through an associated SOQL Query.
The Text field containing the merge field is referenced in the Word Template as merge field.
With the &RM=1 parameter value present in the Composer Button URL, Composer recognizes the merge field syntax referenced within Managed Clause's Text merge field and successfully merges the data.