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 -
- 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.
- Insert Picture - With this action, you can insert pictures from URL fields into your document template.
- 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.
- 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.
- 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.
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 -
- Select Insert Field in the Select Action drop-down menu.
- 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.
- 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.
This action enables you to insert a picture from a URL field. Follow the steps below to insert a Picture -
- Select Insert Picture in the Select Action drop-down menu.
- 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.
- 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.
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 -
- Select "Insert Table" in the "Select Action" action drop-down.
- Select any Record Collection Variable Resource in the 'Resource Type'. This shall be the collection variable on which the table is based.
- Give a Name to the Column in the 'Column Header'. You can type the Column Header or Select field or Resource.
- For 'Column Data', select any of the collection Variable record Object's field.
- In the similar manner, you can add as many columns as you want.
- Once finalised, click insert to insert the Table onto the template canvas.
This action allows you to conditionally insert any content (text, table, picture) into the template. Follow the steps below to insert a condition -
- Select "Insert Condition" in the "Select Action" drop-down menu.
- Select the content to be inserted based on the condition.
- 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
- 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.
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 -
- Select "Document Title" in the "Select Action" drop-down menu.
- Choose a field to be set as the Document Title.
- Click "Save" to set the selected field as the Document Title. The generated document will have this name.