> For the complete documentation index, see [llms.txt](https://docs.upsmith.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.upsmith.app/atlassian-cloud/salesforce-for-confluence/user-guide/salesforce-templates.md).

# 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>
