# Salesforce Templates

To facilitate reusability of Salesforce List, you can define Salesforce Template.

Locate **Apps** in the top navigation bar.

Select **Salesforce Template**.

<figure><img src="/files/QHTBUbdGms4HZyWXzDZ0" alt=""><figcaption></figcaption></figure>

### Adding new template

Click **+** to add new template.

<figure><img src="/files/K8J30L1koeC7LCr9bf5P" alt=""><figcaption></figcaption></figure>

Input your desired Template Name and SOQL Query.

<figure><img src="/files/1zlbQwn7nY4Gd1fe5c8x" alt=""><figcaption></figcaption></figure>

Click **Preview** before saving template.

Once your result is successfully previewed, click **Save**.

<figure><img src="/files/0XIaB98qOwqyHm9lEN2c" alt=""><figcaption></figcaption></figure>

### Using Template Variables

**Template variables** enable users to input variable values when inserting **Salesforce List** macro.

Use the syntax **{{VARIABLE\_NAME}}** in your SOQL query.

<figure><img src="/files/P3FhlhDn9hdCQRr53Kdp" alt=""><figcaption></figcaption></figure>

When inserting Salesforce List macro, users just need to fill in the variables.

In the example below, users only need to enter `Fields` variable to select relevant fields.

<figure><img src="/files/VlJcYdDgUXH08T5Uf8su" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.upsmith.app/atlassian-cloud/salesforce-for-confluence/user-guide/salesforce-templates.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
