Templatize Request fields so that default values are present in the Request modal when creating a Request. Request Templates allow you to:
-
Assign a default user or team to execute a Request (e.g. set Assigned To to the "Protein Production" team)
-
Assign default values to a Request (e.g. set Priority to "Low")
Create a Request Template
1. Navigating to your Request configuration settings and select the Request you want to templatize.
2. Scroll to the bottom of the configuration screen and select Create Request Template. A new sub-tab will appear at the top titled Template Settings.
3. Click into the new Template Settings sub-tab to find the JSON editor for the template:
4. Edit the following fields to provide default values:
-
Request fields: Fields within the main Request (fields located above tasks)
-
Task fields: Fields of specified tasks
-
Assignees: Whom the request is assigned to
-
Default Project: Default project request is assigned permissions from
To edit these fields, remove the null value for the field you wish to create a templated field value for. Insert the default value in quotations where the null value previously was. Ensure that:
-
The default value fits the field type of the field you are working with (e.g. integers can only be filled with integers, more examples here)
-
The default value is written in quotations (e.g. if your default value is 1, ensure that you type "1", including the quotations).
Enable Task Fields
To view the available Task fields, modify the JSON as follows:
1. Find the TaskID number, located at the end of the URL, by navigating to the task; for example: https://yoursite.benchling.com/org/request/tasks/reqtsksch_CVx7ASXy
2. Copy the "reqtsksch_###" from the URL
3. In the template settings where the line reads "taskTemplates", paste the ID between two quotes, and insert a colon and another set of curly brackets after the closing quote: "taskTemplates" [ { "taskSchema": "reqtsksch_33a3tk1G": {} }]
4. Remove all lines where the word null appears.
5. Click Update to bring up all field values.
Modify Request and Task Fields
Modifying fields will depend on their data type:
-
Integers: replace null with the digit: 9
-
Floating point: replace null with a decimal value: 5.5
-
Text: replace null with text between double quotes: "Text"
-
Dropdown: replace null with the option text between double quotes: "Option 3"
-
Entity: replace null with the entityID, found in the URL of an entity: "seq_XWgV4ESr"
Modify Assignees
Requests can be assigned to individuals or teams.
-
To assign a team, enter the exact name of the team between quotes.
-
To assign an individual user, enter the handle of the user between quotes (this can be found in the Member tab of the Organization settings).
Automatically Add a Task to a Request
Tasks can be automatically added to a Request. Under the "taskTemplates" section, there is a line with the field autoAdd which defaults to false. Change this to true to have this Task automatically populate within the Request when a user opens the corresponding Request creation modal.
Shown below is a clip where a user:
-
Takes an entire template back to its original state by updating with only a pair of curly brackets
-
Enters a taskID and removes null values to bring up Task fields
-
Modifies the Assignee, Task float field, Request dropdown field, and Request integer field
-
Removes null values once more
-
Selects Update to complete the template