Document Generation
Template Creation

Template - Actions

In the Actions section, you can perform various operations to customize your document templates according to your requirements. These actions allow you to insert fields, pictures, tables, apply conditions, and set document titles.

After setting up your resources, you can use various actions to build your template. These actions include -

  1. Insert Field - This action enables you to insert any field, both standard and custom, retrieved from the Master Object. You can also create resources and insert them as needed.
  2. Insert Picture - With this action, you can insert pictures from URL fields into your document template.
  3. Insert Table - This action allows you to insert tables based on records from Salesforce. You can customize the table's structure and content as required.
  4. Insert Condition - Insert conditions allow you to make conditional insertions of content, such as text, tables, or pictures, into your template. You can set up rules based on field values and apply logical operators to determine when the content is inserted.
  5. Document Title - This action enables you to assign a title to the generated documents from your template. You can select a field to serve as the document title, providing clarity and organization to your document generation process.

These steps and actions will help you build a comprehensive and dynamic template tailored to your specific needs.

Insert Field

This action allows you to insert any field (standard or custom) retrieved from the Master Object. If you want to insert data from other objects, you can create resources and insert them as well. Follow the steps below to insert a field -

  1. Select Insert Field in the Select Action drop-down menu.
  2. Choose the Field using drop down menu. The Field drop-down lists the fields you can use to create merge fields in your Word template, which will populate with corresponding data from Salesforce. The drop-down lists the Master Object's fields under the "Global Variable" section as "Record" variable, the created variable resources under the "Variable" section and the standard constants under the "Global Constants" section.
  3. Once you select the field, click "Insert" to place the field on the work area at the cursor's location. You can also copy and paste inserted fields within the work area.
Document image


Insert Picture

This action enables you to insert a picture from a URL field. Follow the steps below to insert a Picture -

  1. Select Insert Picture in the Select Action drop-down menu.
  2. Choose the URL Field using drop-down menu. The "URL" drop-down lists fields you can use to retrieve a public URL and insert the corresponding image.
  3. Once you select the field, click "Insert" to place the picture on the work area at the cursor's location. Adjust the placeholder of the inserted picture as needed.
Document image


Insert Table

This action enables you to insert Table based on Records from Salesforce. The Tables data can be based or retrieved from any Record Collection Variable Resource. As any Data Table, you can Name a Column in the 'Column Header' and the Data under a Column Header is displayed based on data from records in collection as row in the 'Column Data'.

To Insert a Table, follow the steps below -

  1. Select "Insert Table" in the "Select Action" action drop-down.
  2. Select any Record Collection Variable Resource in the 'Resource Type'. This shall be the collection variable on which the table is based.
  3. Give a Name to the Column in the 'Column Header'. You can type the Column Header or Select field or Resource.
  4. For 'Column Data', select any of the collection Variable record Object's field.
  5. In the similar manner, you can add as many columns as you want.
  6. Once finalised, click insert to insert the Table onto the template canvas.
Document image


Insert Condition

This action allows you to conditionally insert any content (text, table, picture) into the template. Follow the steps below to insert a condition -

  1. Select "Insert Condition" in the "Select Action" drop-down menu.
  2. Select the content to be inserted based on the condition.
  3. Set Up the Rules:
    • Add multiple rules using "+ Add condition".
    • Rule Parameters:
      • Field: Choose the field or variable whose value you want to evaluate.
      • Operator: Select an operator based on the data type of the resource.
      • Value:
        • Select an existing variable, constant, or field.
        • Manually enter a literal value or merge field.
    • Logic Between Rules:
      • AND:
        All rules must be met.
      • OR:
        Any rule must be met.
      • Custom: Custom rule logic. Provide the rule logic by entering characters:
        • Use numbers to refer to each rule.
        • Use AND, OR, or NOT to identify which combination of rules must be true.
        • Use parentheses to group parts of the string together.
        • Example: For
  4. Insert the Condition:
    • Once the condition is set up, click "Insert" to apply the condition to the selected content.
    • If the condition evaluates to true, the content is inserted in the generated document; otherwise, it will not be inserted.
Document image


Document Title

This action allows you to assign a title to the documents generated from a given template. Follow the steps below to set a Document Title -

  1. Select "Document Title" in the "Select Action" drop-down menu.
  2. Choose a field to be set as the Document Title.
  3. Click "Save" to set the selected field as the Document Title. The generated document will have this name.
Document image