For the complete documentation index, see llms.txt. This page is also available as Markdown.

Reference: Document Actions Framework

Quick facts

Attribute
Value

Supported entry points

SDK, LWC generation, S-Sign

Unsupported methods

Legacy buttons, Batch SDK

Action object

SDOC__Action__c

Parent object

SDOC__SDTemplate__c

Execution model

Asynchronous after generation

Field reference

API name
Label
Type
Use

Name

Action Name

Text

Admin-facing label for the action

SDOC__Template__c

Template

Lookup

Template that triggers the action

SDOC__Apex_Class__c

Apex_Class

Text area

Provider action class name

SDOC__Description__c

Description

Text area

Optional admin notes

SDOC__Parameters__c

Parameters

Text area

Provider settings as valid JSON

Provider-specific prerequisites

Google Drive

  • Use StoreInGoogleDriveAction

  • Configure a working Google auth provider

  • Configure a working named credential

  • Confirm the destination folder is reachable

AWS S3

  • Use StoreInAWSS3Action

  • Configure AWS Signature Version 4 authentication

  • Confirm the target bucket exists

  • Confirm the target path is writable

SharePoint

  • Use StoreInSharepointAction

  • Configure working Microsoft authentication

  • Confirm the target site and document library exist

  • Confirm the destination path is reachable

Box

  • Use SDBoxUploadController

  • Configure working Box authentication

  • Confirm the target folder exists

  • Confirm the destination path is reachable

Execution behavior

Document Actions run after document generation finishes.

They do not change template rendering.

They do not replace the generated Salesforce file.

The flow is:

  1. S-Docs generates the document in Salesforce.

  2. The template's Document Actions are queued.

  3. Each action runs after generation completes.

  4. The provider upload happens asynchronously.

  5. The external file may appear after a short delay.

Practical implications:

  • a generated Salesforce file can exist before the upload finishes

  • a short upload delay is normal

  • re-running generation will not fix auth or JSON issues by itself

Batch SDK failure note and workaround

Document Actions are not supported with Batch SDK.

If a template with Document Actions is used in batch generation, the actions will not run.

In some batch flows, you may also see queueing failures such as:

  • Too many queueable jobs added to queue

Recommended workaround:

  1. Clone the template.

  2. Remove Document Actions from the batch version.

  3. Use the action-enabled template only in SDK, LWC, or S-Sign flows.

  4. Use the batch-safe template for generateDocsInBatch.

Related pages:

Troubleshooting

The document generated, but nothing uploaded

Check these items:

  • the action is attached to the template you used

  • the action class matches the provider

  • provider authentication is still valid

  • the Parameters value is valid JSON

  • the target folder, bucket, or library still exists

The upload target is wrong

Review the values in SDOC__Parameters__c.

Most default setups use a fixed destination path.

Dynamic destination logic needs custom implementation.

The action works in one flow, but not in batch generation

Document Actions are not supported in Batch SDK.

Use a non-batch generation path instead.

If you need both patterns, keep a separate batch-safe template.

The upload appears later than expected

A short delay is expected.

The action runs after document generation completes.

The Parameters field keeps failing

Check these items:

  • the JSON starts with { and ends with }

  • all keys use double quotes

  • all string values use double quotes

  • there are no trailing commas

  • the destination values are valid for the target system

Last updated

Was this helpful?