# S-Docs Invocable Actions

### SDOC\_\_CombineDocumentsInvocable

* **Label:** Combine Documents
* **Description:** Creates a combined S-Doc from a list of S-Doc Ids.

#### Inputs

<table data-full-width="true"><thead><tr><th width="209.5999755859375">Name</th><th width="89.5999755859375">Type</th><th width="90.4000244140625" align="right">Required</th><th width="126.4000244140625" align="right">Max Occurs</th><th>Label</th><th>Description</th></tr></thead><tbody><tr><td><code>combinedFileLocations</code></td><td><code>ID</code></td><td align="right">No</td><td align="right">2000</td><td>Combined Document File Locations</td><td>Enter IDs for records or libraries for which to create ContentDocumentLinks to the generated combined document.</td></tr><tr><td><code>combinedFileName</code></td><td><code>STRING</code></td><td align="right">No</td><td align="right">1</td><td>Combined Document File Name</td><td>Enter the file name for the combined document output. Defaults to <code>Combined Document</code>.</td></tr><tr><td><code>sdocIds</code></td><td><code>STRING</code></td><td align="right">Yes</td><td align="right">2000</td><td>S-Doc Ids</td><td>IDs of the S-Docs to be combined.</td></tr></tbody></table>

#### Outputs

<table data-full-width="true"><thead><tr><th>Name</th><th>Type</th><th align="right">Max Occurs</th><th>Label</th><th>Description</th></tr></thead><tbody><tr><td><code>sDocIds</code></td><td><code>STRING</code></td><td align="right">2000</td><td>Combined S-Docs</td><td>The combined S-Doc Id(s).</td></tr></tbody></table>

***

### SDOC\_\_EmailInvocable

* **Label:** Send Email
* **Description:** Send an Email.

#### Inputs

<table data-full-width="true"><thead><tr><th width="196">Name</th><th width="103.20001220703125">Type</th><th width="84.7999267578125" align="right">Required</th><th width="109.5999755859375" align="right">Max Occurs</th><th>Label</th><th>Description</th></tr></thead><tbody><tr><td><code>attachmentIds</code></td><td><code>ID</code></td><td align="right">No</td><td align="right">2000</td><td>Attachments</td><td>ID(s) of attachment(s) to include in the email.</td></tr><tr><td><code>bccAddress</code></td><td><code>STRING</code></td><td align="right">No</td><td align="right">2000</td><td>BCC Recipient Email Address</td><td>BCC address(es) to send the email to.</td></tr><tr><td><code>ccAddress</code></td><td><code>STRING</code></td><td align="right">No</td><td align="right">2000</td><td>CC Recipient Email Address</td><td>CC address(es) to send the email to.</td></tr><tr><td><code>enforceSharingRules</code></td><td><code>BOOLEAN</code></td><td align="right">No</td><td align="right">1</td><td>System Mode Generation (Experience Cloud)</td><td>Grants unauthenticated or logged-in Experience Cloud users system-level permissions for generation events.</td></tr><tr><td><code>orgWideAddress</code></td><td><code>STRING</code></td><td align="right">No</td><td align="right">1</td><td>Org-Wide Email Address</td><td>Org-wide address of the email.</td></tr><tr><td><code>recordId</code></td><td><code>ID</code></td><td align="right">Yes</td><td align="right">1</td><td>Base Record ID</td><td>ID of base record to be used with template.</td></tr><tr><td><code>subject</code></td><td><code>STRING</code></td><td align="right">No</td><td align="right">1</td><td>Subject Line</td><td>Subject of the email.</td></tr><tr><td><code>templateNameOrId</code></td><td><code>STRING</code></td><td align="right">Yes</td><td align="right">1</td><td>S-Docs Email Template Name or ID</td><td>Name or ID of template to be used in the email.</td></tr><tr><td><code>toAddress</code></td><td><code>STRING</code></td><td align="right">No</td><td align="right">2000</td><td>Recipient Email Address</td><td>Address(es) to send the email to.</td></tr></tbody></table>

#### Outputs

<table data-full-width="true"><thead><tr><th>Name</th><th>Type</th><th align="right">Max Occurs</th><th>Label</th><th>Description</th></tr></thead><tbody><tr><td><code>sendSuccessful</code></td><td><code>BOOLEAN</code></td><td align="right">1</td><td>Send Successful</td><td>Indicates whether the email was successfully sent.</td></tr></tbody></table>

***

### SDOC\_\_FileCreationInvocable

* **Label:** Create PDF File from S-Doc
* **Description:** Creates a PDF file from an S-Doc ID.

#### Inputs

<table data-full-width="true"><thead><tr><th>Name</th><th>Type</th><th align="right">Required</th><th align="right">Max Occurs</th><th>Label</th><th>Description</th></tr></thead><tbody><tr><td><code>sdocId</code></td><td><code>ID</code></td><td align="right">Yes</td><td align="right">1</td><td>S-Doc Id</td><td>ID of S-Doc to generate a PDF file from.</td></tr></tbody></table>

#### Outputs

<table data-full-width="true"><thead><tr><th>Name</th><th>Type</th><th align="right">Max Occurs</th><th>Label</th><th>Description</th></tr></thead><tbody><tr><td><code>file</code></td><td><code>SOBJECT</code></td><td align="right">1</td><td>Generated File</td><td>The generated PDF file.</td></tr></tbody></table>

***

### SDOC\_\_GenerateBatchInvocable

* **Label:** Generate Documents in Batch
* **Description:** Generates documents using the Apex Batchable interface.

#### Inputs

<table data-full-width="true"><thead><tr><th width="208.79998779296875">Name</th><th width="91.20001220703125">Type</th><th width="90.4000244140625" align="right">Required</th><th align="right">Max Occurs</th><th>Label</th><th>Description</th></tr></thead><tbody><tr><td><code>batchSize</code></td><td><code>INTEGER</code></td><td align="right">No</td><td align="right">1</td><td>Batch Size</td><td>Number of records to process in each batch.</td></tr><tr><td><code>collateCombined</code></td><td><code>BOOLEAN</code></td><td align="right">No</td><td align="right">1</td><td>Collate Combined Documents</td><td>Sort documents in the combined document to collate by base object.</td></tr><tr><td><code>combineAll</code></td><td><code>BOOLEAN</code></td><td align="right">No</td><td align="right">1</td><td>Combine Documents</td><td>Combine all generated documents into one PDF.</td></tr><tr><td><code>combinedFileLocations</code></td><td><code>ID</code></td><td align="right">No</td><td align="right">2000</td><td>Combined Document File Locations</td><td>IDs for records/libraries to create ContentDocumentLinks for the combined document.</td></tr><tr><td><code>combinedFileName</code></td><td><code>STRING</code></td><td align="right">No</td><td align="right">1</td><td>Combined Document File Name</td><td>Name for combined output. Defaults to <code>Combined Document</code>.</td></tr><tr><td><code>enforceSharingRules</code></td><td><code>BOOLEAN</code></td><td align="right">No</td><td align="right">1</td><td>Deprecated</td><td>Deprecated.</td></tr><tr><td><code>recordIds</code></td><td><code>STRING</code></td><td align="right">Yes</td><td align="right">2000</td><td>Base Record IDs</td><td>ID(s) of base record(s) used in generation.</td></tr><tr><td><code>templateIds</code></td><td><code>STRING</code></td><td align="right">Yes</td><td align="right">2000</td><td>Template IDs</td><td>ID(s) of template(s) used in generation.</td></tr></tbody></table>

#### Outputs

<table data-full-width="true"><thead><tr><th>Name</th><th>Type</th><th align="right">Max Occurs</th><th>Label</th><th>Description</th></tr></thead><tbody><tr><td><code>jobId</code></td><td><code>ID</code></td><td align="right">1</td><td>Batch Job ID</td><td>ID of the queued Batch Job.</td></tr></tbody></table>

***

### SDOC\_\_GenerateDocumentInvocable

* **Label:** Generate Document
* **Description:** Generates a document.

#### Inputs

<table data-full-width="true"><thead><tr><th>Name</th><th>Type</th><th align="right">Required</th><th align="right">Max Occurs</th><th>Label</th><th>Description</th></tr></thead><tbody><tr><td><code>enforceSharingRules</code></td><td><code>BOOLEAN</code></td><td align="right">No</td><td align="right">1</td><td>System Mode Generation (Experience Cloud)</td><td>Grants unauthenticated or logged-in Experience Cloud users system-level permissions for generation events.</td></tr><tr><td><code>recordId</code></td><td><code>ID</code></td><td align="right">Yes</td><td align="right">1</td><td>Base Record ID</td><td>ID of base record used in generation.</td></tr><tr><td><code>templateId</code></td><td><code>ID</code></td><td align="right">No</td><td align="right">1</td><td>Template ID</td><td>If selecting by template name, do not use this field.</td></tr><tr><td><code>templateName</code></td><td><code>STRING</code></td><td align="right">No</td><td align="right">1</td><td>Template Name</td><td>Name of template used in generation.</td></tr></tbody></table>

#### Outputs

<table data-full-width="true"><thead><tr><th>Name</th><th>Type</th><th align="right">Max Occurs</th><th>Label</th><th>Description</th></tr></thead><tbody><tr><td><code>contentDocumentId</code></td><td><code>STRING</code></td><td align="right">1</td><td>Generated ContentDocument ID</td><td>ID of generated ContentDocument.</td></tr><tr><td><code>fileName</code></td><td><code>STRING</code></td><td align="right">1</td><td>Generated File Name</td><td>Name of generated file.</td></tr><tr><td><code>sdocId</code></td><td><code>STRING</code></td><td align="right">1</td><td>Generated SDoc ID</td><td>ID of generated SDoc.</td></tr></tbody></table>

***

### SDOC\_\_PrepareEnvelopeInvocable

* **Label:** Prepare Envelope
* **Description:** Creates an envelope.

#### Inputs

<table data-full-width="true"><thead><tr><th>Name</th><th>Type</th><th align="right">Required</th><th align="right">Max Occurs</th><th>Label</th><th>Description</th></tr></thead><tbody><tr><td><code>sdocIdsString</code></td><td><code>STRING</code></td><td align="right">Yes</td><td align="right">1</td><td>SDoc IDs</td><td>Comma-separated list of SDoc IDs to include in the envelope.</td></tr><tr><td><code>signInPerson</code></td><td><code>BOOLEAN</code></td><td align="right">No</td><td align="right">1</td><td>Sign in Person</td><td>Set true for in-person signing use cases.</td></tr></tbody></table>

#### Outputs

<table data-full-width="true"><thead><tr><th>Name</th><th>Type</th><th align="right">Max Occurs</th><th>Label</th><th>Description</th></tr></thead><tbody><tr><td><code>envelopeId</code></td><td><code>ID</code></td><td align="right">1</td><td>Envelope ID</td><td>ID of created envelope.</td></tr></tbody></table>

***

### SDOC\_\_RefreshDocumentDataInvocable

* **Label:** Refresh Document Data
* **Description:** Refreshes a document's data.

#### Inputs

<table data-full-width="true"><thead><tr><th>Name</th><th>Type</th><th align="right">Required</th><th align="right">Max Occurs</th><th>Label</th><th>Description</th></tr></thead><tbody><tr><td><code>enforceSharingRules</code></td><td><code>BOOLEAN</code></td><td align="right">No</td><td align="right">1</td><td>System Mode Generation (Experience Cloud)</td><td>Grants unauthenticated or logged-in Experience Cloud users system-level permissions for generation events.</td></tr><tr><td><code>sdocId</code></td><td><code>ID</code></td><td align="right">Yes</td><td align="right">1</td><td>S-Doc ID</td><td>ID of S-Doc record to refresh.</td></tr></tbody></table>

#### Outputs

<table data-full-width="true"><thead><tr><th>Name</th><th>Type</th><th align="right">Max Occurs</th><th>Label</th><th>Description</th></tr></thead><tbody><tr><td><code>sdocId</code></td><td><code>STRING</code></td><td align="right">1</td><td>Refreshed SDoc ID</td><td>ID of refreshed SDoc.</td></tr></tbody></table>

***

### SDOC\_\_SealEnvelopeInvocable

* **Label:** Seal Envelope
* **Description:** Seal an envelope.

#### Inputs

<table data-full-width="true"><thead><tr><th>Name</th><th>Type</th><th align="right">Required</th><th align="right">Max Occurs</th><th>Label</th><th>Description</th></tr></thead><tbody><tr><td><code>envelopeId</code></td><td><code>ID</code></td><td align="right">Yes</td><td align="right">1</td><td>Envelope ID</td><td>ID of envelope to seal.</td></tr></tbody></table>

#### Outputs

<table data-full-width="true"><thead><tr><th>Name</th><th>Type</th><th align="right">Max Occurs</th><th>Label</th><th>Description</th></tr></thead><tbody><tr><td><code>signingLink</code></td><td><code>STRING</code></td><td align="right">1</td><td>Signing Link</td><td>Signing link of the envelope.</td></tr></tbody></table>

***

### SDOC\_\_UserInputInvocable

* **Label:** Generate S-Doc With Input
* **Description:** Generates an S-Doc with user input.

#### Inputs

<table data-full-width="true"><thead><tr><th>Name</th><th>Type</th><th align="right">Required</th><th align="right">Max Occurs</th><th>Label</th><th>Description</th></tr></thead><tbody><tr><td><code>enforceSharingRules</code></td><td><code>BOOLEAN</code></td><td align="right">No</td><td align="right">1</td><td>System Mode Generation (Experience Cloud)</td><td>Grants unauthenticated or logged-in Experience Cloud users system-level permissions for generation events.</td></tr><tr><td><code>objectId</code></td><td><code>ID</code></td><td align="right">Yes</td><td align="right">1</td><td>Object Id</td><td>ID of object used in generation.</td></tr><tr><td><code>templateNameOrId</code></td><td><code>STRING</code></td><td align="right">Yes</td><td align="right">1</td><td>Template Name or Id</td><td>Name or ID of template used in generation.</td></tr><tr><td><code>userInputs</code></td><td><em>(unspecified by API metadata)</em></td><td align="right">Yes</td><td align="right">2000</td><td>User Inputs</td><td>User inputs for merge fields used in generation.</td></tr></tbody></table>

#### Outputs

<table data-full-width="true"><thead><tr><th>Name</th><th>Type</th><th align="right">Max Occurs</th><th>Label</th><th>Description</th></tr></thead><tbody><tr><td><code>sdoc</code></td><td><code>SOBJECT</code></td><td align="right">1</td><td>Generated SDoc__c</td><td>The generated <code>SDoc__c</code> object.</td></tr></tbody></table>


---

# 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/developer-hub/document-generation-workflows/apex-and-programmatic-automation/reference/s-docs-invocable-actions.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.
