Template - Resources
The Builder automatically retrieves all fields (both standard and custom) from the selected Master Object. In addition to these, you may need data from other records, record collections, or use variables with predefined values or store a value that can be used in the building process.
To achieve this, you create resources by clicking "+ Create New Resource" in the Resources section of the Builder and then completing the field filters on the New Resource page.
The available types of resources:
- Record Single Variable contains an entire record and all the field values of that record. Create them by selecting the Object type and setting conditions on the record fields.
- Record Collection Variable is a collection of records. Create them by selecting the Object type, setting conditions on the record fields, and specifying the order in which records are listed and limiting the number of records in the collection.
- Variable stores a value that can be used or changed throughout the building process. This resource can take any Field value or a Constant value, and you can assign a default value for the Variable.
These resources have been discussed in detail below -
A Record Single Variable contains an entire record and all of the field values on that record. Creating a Record Single Variable is like retrieving an Object Record with conditions set on the fields. For example, creating a Contract document from the Contract Object may require details from other associated or unassociated records, such as Opportunity amount or Account ACV. These Account or Opportunity records can be retrieved as a Record Single Variable with conditions set like Opportunity Id = Contract > Opportunity Id.
To create a Record Single Variable, follow the steps below -
- Click 'Resources'; the Resource Manager opens up.
- In the 'New Resource' pane, select Resource type from the drop-down as 'Record Single Variable'.
- Enter a Label, and the API Name will automatically populate.
- Select the Object Type.
- Set the 'Filters' or condition requirements to identify the object record.
- If there is more than one record that meets the condition requirements, you can 'Order by' a record field, and the variable will assign the first record in the order.
Refer to the video below to have a visual understanding of this step -
A Record Collection Variable is a collection of records. Creating a Record Collection Variable involves selecting the Object type and setting conditions on the record fields. You can also set conditions for the order in which records in the collection are listed and even limit the number of records in the collection.
To create a Record Collection Variable, follow the steps below -
- Click 'Resources'; the Resource Manager opens up.
- In the 'New Resource' pane, select Resource type from the drop-down as 'Record Collection Variable'.
- Enter a Label, and the API Name will automatically populate.
- Select the Object Type.
- Set the 'Filters' or condition requirements to identify the object records.
- You can order the output records by a record field using the 'Order by' option.
- You can limit the number of output records using the 'Limit Rows' option.
Creating a Record Collection Variable is similar to retrieving all Object Records that meet specific conditions set on the fields. For example, creating a Contract document from the Contract Object may require details from other associated or unassociated records, such as all Product Records associated with the Opportunity or all Contact Records associated with the Opportunity. These records can be retrieved as a Record Collection Variable with conditions like Contact > Account Id = Contract > Opportunity > Account Id.
A Variable stores a value that can be used or changed throughout the building process. This resource can take any Field value or a Constant value, and you can even assign a default value for the Variable.
Creating a Variable is similar to assigning a field's value or a hardcoded value to a Variable (in this case, the variable acts like a constant). For example, creating a Contract document from the Contract Object may require details from other associated or unassociated records, inserting conditions on content, or using a constant value across the document.
To create a Variable, follow the steps below -
- Click 'Resources'; the Resource Manager opens up.
- In the 'New Resource' pane, select Resource type from the drop-down as 'Variable'.
- Enter a Label, and the API Name will automatically populate.
- Assign a Value that the Variable should attain.
- You can even set a default value that the Variable will attain.