# Using Salesforce Flows with S-Docs in Experience Cloud

Salesforce Flows can be used alongside S-Docs to automate document-related processes, such as triggering document generation, guiding users through data entry, or supporting custom workflows in an Experience Cloud site.

Once a Flow is created, additional configuration is required to make it available to **Experience Cloud (external) users**.

{% hint style="info" %}

#### Prerequisites

Before adding a Flow to an Experience Cloud site:

* The Flow is created, activated, and tested in Salesforce
* Required object and field permissions are already configured
* The Flow is designed to support **external users (guest user)**

**For details on external (guest users) vs. authenticated users check out:** [Configuring SDK for Authenticated vs. Unauthenticated Users](file:///workflows/software-development-kit-sdk/configuring-sdk-for-authenticated-vs-unauthenticated-users.md)
{% endhint %}

## Granting Flow Access to Experience Cloud Users

By default, Flows may not be accessible to community users. You must explicitly grant access to the appropriate profiles or permission sets.

### Steps

{% stepper %}
{% step %}

#### Grant access to profiles or permission sets

1. Navigate to **Setup → Flows**
2. Locate the Flow you want to expose in Experience Cloud
3. Click the **dropdown** next to the Flow
4. Select **Edit Access**
5. Enable **Override default behavior and restrict access to enabled profiles or permission sets**
6. Select the **Experience Cloud profiles** or **permission sets** that require access
7. Save changes

This step is required for community users to run the Flow within the Experience Cloud site.
{% endstep %}
{% endstepper %}

## Adding the Flow to the Experience Cloud Site

Once access is granted, the Flow can be added to the portal.

### Steps

{% stepper %}
{% step %}

#### Add the Flow component to the site

1. Navigate to **Setup → All Sites**
2. Open **Builder** for the Experience Cloud site
3. Select the page where the Flow should be displayed
   * Record page
   * Home page
   * Custom page
4. From the component panel, drag and drop the **Flow** component onto the page
5. In the configuration panel:
   * Specify the **Flow Name**
   * Configure input variables if required
6. Preview the page to validate behavior
7. **Publish** the site
   {% endstep %}
   {% endstepper %}

{% hint style="info" %}

#### Considerations

* The Flow will not appear or run for users unless profile or permission set access is explicitly granted
* Ensure the Flow logic accounts for external user context and sharing
* If the Flow interacts with S-Docs, confirm:
  * S-Docs sharing settings are configured
  * Required S-Docs permission sets are assigned
    {% endhint %}


---

# 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/experience-cloud-site-setup-for-community-users-with-s-docs/using-salesforce-flows-with-s-docs-in-experience-cloud.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.
