# How To: Live Edit with Flows

Use this guide when you want users to select a record, choose a generated S-Doc, and open it in Live Edit from a Flow screen.

This pattern works well in Experience Cloud when users need controlled access to existing documents instead of direct access to the full Salesforce UI.

{% hint style="info" %}
Before you start:

* Enable Live Edit on the template that generated the file
* Use a supported format: **PDF**, **PDF-Upload**
* Activate and test the Flow in Salesforce
* Make sure the target users can access the Flow, base record, and related S-Doc records
  {% endhint %}

![image-20250826-201232.png](/files/9cb385fe740378199439605778fe0fc955540828)

### Build the Flow

{% stepper %}
{% step %}

#### Step 1 — Get the records users can work with

Use **Get Records** to return the records that match your entry criteria.

* Sort the results in **descending order**
* Choose **Store all records**
  {% endstep %}

{% step %}

#### Step 2 — Show the records in a table

Add a screen with a table component.

Let the user select one record.
{% endstep %}

{% step %}

#### Step 3 — Load the selected record details

Use a second **Get Records** element to retrieve the selected record from the table result.

This gives the next steps a single record context.
{% endstep %}

{% step %}

#### Step 4 — Query related S-Docs files

Get the related files from the **SDoc** object for the selected record.

Display the files in a second table.

Let the user select one file.
{% endstep %}

{% step %}

#### Step 5 — Add the SDoc Edit Live component

On the final screen, add the **SDoc Edit Live** component.

Pass the selected file's **SDoc ID** into the component.
{% endstep %}

{% step %}

#### Step 6 — Save and test the Flow

Confirm the user can:

* Select a record
* Select a related S-Doc
* Open the document in Live Edit
  {% endstep %}

{% step %}

#### Step 7 — Grant Flow access

Give the target profile or permission set access to the Flow.
{% endstep %}

{% step %}

#### Step 8 — Add the Flow to the Experience Cloud page

Place the Flow on the site page where users will launch it.
{% endstep %}

{% step %}

#### Step 9 — Verify sharing and permissions

Make sure users can access:

* The base record
* The related **SDoc** record
* The generated file used by Live Edit

If access is too restrictive, the Flow may run but the file list or editor will not load correctly.
{% endstep %}
{% endstepper %}

### Related setup

Use these pages if you still need to configure the supporting pieces:

* [Editing Generated Documents (Live Edit)](/sdocs/automation-and-document-lifecycle/workflows/editing-generated-documents-live-edit.md)
* [Using Salesforce Flows with S-Docs in Experience Cloud](/sdocs/automation-and-document-lifecycle/experience-cloud-site-setup-for-community-users-with-s-docs/using-salesforce-flows-with-s-docs-in-experience-cloud.md)


---

# Agent Instructions: 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:

```
GET https://help.sdocs.com/sdocs/automation-and-document-lifecycle/automate-with-flow/how-to-live-edit-with-flows.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
