> 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-list-macro.md).

# Salesforce List Macro

To setup Salesforce List Macro, go to your desired confluence page.

Type **/sales.**

Select **Salesforce List.**

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

Select **Connection**.

There are two ways to define Salesforce List Macro:

1. Manually inserting SOQL in each macro
2. Use pre defined query template

### 1. Manually inserting SOQL in each macro

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

Select **Use SOQL**.

Type your **SOQL query**.

Click **Preview**. Then, click **Insert**.

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

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

### Use pre-defined Query Template

Inserting SOQL manually gives you flexibility. However, you can use **Query Template** to enhance reusability.

Refer to [Salesforce Templates](/atlassian-cloud/salesforce-for-confluence/user-guide/salesforce-templates.md) to setup Templates.

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

Select your desired **Query template**.

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

If the template doesn't contain variables, you can click **Insert**.

For template containing [Template Variables](/atlassian-cloud/salesforce-for-confluence/user-guide/template-variables.md), you will need to fill in the gaps.&#x20;

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

In this case, you need to fill in the variable Account.

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

Click **Insert** once you are done.
