docs: update docs for SMS, i18n, subject prefix, and 5-copy support
This commit is contained in:
parent
2e4ce0d80e
commit
3ddf8946f5
|
|
@ -132,6 +132,7 @@ See `docs/deployment-guide.md` section 5 for detailed Flow configuration steps.
|
||||||
- `recordId` → `{!recordId}`
|
- `recordId` → `{!recordId}`
|
||||||
- `language` → `{!SelectedLanguage}`
|
- `language` → `{!SelectedLanguage}`
|
||||||
- `emailSubject` → "Please review and sign these forms"
|
- `emailSubject` → "Please review and sign these forms"
|
||||||
|
- Note: The Apex layer will prefix the subject with `Docusign: ` automatically and will truncate the final subject to 100 characters to satisfy Docusign limits.
|
||||||
5. Store outputs:
|
5. Store outputs:
|
||||||
- `envelopeId` → `{!EnvelopeId}`
|
- `envelopeId` → `{!EnvelopeId}`
|
||||||
- `success` → `{!Success}`
|
- `success` → `{!Success}`
|
||||||
|
|
|
||||||
|
|
@ -357,7 +357,7 @@ After successful deployment, configure your Salesforce org:
|
||||||
- **Salesforce Record ID** — {!Record.Id}
|
- **Salesforce Record ID** — {!Record.Id}
|
||||||
- **Language** — en or es
|
- **Language** — en or es
|
||||||
- **Email Subject** — Optional custom subject
|
- **Email Subject** — Optional custom subject
|
||||||
- **Authorization to Release Form Copies** — Number of copies (1–3) for the Authorization to Release Information template; populated by the `authReleaseFormCopies` flow variable (defaults to 1)
|
- **Authorization to Release Form Copies** — Number of copies (1–5) for the Authorization to Release Information template; populated by the `authReleaseFormCopies` flow variable (defaults to 1)
|
||||||
4. Output Variables:
|
4. Output Variables:
|
||||||
- **Envelope ID** — Unique Docusign envelope ID
|
- **Envelope ID** — Unique Docusign envelope ID
|
||||||
- **Success** — Boolean (true/false)
|
- **Success** — Boolean (true/false)
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ Accept: application/json
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"status": "sent",
|
"status": "sent",
|
||||||
"emailSubject": "Please review and sign these forms",
|
"emailSubject": "Docusign: Please review and sign these forms",
|
||||||
"compositeTemplates": [
|
"compositeTemplates": [
|
||||||
{
|
{
|
||||||
"compositeTemplateId": "1",
|
"compositeTemplateId": "1",
|
||||||
|
|
@ -74,6 +74,14 @@ Accept: application/json
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### 2.5 Email subject & body composition
|
||||||
|
|
||||||
|
The Apex layer composes the outgoing email subject and body when building the envelope. Important rules:
|
||||||
|
|
||||||
|
- Subject: Prefixed with "Docusign: " to make the source clear to recipients. The subject is truncated to 100 characters to satisfy Docusign limits.
|
||||||
|
- Body: Consists of a greeting, followed by combined template bodies separated by a visual divider, followed by a sign-off. The system supports English (default) and Spanish; the Flow `language` input accepts locale codes (e.g. `es`, `es-CO`) and common strings like `Spanish`/`Español` to select Spanish greetings/signoffs.
|
||||||
|
|
||||||
|
|
||||||
#### Advanced Example (with merge fields)
|
#### Advanced Example (with merge fields)
|
||||||
|
|
||||||
```json
|
```json
|
||||||
|
|
|
||||||
|
|
@ -145,7 +145,7 @@ public class Request {
|
||||||
public String emailSubject;
|
public String emailSubject;
|
||||||
|
|
||||||
@InvocableVariable(required=false label='Authorization to Release Form Copies')
|
@InvocableVariable(required=false label='Authorization to Release Form Copies')
|
||||||
public Integer authReleaseFormCopies; // 1–3; only used when that template is selected
|
public Integer authReleaseFormCopies; // 1–5; only used when that template is selected
|
||||||
|
|
||||||
@InvocableVariable(required=false label='Recipient SMS Phone')
|
@InvocableVariable(required=false label='Recipient SMS Phone')
|
||||||
public String recipientSmsPhone; // E.164 preferred (+15551234567); triggers SMS delivery for Docusign Recipient #1
|
public String recipientSmsPhone; // E.164 preferred (+15551234567); triggers SMS delivery for Docusign Recipient #1
|
||||||
|
|
@ -279,7 +279,7 @@ The following new elements were added to `Docusign_Envelope_Templates_V3`:
|
||||||
| `Authorization_Copies_Screen` | Screen | Shows instruction text + radio buttons (1–5 copies) |
|
| `Authorization_Copies_Screen` | Screen | Shows instruction text + radio buttons (1–5 copies) |
|
||||||
| `authReleaseFormCopies` | Variable (Number, default 1) | Stores the user's copy-count selection |
|
| `authReleaseFormCopies` | Variable (Number, default 1) | Stores the user's copy-count selection |
|
||||||
| `authReleaseTemplateSelected` | Variable (Boolean, default false) | Flag set during the scan loop |
|
| `authReleaseTemplateSelected` | Variable (Boolean, default false) | Flag set during the scan loop |
|
||||||
| `AuthCopies_1/2/3` | Choices | Radio button options with numeric values 1 / 2 / 3 |
|
| `AuthCopies_1/2/3/4/5` | Choices | Radio button options with numeric values 1 / 2 / 3 / 4 / 5 |
|
||||||
|
|
||||||
The `authReleaseFormCopies` variable is passed to the Apex Invocable Action as a new input parameter.
|
The `authReleaseFormCopies` variable is passed to the Apex Invocable Action as a new input parameter.
|
||||||
|
|
||||||
|
|
@ -301,7 +301,7 @@ Check_Row_Selection → Scan_For_Auth_Release_Template (loop)
|
||||||
```apex
|
```apex
|
||||||
@InvocableVariable(
|
@InvocableVariable(
|
||||||
label='Authorization to Release Form Copies'
|
label='Authorization to Release Form Copies'
|
||||||
description='Number of times to include the Authorization to Release Information template (1-3).'
|
description='Number of times to include the Authorization to Release Information template (1-5).'
|
||||||
required=false
|
required=false
|
||||||
)
|
)
|
||||||
global Integer authReleaseFormCopies;
|
global Integer authReleaseFormCopies;
|
||||||
|
|
@ -313,7 +313,7 @@ global Integer authReleaseFormCopies;
|
||||||
// Expand multi-copy templates
|
// Expand multi-copy templates
|
||||||
List<String> expandedTemplateIds = new List<String>(req.templateIds);
|
List<String> expandedTemplateIds = new List<String>(req.templateIds);
|
||||||
Integer copies = (req.authReleaseFormCopies != null && req.authReleaseFormCopies > 1)
|
Integer copies = (req.authReleaseFormCopies != null && req.authReleaseFormCopies > 1)
|
||||||
? Math.min(req.authReleaseFormCopies, 3) : 1;
|
? Math.min(req.authReleaseFormCopies, 5) : 1;
|
||||||
if (copies > 1) {
|
if (copies > 1) {
|
||||||
List<String> multiCopyIds = [
|
List<String> multiCopyIds = [
|
||||||
SELECT dfsle__DocuSignId__c FROM dfsle__EnvelopeConfiguration__c
|
SELECT dfsle__DocuSignId__c FROM dfsle__EnvelopeConfiguration__c
|
||||||
|
|
@ -620,6 +620,28 @@ Map<String, Object> envelope = new Map<String, Object>{
|
||||||
String envelopeJSON = JSON.serialize(envelope);
|
String envelopeJSON = JSON.serialize(envelope);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### 4.3 Email subject and body composition
|
||||||
|
|
||||||
|
The Apex layer composes the envelope's email subject and body before sending. Key rules:
|
||||||
|
|
||||||
|
- Subject: Prefixed with `Docusign: ` to make the source explicit for recipients. The final subject is truncated to 100 characters (Docusign requirement).
|
||||||
|
- Body: Built as Greeting → template bodies (joined with a visual divider) → Sign-off. The divider is a short visual separator (`\n\n` + 40 `─` characters + `\n\n`).
|
||||||
|
- Greeting/Sign-off: Support English (default) and Spanish. The Flow's `language` input may be a locale code (`es`, `es-CO`) or a user-friendly string (`Spanish`, `Español`). The code normalizes and accepts common Spanish forms and uses Spanish greeting/signoff when detected.
|
||||||
|
|
||||||
|
Example (English):
|
||||||
|
|
||||||
|
Greeting: `Hello,\n\nPlease complete the DocuSign signature request from Early Intervention Colorado.\n\n`
|
||||||
|
|
||||||
|
Sign-off: `\n\nThank you,\nEarly Intervention Colorado`
|
||||||
|
|
||||||
|
Example (Spanish):
|
||||||
|
|
||||||
|
Greeting: `Hola,\n\nPor favor, firme la solicitud de DocuSign de parte de Intervención Temprana Colorado.\n\n`
|
||||||
|
|
||||||
|
Sign-off: `\n\nGracias,\nIntervención Temprana Colorado`
|
||||||
|
|
||||||
|
Note: If the Flow's `language` value is blank or unrecognized, English is used as the default.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 5. API Integration Details
|
## 5. API Integration Details
|
||||||
|
|
@ -876,4 +898,4 @@ Accept: application/json
|
||||||
|---------|------|--------|---------|
|
|---------|------|--------|---------|
|
||||||
| 1.0 | 2026-02-23 | Paul Huliganga | Initial release |
|
| 1.0 | 2026-02-23 | Paul Huliganga | Initial release |
|
||||||
| 1.1 | 2026-03-11 | Paul Huliganga | Added section 2.4 — multi-copy Authorization to Release Information feature; updated component diagram, Request inner class, and sequence diagram |
|
| 1.1 | 2026-03-11 | Paul Huliganga | Added section 2.4 — multi-copy Authorization to Release Information feature; updated component diagram, Request inner class, and sequence diagram |
|
||||||
| 1.2 | 2026-03-13 | Paul Huliganga | Added section 2.5 — SMS delivery via `dfsle.Recipient.withSmsDelivery()` for recipients without email; added Flow V4 description, `SMS_PLACEHOLDER_EMAIL` constant, `recipientSmsPhone` parameter; updated component diagram and Request class docs |
|
| 1.2 | 2026-03-13 | Paul Huliganga | Added section 2.5 — SMS delivery via `dfsle.Recipient.withSmsDelivery()` for recipients without email; added Flow V4 description, `SMS_PLACEHOLDER_EMAIL` constant, `recipientSmsPhone` parameter; increased multi-copy support to 5 copies; prefixed envelope subject with `Docusign: ` and truncated to 100 chars; added Spanish greeting/signoff and expanded language detection (e.g., 'es', 'es-CO', 'Spanish', 'Español'). |
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue