From a81d5788c72441e4d514e16ed06b37c8fd5f3c49 Mon Sep 17 00:00:00 2001 From: Paul Huliganga Date: Tue, 24 Mar 2026 13:52:58 -0400 Subject: [PATCH] feat(i18n): add Spanish greeting/signoff when language='es'; update authReleaseFormCopies doc --- .../classes/DocusignCompositeEnvelopeBuilder.cls | 14 ++++++++++++-- .../default/classes/DocusignEnvelopeRequest.cls | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/composite-envelope-builder/force-app/main/default/classes/DocusignCompositeEnvelopeBuilder.cls b/composite-envelope-builder/force-app/main/default/classes/DocusignCompositeEnvelopeBuilder.cls index 1595ee8..343cd0a 100644 --- a/composite-envelope-builder/force-app/main/default/classes/DocusignCompositeEnvelopeBuilder.cls +++ b/composite-envelope-builder/force-app/main/default/classes/DocusignCompositeEnvelopeBuilder.cls @@ -233,8 +233,18 @@ global with sharing class DocusignCompositeEnvelopeBuilder { } // Compose body: greeting → template bodies separated by a visual divider → sign-off String DIVIDER = '\n\n' + '─'.repeat(40) + '\n\n'; - String GREETING = 'Hello,\n\nPlease complete the DocuSign signature request from Early Intervention Colorado.\n\n'; - String SIGNOFF = '\n\nThank you,\nEarly Intervention Colorado'; + + // Support English (default) and Spanish greetings/signoffs based on the + // optional `language` input parameter (e.g. 'en' or 'es'). + String GREETING; + String SIGNOFF; + if (String.isNotBlank(req.language) && req.language.toLowerCase().startsWith('es')) { + GREETING = 'Hola,\n\nPor favor, firme la solicitud de DocuSign de parte de Intervención Temprana Colorado.\n\n'; + SIGNOFF = '\n\nGracias,\nIntervención Temprana Colorado'; + } else { + GREETING = 'Hello,\n\nPlease complete the DocuSign signature request from Early Intervention Colorado.\n\n'; + SIGNOFF = '\n\nThank you,\nEarly Intervention Colorado'; + } String envelopeBody; if (bodyParts.isEmpty()) { envelopeBody = GREETING + SIGNOFF; diff --git a/composite-envelope-builder/force-app/main/default/classes/DocusignEnvelopeRequest.cls b/composite-envelope-builder/force-app/main/default/classes/DocusignEnvelopeRequest.cls index d1fa32a..2fda242 100644 --- a/composite-envelope-builder/force-app/main/default/classes/DocusignEnvelopeRequest.cls +++ b/composite-envelope-builder/force-app/main/default/classes/DocusignEnvelopeRequest.cls @@ -35,7 +35,7 @@ global class DocusignEnvelopeRequest { @InvocableVariable( label='Authorization to Release Form Copies' - description='Number of times to include the Authorization to Release Information template (1-3). Only used when that template is selected.' + description='Number of times to include the Authorization to Release Information template (1-5). Only used when that template is selected.' required=false ) global Integer authReleaseFormCopies;