> 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/automation-and-document-lifecycle/workflows.md).

# Generate S-Docs on Record Pages

## Lightning Web Components

Lightning Web Components, or **LWCs**, are Salesforce components you add to Lightning pages.

S-Docs uses LWCs to bring document actions directly onto a record page.

That lets users generate, view, email, refresh, and edit documents without leaving the record.

This section focuses on the two main S-Docs record page components:

* **Generate Documents (S-Docs)**
* **Documents (S-Docs)**

{% hint style="info" %}
Generated documents are saved as **Salesforce Files** and linked to the record.
{% endhint %}

### Start with the path that fits your goal

If you are starting from scratch, begin with the Quick Start tutorial.

If your record page is already set up, jump to the task guide you need.

If you need exact component properties, use the LWC reference in the Developer's Hub.

<table data-column-title-hidden data-view="cards"><thead><tr><th>Title</th><th>Description</th><th data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Quick Start Tutorial</strong></td><td>Start brand new. Add both S-Docs record page components, configure the core settings, and test the full workflow.</td><td><a href="/quick-start/document-generation/add-s-docs-lightning-components-to-a-record-page.md">Configure Document Generation On Your Record Page</a></td></tr><tr><td><strong>LWC How-To Guides</strong></td><td>Use focused task guides for common setup and usage flows.</td><td></td></tr><tr><td><strong>LWC Reference</strong></td><td>Use the Developer's Hub reference for component settings, behavior details, dependencies, and limits.</td><td><a href="/developer-hub/document-workflows/s-docs-lwc-reference.md">S-Docs LWC Reference</a></td></tr></tbody></table>

### What you can do with S-Docs LWCs

Use S-Docs LWCs when you want to:

* generate documents from a Lightning record page
* view generated files on the same record
* send generated files by email
* refresh a file with current Salesforce data
* track versions or open supported files in Live Edit

### LWC how-to guides

Use these guides when you already know the task you need to complete:

* [How To: Sending Generated Documents via Email](/sdocs/automation-and-document-lifecycle/workflows/sending-generated-documents-via-email-s-docs-lwc.md)
* [How To: Refresh Document Data Within the Documents](/sdocs/automation-and-document-lifecycle/workflows/refresh-document-data-within-the-documents-s-docs-lwc.md)
* [How To: Editing Generated Documents](/sdocs/automation-and-document-lifecycle/workflows/editing-generated-documents-live-edit.md)
* [How To: View Document Versions in the Documents LWC](/sdocs/automation-and-document-lifecycle/workflows/view-document-versions-in-the-documents-lwc.md)
* [Lightning Web Security and Content Delivery Network](/sdocs/automation-and-document-lifecycle/workflows/lightning-web-security-and-content-delivery-network.md)

### Related note

The **S-Docs Usage Metrics** component is added to a Lightning Home page, not a record page.

Use [How To: Configure the S-Docs Usage Metrics LWC on Home Page](/sdocs/administration/install-configure/configure-the-s-docs-usage-metrics-lwc-on-home-page.md) when you need usage reporting.


---

# 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/automation-and-document-lifecycle/workflows.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.
