Skip to main content
Conga Support

Create Auto-Incrementing Version Numbers

This is an advanced feature that is not supported by Conga Customer Success.

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.  Follow the steps below.

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 3 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

&AC0 - Enables automatic activity logging, which is required for MFTS parameters to work

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

https://www.appextremes.com/apps/Conga/Composer.aspx
?sessionId={!API.Session_ID}
&serverUrl={!API.Partner_Server_URL_80}
&id={!Opportunity.Id}
&MFTS0=Version__c   <-- Note: this is the API field name
&MFTSValue0={!Opportunity.Next_Version__c}   <-- Note: this is the merge field, not the API field name
&AC0=1

The MFTS0 parameter specifies the API name of your version number that will be auto-incremented when you merge and log activities.  The value that’s entered into that field is supplied by MFTSValue0, which is retrieving the merge field of the next version number.  AC0 is required to update the fields.  AC3 is optional and can be used to automatically log a task in Activity History in addition to updating your fields with MFTS.

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.

1) In your output file name

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”

2) In your output file

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.

3) As the subject of a completed activity

If you’re 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 Conductor and Workflow for batch and event-triggered merges.