You are here:
Set Up Document Generation Customer Community Plus User
Perform these tasks to set up the customer community plus digital experience user. This topic applies to both Omnistudio Document Generation and Salesforce Document Generation.
The API Access Control restricts users from accessing your Salesforce APIs unless they're pre-authorized through an approved connected app. Verify that the "For customers and partners, limit API access to only installed connected apps" option isn't selected in the API Access Control settings. Selecting this option causes an INVALID_SESSION_ID error during document generation. This happens because the REST API call is made with a session that isn't generated by the Connected App; resulting in the failure to fetch the contentVersion record data from the org. See Restrict Access to APIs with Connected Apps.
For server-side Omnistudio document generation to work, the execution mode for Integration Procedure must be set to Synchronous. Otherwise, document generation will fail for digital experience users.
*.site.com to *.lightning.force.com,
which causes the Network ID on the session to differ. To resolve this issue, set the
Network ID on the ContentVersion record by using an Apex trigger on the ContentVersion
object.trigger ContentVersionTestTrigger on ContentVersion (before insert) {
Id userId = UserInfo.getUserId();
List<NetworkMember> members = [
SELECT NetworkId
FROM NetworkMember
WHERE MemberId = :userId
LIMIT 1
];
if (!members.isEmpty() && members[0].NetworkId != null) {
Id networkId = members[0].NetworkId;
for (ContentVersion cv : Trigger.new) {
if (cv.NetworkId == null) {
cv.NetworkId = networkId;
}
}
}
}Enable Salesforce Digital Experience for Omnistudio Document Generation Customer Community Plus User
Enable Salesforce Digital Experiences, configure a domain name, and then enable standard external profiles.
- From Setup, in the Quick Find box, enter Digital Experiences.
- Click Settings.
- Select the Enable Digital Experiences checkbox.
- Enter the domain name. Click Check Availability.
- Click Save, and then click OK.
- From Settings, scroll to Role and User Setting, and then select Allow using standard external profiles for self-registration, user creation, and login.
- Click OK, and then click Save.
Create an Account for Omnistudio Document Generation Customer Community Plus User
Create an account and associate it with a contact.
- In the App Launcher, search for and open Accounts.
- Click New to add required details and then save the account.
Create an Omnistudio Document Generation Customer Community Plus User
Create a contact and enable it as customer community plus user.
- In the App Launcher, search for and open Contacts.
- Click New.
- In the Account Name field, select the account that you created for your customer community plus.
- Save the contact.
- Open the new contact that you created, and then select Enable Customer User.
- In the New User page, select these items:
- Define other required fields, such as email and nickname.
- Select Salesforce CRM Content User.
-
Click Save, and then click OK.
Important
If you receive a Portal Account Owner has No Role error, assign a profile to the owner of the customer community plus account. Then repeat this procedure.
Clone and Configure a Customer Community Plus Profile for Omnistudio Document Generation Customer Community Plus User
On the Profile Setup page, to create a custom profile you must clone an existing profile.
If you want to use custom profiles for your customer community plus users, Salesforce recommends that you clone the user profile linked to your user license and customize that profile.
- From Setup, in the Quick Find box, enter Profiles, and then select Profiles.
- Click the name of a profile that’s similar to the one that you want to create, and then in the profile page, click Clone.
- Enter a profile name.
- Click Save.
- Click Edit, next to the cloned profile name.
-
From Standard Object Permissions section, select access level as
read for these objects:
-
Omni Data Transformations
-
Omni Data Transformation Items
-
Omni Processes
-
-
From the General User Permissions section, select these options:
-
Enables consumers and partners to execute Omniscripts, DRs, Cards through a Community or off platform.
-
Enables Customers and Partners to generate documents via communities.
-
- From the Administrative Permissions section, select API Enabled.
- Click Save.
Create a Digital Experience Site for Omnistudio Document Generation Customer Community Plus User
Configure a name and a URL for the digital experience site.
- From Setup, in the Quick Find box, enter Digital Experiences.
- Click All Sites I New.
- Select a Lightning template (next to the lightning icon) or click Build Your Own I Get Started.
- In the Name field, enter a name for the digital experience site, such as CustomerCommunityPlusSite.
-
In the optional part of the URL field, enter the same name you entered in step
4.
Important
Although marked as optional, this field is mandatory. Omnistudio Document Generation requires that you set up your customer community plus URL.
- Click Create.
Create a Permission Set for Omnistudio Document Generation Customer Community Plus User
To grant the licenses and permissions, create a permission set for digital experience customer community plus users.
- From Setup, in the Quick Find box, enter Perm then select Permission Sets.
- Click New.
-
Enter a label, such as, Omnistudio Runtime for Communities.
By default, the API Name is the same label.
-
Click Save.
A prompt appears listing dependent permissions.
- Click Save.
Add Apex Class Access and Visualforce Page Access to Permission Set for Document Generation Customer Community Plus Profile
After you create the permission set, add the apex class access and Visualforce page access to the customer community plus profile. You can add the apex class access directly from the customer community plus user profile or from the permission set that you created.
- Open the custom permission set that you created, such as, Omnistudio Runtime for Communities.
- Click Apex Class Access.
-
Move these classes from the Available Apex Classes list to
the Enabled Apex Classes list.
Server-Side - omnistudio.ComponentController
- omnistudio.BusinessProcessDisplayController
- omnistudio.NewportUtilities
Client-Side - omnistudio.DocgenAppHandler
- omnistudio.DocGenObjectMappings
- omnistudio.DocGenUtility
- omnistudio.DocumentServiceClient
- omnistudio.DocxGenUtil
- omnistudio.ObjectDocumentCreationDocxController
- omnistudio.ObjectDocumentCreationDocxHandler
- omnistudio.ObjectDocumentCreationDocxService
- Click Save.
- Open the custom permission set that you created, such as, Omnistudio Runtime for Communities.
- Click Visualforce Page Access.
-
Move these classes from the Available Visualforce Pages
list to the Enabled Visualforce Pages list.
Server-Side - omnistudio.DRHome
- omnistudio.DRMapper
- omnistudio.OmniDesignerCustomLabelDeployer
- omnistudio.OmniLwcCompile
- omnistudio.OmniLwcDesignerTinyMceEditor
- omnistudio.OmniscriptDesigner
- omnistudio.OmniscriptDocuSignReturnPage
- omnistudio.OmniscriptHome
- omnistudio.OmniscriptInstancePage
- omnistudio.OmniscriptLwcDocuSignViewPdf
- omnistudio.OmniscriptLwcPreviewPage
- omnistudio.OmniscriptPreviewPage
- omnistudio.SessionPage
Client-Side - omnistudio.DocTemplateList
- omnistudio.DocumentTemplate
- Click Save.
Assign Permission Sets to Omnistudio Document Generation Customer Community Plus User
Assign DocGen runtime community user permission set and the custom permission set that you created.
- From Setup, in the Quick Find box, enter Users, and then select Users.
-
Click the name of the customer community plus user.
Don't click Edit.
- From the Permission Set Assignments section, click Edit Assignments.
-
Assign these permission sets:
- DocGen Runtime Community User
- The new permission set that you created in the previous step, such as Omnistudio Runtime for Communities.
- Click Save.
Configure Digital Experience Site for Omnistudio Document Generation Customer Community Plus User
Activate the customer community plus digital experience site and associate the site to the cloned customer community plus profile, assign the relevant permission sets.
- From Setup, in the Quick Find box, enter Digital Experiences.
- Click All Sites.
- Find the customer plus community that you created, and then click Workspaces I Administration.
- In Settings, click Activate. Click OK.
- In Preferences, select the Show All Settings in Workspaces check box, and then click Save.
- In Members, select Customer from the Search dropdown.
- Select the profile that you cloned earlier from Available Profiles, and then click Add to move the profiles to the Selected Profiles list. Click Save.
- Select the permission set that you created earlier from Available Permission Sets, and then click Add to move the permission sets to the Selected Permissions list. Click Save.
- Return to the Digital Experiences All Sites page.
- Close the window.
Add Docgen Document Template Library for Omnistudio Document Generation Customer Community Plus User
To generate document versions, you must add the customer community plus user as a member to the library.
- In the App Launcher, search for and open Files.
- Click Libraries.
- Click Docgen Document Template Library.
- Click Manage Members.
- Select the customer community plus user, and then enable Library Administrator access for the user.
- Click Add.
- Document Generation Close the window.
Define Sharing Rules for Document Generation for Omnistudio Document Generation Customer Community Plus User
Sharing rules grant customer community plus users read access to records. The documents that can be accessed depend on the rule You can create sharing rules based on your business needs. For document generation, create sharing rules for Document Templates, Omni Data Transformation, and Omni Process.
- From Setup, in the Quick Find box, enter Sharing.
- Click Sharing Settings.
- To set up the sharing rules for Document Templates, Omni Data Transformation, and Omni Process, scroll to the relevant Sharing Rules section, and then click New.
- Define required fields, such as label, rule name, rule type, and share with.
- Set up the sharing rules:
- Click Save.
- Repeat steps 3–6 for Omni Data Transformation Sharing Rules and Omni Process Sharing Rules.
Add Omniscripts to the Digital Experience Site for Omnistudio Document Generation Customer Community Plus User
You can add components such as Omniscripts, standard objects tabs for customer community plus user to be able to generate documents.
Launch LWC Omniscripts in Communities and Lightning Pages using the generated Omniscript Component. To add Omniscripts, see Add an LWC Omniscript to a Lightning or Experience Page


