How to setup auto-incrementing version numbers for documents generated by Conga Composer.

This is an advanced feature that is not supported by Conga Technical Support.

You can setup auto-incrementing version numbers for documents generated by Conga Composer. This is especially useful for documents like quotes or contracts where it’s common to create a few iterations before it’s approved or finalized. This technique is record-specific in Salesforce, so if you’re working from the same Opportunity record and generating multiple versions of the same quote over time, Conga Composer uses some simple formulas and field updates to keep track of each version.

This requires a good understanding of the Activity Logging Parameters, which allow you to update the value of a field upon merging.

To update the values of fields upon merging:

Step 1: Create two new custom fields on your preferred object:

  • Field #1
    • Data Type: Number
    • Name: Version #
    • Length: 3 digits
    • Decimal Places: 0
    • Default Value: 1

The default value will apply to any new records, but this field will need to be assigned a value of 1 for any existing records.

  • Field #2
    • Data Type: Formula - Number
    • Name: Next Version #
    • Decimal Places: 0
    • Formula Syntax: Version__c + 1

This field does not need to be added to the page layout if you're using Enterprise Edition or above, but Professional Edition users will need to park it somewhere on the layout for the formula to evaluate.

Step 2: Add MFTS parameters to your Composer button

This is where the magic happens. There are 4 required button parameters to make this work:

  • &MFTS0 – References the API name of the field to update
  • &MFTSValue0 – Specifies the value to be pushed into the field referenced by MFTS0
  • &UF0 - Turns on the Composer Update Fields feature.

Here is an example of the button URL. This example uses an Opportunity record:

https://composer.congamerge.com
?sessionId={!API.Session_ID}
&serverUrl={!API.Partner_Server_URL_290}
&id={!Opportunity.Id}
&MFTS0=Version__c
&MFTSValue0={!Opportunity.Next_Version__c}
&UF0=1

The MFTS0 parameter's field value, Version__c, is the API field name. The MFTSValue0 parameter's field value, {!Opportunity.Next_Version__c}, is a merge field. The MFTS0 parameter specifies the API name of your version number that is auto-incremented when you merge and log activities. The value that is entered into that field is supplied by MFTSValue0, which is retrieving the merge field of the next version number.

Step 3: Decide how to use it

Now that the mechanics are in place to increment version numbers as you merge documents, there are a few ways you can use this.

The OFN parameter allows you to specify a file name for your output, so what better place to put a version number? You can do this like so: &OFN=Quote+Version+{!Opportunity.Version__c}

If this were the second iteration of a quote in Word format, the resulting file name would be “Quote Version 2.docx”

Now that you’ve got a field that displays the current version number, you can add it to your template just like any other merge field. Stuff it in the footer of a contract, append the version number to the title of your proposal or add it to your quote as a watermark –tons of options here. If you are creating a completed task as part of your activity logging process, putting the version number in the subject is a great way to keep track of multiple documents over time. You can do this with the AC1 parameter like so: &AC1=Quote+Version+{!Opportunity.Version__c}+created+on+{!TODAY()}

If this were the second iteration of a quote, the completed activity would look like this:

Auto-incrementing version numbers can be used in a variety of ways depending on your requirements. It also works great for Conga Batch and Conga Trigger for batch and event-triggered merges.