Conga Product Documentation

Welcome to the new doc site. Some of your old bookmarks will no longer work. Please use the search bar to find your desired topic.

How Template Versioning Works

Each agreement or clause template in your org (with or without template versioning enabled) always consists of one template, and multiple child references to clauses and sections contained in that template. For every instance of that template, there is always only one template which can be considered active (the version selected by the user to generate the contract or the version of the clause inserted into an agreement template).

More specifically, whenever a new template is created by any means, one instance of the template is created, stored in the Template object in Salesforce, and any clauses or dynamic sections nested in the template are stored in the Template Clause Reference and Template Dynamic Section objects respectively. The Template object has a master-detail relationship to both child objects, as shown in the following figure.



Template Versioning preserves the same template, called the "Header Template," which has a one-to-one relationship with the Active Version of the template and its child objects, and a one-to-many relationship with other versions of the template, which also have versioned clause and section references, but are considered inactive.



Template Versioning introduces three new objects:

  • Template Version – a detail object of the master Template object
  • Template Clause Reference Version – a child object of Template Version that stores nested clause references
  • Template Dynamic Section Version – a child object of Template Version that stores dynamic section references

When a user creates a new version of a template, the version information is incremented (e.g. from "1.0" to 2.0") but stored in the Template Version object and its child objects, NOT the Template object, creating a separate record of that template version. After creation, when and if a template version becomes the active version, data from the Template Version objects are copied to the Header Template objects and that template version becomes the new active version of the Header Template.