Using Dynamic Document Assembly, you can merge independent clause templates into a single Master Agreement template using a set of predefined rules within a ruleset.

Use the following workflow to configure and define Doc Assembly Rulesets, Rules and Components for Agreement and Proposal templates using dynamic segments to insert clauses:

Configuring Dynamic Document Assembly

  • Create custom fields for an agreement using which an agreement will be filtered. For example if you want to filter agreements by language, create a custom field for language for an agreement.
  • Create Document Assembly Field sets: The field sets comprise the fields used to filter an agreement. The field should have the same API name as that of the custom fields for the Agreement object.
  • Specify the API name of the fieldset in Comply Custom Properties.
  • Enable Document Assembly Rulesets for the Quote/Proposal object.

Creating Dynamic Document Assembly Rulesets

  • Define a Doc Assembly Ruleset: You have to create a ruleset that comprises the rules using which an agreement is filtered.
  • Define Doc Assembly Rules: Define a set of filter criteria by which an agreement is filtered and available. The filter by fields should have the same API name as the fields of the Agreement object. For example you want to filter all agreements having language as English. The Language custom field in the Agreement object has the API name as Language_c. The filter by criteria field for a Document rule should have the same API name Language_c.
  • Specify Doc Components: If an Agreement satisfies the filter criteria, you can specify the doc components(templates) and the sequence in which they are included in the master agreement template.
  • Navigate to X-Author and checkout an existing template or create a new blank template and check it in. Once the blank template is checked in successfully, insert a dynamic section in the template. For an existing template insert the dynamic section in the required location and specify the ruleset. The Dynamic section allows you to define the ruleset for which the template is applicable for an agreement. This blank template is used as the master agreement template.
  • Once you click Generate or Preview, if the agreement satisfies the rules defined in the document ruleset, the corresponding master agreement template for that ruleset is shown. Select the master agreement template and click Generate. All the components defined in the Document Rule set are inserted in the sequence by which they are defined.


This page only includes instructions for configuring and create Dynamic Document Assembly Rulesets for Clause components. If you intend to create Rulesets that also include attachment components at the line item level, refer to Dynamic Document Assembly Workflow: Attachments for additional configuration.

Doc Assembly Rule Filter Logic

The following table shows the summary of system behavior based on various conditions:

Value in Agreement fieldValue in Filter by field of Doc Assembly RuleMatch between the values of Agreement field and Filter by fieldSystem evaluation
Has valueHas valueYesSystem will fire the Doc Assembly Rule and the corresponding template will be displayed for document generation or preview.
Has valueNullNoSystem will skip the evaluation for this filter field and will fire the Doc Assembly Rule based on the match in other Rule filters.
NullHas valueNoSystem does not fire the Doc Assembly Rule.

Creating a Document Assembly Fieldset

Complete To create custom fields so you have all of the fields you want to use in the fieldset available on the Doc Assembly Rule object.

  1. From Setup, go to Create > Objects > Doc Assembly Rule.
  2. From the Fields Sets Related List, click New and enter a mandatory Field Set Label, Field Set Name, and info on where it is used and click Save.
  3. Drag and drop the desired fields onto the field set and click Save.
  4. Repeat steps 2 and 3 to create a separate Static fieldset. The fields in the static field set will be a subset of the fields in the dynamic field set.

The field set object, with its field has been saved.

  • You can now add the fields defined in the field sets to a specific page layout. To call out the static and dynamic field sets, create separate Static and Dynamic sections on the page layout and drag and drop the requisite fields accordingly.
  • Go to Develop > Custom Settings > Comply Custom Properties and click Manage and then Edit for Apttus__APTS_Agreement__c. Enter the API name of the field set you created in the Doc Assembly Rule FieldSet Name field. Enter the API name of the static field set you created in the Doc Assembly Static FieldSet Name.


If there is no Apttus__APTS_Agreement__c entry, you should create one first and then enter the field set name.


Populating a Doc Assembly Component Type picklist

  1. From Setup, go to Create > Objects > Doc Assembly Component.
  2. From Custom Fields & Relationships, click Type.
  3. From Picklist Values, click New and add the required type values and save them.

These values are now available from the Type picklist when creating a Doc Assembly Component.

Adding the Related Lists

  1. From Setup, go to Create > Objects > Template.
  2. From the Page Layouts section, click Edit beside the layout you want to add the Related List to.
  3. Select Related Lists and drag and drop the following Related Lists onto the page.
    • Doc Assembly Components: When you create a Doc Assembly Component and use it in your template, this Related List will have a new record added to it.
    • Template Dynamic Sections: When you add a dynamic section to a template using Insert Dynamic Sections ribbon from X-Author Templates, this Related List will have a new record added to it.
    • Template References: When use a template as a doc assembly component using Insert Dynamic Sections ribbon from X-Author Templates, this Related List will have a new record added to it.
  4. Click Save.

The Related Lists will now be displayed on that Template page layout.

Adding DAR for the Proposal Object

By default, a custom property is created for the Quote/Proposal object when you upgrade or install the Apttus Proposal Management package, but you still need to manually add the Quote/Proposal object to the picklist when creating a new Doc Assembly Ruleset.

  1. From Setup, go to Create > Objects > Doc Assembly Ruleset.
  2. Under Custom Fields & Relationships, click on the Business Object field label link.
  3. Scroll to Picklist Values and click New.
  4. Enter Apttus_Proposal__Proposal__c as a new Picklist option.



  5. Click Save. The Proposal object is now available as an option when you are creating DAR Rulesets.

Creating Doc Assembly Rulesets

User Permissions Needed
To create a Doc Assembly Ruleset:

Doc Assembly Ruleset: Read, Create, Edit.

Agreement: Read, Create, Edit.

Template: Read, Create, Edit

Doc Assembly Rule: Read

Doc Assembly Component: Read

  • You must have created templates that you want to use as the Content of your Doc Assembly Components.
  • You must ensure that you add the fields created in the fieldset in the page layout for Doc Assembly Rule by using Edit Layout option.
  1. Go to the Doc Assembly Rulesets tab and click New.
  2. Enter the following values for the ruleset:

    OptionDescription
    Ruleset NameEnter the name used to reference the ruleset in the template.
    SequenceEnter the order in which the ruleset will be evaluated, when you Preview or Generate an agreement document.
    Business ObjectChoose the Business Object context for the Ruleset. Select Apttus__APTS_Agreement__c for Agreements, orApttus_Proposal__Proposal__c for Proposals.
    Record TypesChoose one or more record types associated with the business object (Agreement or Proposal). To restrict the Ruleset to specific record types select them from the list and move them from Available to Chosen, otherwise leave the default of All.
    Active Select this checkbox to make the Ruleset available when you generate a document.
    DescriptionEnter details about the Ruleset that describe its business purpose.
  3. Once the settings are configured, click Save to display the Doc Assembly Ruleset record.
  4. Click New Doc Assembly Rule and enter values for the following options:

    OptionDescription
    Rule NameEnter the name used to reference the Rule in the template.
    SequenceEnter the order in which the Rule will be evaluated, when you Preview or Generate an agreement document.
    DescriptionOptional field to enter details about the rule.
    ActiveEnter details about the Rule in the context of your Ruleset.
    Filter By

    Choose values for fields in this section to control whether the rule will be applicable to the Agreement or Proposal, based on the filter criteria defined. If it matches then the rule may be applied; however, if it does not match then the rule is skipped.

  5. Once the settings are configured, click Save to display the Doc Assembly Ruleset record.
  6. Click New Doc Assembly Component and enter values for the following options:

    OptionDescription
    SequenceEnter the order in which the component is inserted in the master agreement template, when you Preview or Generate an agreement document.
    TypeChoose the Doc Assembly Component Type. Type is a configurable field that is used to help indicate what the component is used for; however, it is only an indicator and does not have any impact on the generation process.
    ContentUse the lookup to choose the clause template that will provide the content for the document. This is referenced when you Insert Dynamic Section in X-Author.
  7. Click Save.

The components of active Rulesets and Rules can now be used when you insert dynamic sections into agreement templates.

To create new templates or edit existing templates and include Dynamic Sections in them, see Setting Segments in Templates.