Adding S-Docs to Customer Portals (Experience Cloud)
S-Docs Lightning Web Components (LWCs) allow Experience Cloud users to generate and manage documents directly from Salesforce record pages. When configured correctly, these components enable community users to generate documents, view previously generated files, and perform post-generation actions without leaving the Experience Cloud site.
This page covers how to configure the Generate Documents (S-Docs) and Documents (S-Docs) Lightning Web Components for use within an Experience Cloud site.
Sharing Settings for S-Docs in Experience Cloud
In addition to base object sharing, S-Docs custom objects must be shared correctly for LWCs to function as expected.
Ensure external sharing settings are configured for the base object used by your S-Docs templates:
S-Docs Custom Object Sharing
S-Docs uses custom objects to store templates, generated documents, and relationships to base records. The following objects must be shared with community users:
SDOC__SDTemplate__c – S-Docs templates
SDOC__SDoc__c – Generated documents
SDOC__SDRelationship__c – Relationship between documents and base records
If sharing is not configured correctly:
Templates selected in the LWCs will not appear for end users
Generated documents may not be visible
Permission Sets for Community Users
S-Docs LWCs rely on Apex classes that must be accessible to Experience Cloud users.
October ’23 Release and Later
Starting with the October ’23 release, S-Docs provides a managed permission set:
SDocs LWC Community User
Assign this permission set directly to community users.
Configuring the S-Docs LWCs
Step 1: Open Experience Cloud Builder
Open Experience Cloud Builder
Navigate to Setup → All Sites
Open Builder for the Experience Cloud site
Select the record detail page where documents should be generated
Choose Component Placement
Decide where document generation and document history should appear for users.
Common patterns include:
A dedicated “S-Docs” tab on the record page
A section within the record detail layout
The layout should align with how users are expected to generate and manage documents.
Add S-Docs Components
From the component panel:
Search for S-Docs
Drag and drop the following components:
Generate Documents (S-Docs)
Documents (S-Docs)

Configure Generate Documents (S-Docs) LWC
Select the Generate Documents (S-Docs) component to access its configuration panel.
Configuration Options:
Title Header displayed to users (default: Templates to Generate)
Template IDs or Names Comma-separated list of S-Docs template IDs or names
Notify User Displays a notification when document generation completes
Open Preview Automatically opens a document preview after generation
Record Id Do not modify (defaults to
{!recordId})Object API Name API name of the base object (e.g.,
Account,Case,Custom_Object__c)

Configure Documents (S-Docs) LWC
Select the Documents (S-Docs) component to configure document visibility and post-generation actions.
Configuration Options:
Title Header displayed to users (default: Generated Documents)
Email Template Record ID of the S-Docs email template to enable emailing documents
Automatically Open Email Editor Opens the email composer automatically after document generation
Record Id Do not modify (defaults to
{!recordId})Object API Name API name of the base object. For example: Account

Preview and Publish
Preview
Preview the Experience Cloud site to verify configuration
Publish
Publish the site once validation is complete
Last updated
Was this helpful?

