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

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–below is an example.

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

Shown below is a Request assigned to the Viral Production team. Before you finish, you will again need to remove all rows with a null value (lines 9-11, lines 18-20).

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:

  1.  Takes an entire template back to its original state by updating with only a pair of curly brackets
  2. Enters a taskID and removes null values to bring up Task fields
  3. Modifies the Assignee, Task float field, Request dropdown field, and Request integer field
  4. Removes null values once more
  5. Selects Update to complete the template

With the modifications made above, including auto-add set to true, the Request creation modal appears as below:

Did this answer your question?