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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
