> For the complete documentation index, see [llms.txt](https://help.sdocs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.sdocs.com/sdocs/template-architecture/template-settings/advanced-options-tab/how-to-set-up-template-preview.md).

# How to Set Up Template Preview

Use a Salesforce record ID to preview a template with real data before rollout.

Template Preview lets you test document output with a real Salesforce record before users generate it.

This helps you catch layout issues, missing data, and overflow early.

### Set up template preview

{% stepper %}
{% step %}

### Open advanced settings

Open the **Advanced Options** tab in the Template Editor.
{% endstep %}

{% step %}

### Enter a preview record

Under **Advanced Template Settings**, find **Preview ID**.

Paste a valid `15`- or `18`-character Salesforce record ID.
{% endstep %}

{% step %}

### Trigger preview mode

Click outside the field.

The **Save & Preview** button appears at the top of the editor.
{% endstep %}

{% step %}

### Generate the preview

Click **Save & Preview**.

A new tab opens with the generated document for that record.
{% endstep %}
{% endstepper %}

### Find a record ID

Open a representative Salesforce record.

Copy the alphanumeric ID from the end of the browser URL.

Example:

```plaintext
https://yourinstance.salesforce.com/006Q000001AbCDEF
```

In this example, `006Q000001AbCDEF` is the record ID.

### What preview shows

Preview shows the generated document output, including:

* merge field data
* conditional rendering
* page breaks and formatting

### What preview does not show

Preview does not test:

* email settings
* file naming behavior
* task creation or attachment creation

Runtime prompts also use blank or default values during preview.

### Best practices

* Use dedicated test records with realistic data.
* Include long text and multiple related records.
* Label test records clearly so users do not change them.

{% hint style="info" %}
Template Preview respects the current user's Salesforce permissions and sharing rules.
{% endhint %}


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.sdocs.com/sdocs/template-architecture/template-settings/advanced-options-tab/how-to-set-up-template-preview.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
