Using Dynamic Document Assembly, you can merge independent attachments from lookups (e.g., Products) to line-item level Objects (Agreement Line Items, Proposal Line Item) 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 containing dynamic segments to insert attachments:

Configuring Dynamic Document Assembly

  • Specify the API name of the Child Object Types for the Agreement and/or Quote/Proposal objects in Comply Custom Properties.
  • Populate the Doc Assembly Component Type Picklist.
  • Add Attachments fields to the Doc Assembly Ruleset and Doc Assembly Component page layouts.
  • Add Related Lists to the Template Object page layout.
  • Enable Document Assembly Rulesets for the Quote/Proposal object (optional).

Creating Dynamic Document Assembly Rulesets

  • Define a Doc Assembly Ruleset: Create a Ruleset that comprises the Rules that define the Components to be inserted into the generated document.
  • Define Doc Assembly Rules: Define a Rule to serve as a container for Doc Assembly Components that reference attachments on line item objects.
  • Specify Doc Components: Define the doc components (attachments) and the sequence in which they are included in the master agreement or proposal 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 Ruleset are inserted in the sequence by which they are defined.

This page only includes instructions for configuring and create Dynamic Document Assembly Rulesets for attachment components at the line-item level. If you intend to create Rulesets that also include Clause template components, refer to Dynamic Document Assembly Workflow: Clauses for additional configuration that requires Field Sets to filter identified clause components.

Configuring Dynamic Document Assembly Custom Properties

To enable support for Line Item attachments in Dynamic Document Assembly, you must create or modify existing Comply Custom Properties to identify the Child Objects of the Agreement and/or Proposal object that you want to include in your Rulesets.

  1. Go to Develop > Custom Settings > Comply Custom Properties.
  2. Click Manage to display Custom Properties for Agreements and Proposals.



  3. If the Properties displayed above appear in the list, continue to the next step. Otherwise, create the Custom Properties entries as shown above, then continue to complete the configuration.
  4. Click Edit next to Apttus__APTS_Agreement__c to display the Custom Properties information form.



  5. In the Child Object Types field, enter comma-separated values identifying the API name of the Child Objects you want to support in your Rulesets: "Apttus__AgreementLineItem__c,Agreement_Product__c"
  6. Click Save.
  7. If you have the Apttus Proposal Management package installed and want to create Rulesets for the Proposal object, click Edit next to Apttus_Proposal__Proposal__c.



  8. Enter the API name of the Proposal Line Item child object: "Apttus_Proposal__Proposal_Line_Item__c"

You do not need to include any "Doc Assembly Rule Field Set" properties unless you are planning to include Clause templates as components in your Rulesets. For instructions on configuring and creating Doc Assembly filter fields, refer to Dynamic Document Assembly Workflow: Clauses.

Populating the Doc Assembly Component Type Picklist

Each defined Doc Assembly Component requires a "Type" to identify its purpose in the generated document. Follow these steps to populate the Doc Assembly Component Type picklist with desired values.

  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 Context Fields to the Doc Assembly Ruleset Page Layout

In order to use line item objects as the context for a Doc Assembly Ruleset, you must add two (2) fields to the Doc Assembly Ruleset Page Layout.

  1. From Setup, go to Create > Objects > Doc Assembly Ruleset.

  2. From Page Layouts, click Edit.
  3. From the Layout editor, drag and drop the Child Object and Parent Reference Field into the Information or System Information sections of the layout.



  4. Click Save. Repeat this process for each Ruleset Layout you have created.

Adding Attachment Fields to the Doc Assembly Component Page Layout

In order to configure Doc Assembly Component for line item attachment support, you must add three (3) fields to the page layout.

  1. From Setup, go to Create > Objects > Doc Assembly Component.
  2. From Page Layouts, click Edit.
  3. From the Layout editor, drag and drop the Component Type, Field Name, and Attachment ID fields into the Information section.



  4. Click the configuration icon next to the Content field to display Field Properties.
  5. Click the Required check box to make the Content field no longer required. You must make this field optional because you may not include Clause template components in your Ruleset.



  6. Click Save. 
  7. Repeat this process for each Ruleset Layout you have created.

Including 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.



  4. Click Save. The Related Lists are now displayed on that Template page layout.

Enabling DAR for the Proposal Object (Optional)

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

  1. Go to the Doc Assembly Rulesets tab and click New. The Doc Assembly Ruleset form is displayed.



  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.
    ActiveSelect this checkbox to make the Ruleset available when you generate a document.
    DescriptionEnter details about the Ruleset that describe its business purpose.
    Child Object

    Enter the child object API name of the specified Business Object to define as the Ruleset context. This will be a line item object and is restricted to the following objects;

    • Apttus__AgreementLineItem__c
    • Agreement_Product__c
    • Apttus_Proposal__Proposal_Line_Item__c

    These API names must also be represented in the Comply Custom Properties as described in the previous section on this page.

    Parent ReferenceField Enter the API name of the field on the Child Object you specified that references the parent. For example, if your Child Object is Agreement Line Item enter Apttus__AgreementId__c as the Parent Reference field. This is the API name of the Custom Field on the Agreement Line Item object that references its parent: Agreement.

    After entering field information, your Ruleset will be looking something like the following.

  3. Click Save to display the Doc Assembly Ruleset record.

Creating Doc Assembly Rules

  1. Click New Doc Assembly Rule. The New Doc Assembly Rule form is displayed.



  2. Enter the following values for the Rule:

    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.
    DescriptionEnter details about the Rule in the context of your Ruleset.
    ActiveYou must select this to make the Rule available for the Ruleset when you generate a document.
    Filter By Ignore fields in this section unless you are including a Clause component as part of your rule. Fields in this section control whether the Rule will be applicable to the Agreement, based on the filter criteria defined. If it matches the Rule may be applied; however, if it does not match then the Rule will be skipped. Note: If you are filtering the Rule using these values, you must have configured a Field Set as described in Dynamic Document Assembly Workflow: Clauses.
  3. Click Save to display the Doc Assembly Ruleset record.

Creating Doc Assembly Components

  1. Click New Doc Assembly Component. The New Doc Assembly Component form is displayed.



  2. Enter the following values for the Component:

    OptionDescription
    SequenceEnter the order in which the component is inserted in the master agreement template, when you Preview or Generate an agreement document.
    Type Choose 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.
    ContentOnly applicable if the Component Type = Clause. Use 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.
    Component Type

    Choose the Component Type to determine the specific content that is inserted into the generated document for this component. Component Types can be:

    • Clause – use this Component Type when you want the inserted content to be the clause specified by the Content field.
    • Attachment (Id) – use this Component Type when you want the inserted content to be an attachment with a specific Attachment ID into the generated document. The Attachment ID can be from any Header or Line Item-level object. Use the Attachment ID field to identify the specific Attachment ID.
    • Attachment (Object/Field) – use this Component Type when you want the inserted content to be an attachment specified through a field on the context record or through one of its relationships. This can be a formula field that returns the Attachment ID as a text string, or a field relationship from the context object that holds an Attachment ID string. Use the Field Name field with this Component Type (see below).
    • Parent (Object/Field) – use this Component Type when you want the inserted content to be an attachment residing in the Notes & Attachments related list of a lookup from the context object (e.g. an attachment on a Product lookup from Agreement Line Item). Use the Field Name field with this Component Type (see below). Note: This Component only brings the first attachment on the lookup record and is determined by Last Modified Date.
    Field Name

    Only applicable if the Component Type = Attachment (Object/Field) or Parent (Object/Field). Enter the API Field Name that refers to an attachment on a line item through a field on the line item record, a Salesforce relationship, or a parent record.

    • Attachment (Object/Field) – Field Name can refer to an attachment through a field on the context record (e.g. Agreement Line Item) or through a relationship. Examples:
      • ProductId__r.ShortDescription__c, where ShortDescription__c is a field on the Product that points to an attachment.
      • ProductSpec__c is a formula field on the Agreement Line Item object. The Attachment ID is pulled from the formula field value (the formula value can be a relationship, as above, or any other formula that returns text in the form of an Attachment ID).
    • Parent (Object/Field) – Field Name should be the API name of the Parent Reference field that points to the record where the attachment resides. For example, if the context object for the Ruleset is Agreement Line Item, then the parent reference field could be Apttus__ProductId__c.
    Attachment Id

    Only applicable if the Component Type = Attachment (Id). Enter the Attachment ID of a specific attachment on any object.

  3. Click Save. Repeat these to create additional components to be used with the same Doc Assembly Rule.

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.