WelisaWelisa DocGen
v1.1.0 welisa.com

Signature providers & DocuSign#

Welisa DocGen signs documents with its built-in engine by default. For clients who already own DocuSign, Welisa DocGen can route signature requests to DocuSign instead — chosen by a configuration record, not by code: no Flow edits, no Apex changes. This page explains the two modes, the shared Send for Signature action, the envelope tracking that works for either provider, and the DocuSign specifics.

Built-in signing versus an external provider#

Built-in signing (default)External provider (DocuSign)
Who makes the PDFWelisa DocGen merges the template and injects the signature fields in one stepSigns a PDF handed to it; cannot generate one
Where signature fields come from{@Signature_Role:Order:Type} tags in the templateAnchor text found in the PDF's text layer
Can sign a file already on the recordNo — only what it producedYes
eIDAS levelSESSES/AES (QES needs a qualified trust service provider)
CostIncluded, entirely in-orgThe client's own DocuSign account and envelopes

Two consequences you will notice in the quick action: with built-in signing the action skips generation entirely and lets the signing engine merge (pre-generating would leave two documents on the record); and the "use a file on this record" option is only offered when the configured provider can serve it.

The Send for Signature action#

The Send for Signature quick action (place it on the object's record page; users need Welisa Signing) is the one place a person sends from, whatever the provider: pick a template (or an existing file, for an external provider), one signer row per role found in the template with the role locked, optional advanced options (anchor text for DocuSign, e-mail subject and message), preview, send. Its Earlier requests section shows every send for the record with Resend and Cancel request.

From automation use the Welisa: Send for Signature Flow action — place it after Generate Document for an external provider and pass the generated Content Version Id; for built-in signing pass the template. Signature requests created this way go through an envelope (below).

Warning

Sends are asynchronous by default, and the default matters. An external provider's send is a callout, and Salesforce refuses a callout in a transaction that holds uncommitted DML — so a synchronous send from a record-triggered Flow would fail every time. The default async path always works. Set Async = false only from a screen Flow or button where no DML has happened yet and you need the signer URLs back in the same transaction.

Envelopes — one record per send, whatever the provider#

Every send through the action creates a Welisa Envelope record — the reason the seam exists: one place to see what was sent where, with which provider, and what happened.

FieldMeaning
StatusPending → Sent → Completed / Declined / Voided / Failed
Providerbuilt-in, docusign, …
Provider ClassThe adapter that sent it, pinned at send time
External IdThe provider-side reference — a DocuSign envelope Id, or the built-in signature request Id
Document ContentVersion IdThe file that was sent
Related Record IdThe record the document belongs to
Error MessageWhy a failed send failed

The Welisa Envelopes tab lists them (All Envelopes, Needs Attention). Cancel and resend always run against the provider that sent the envelope, never against whatever is configured now — so switching a client from built-in to DocuSign can never void the wrong envelope or leave a still-signable request live.

Configuring the provider#

A Welisa Signature Setting custom metadata record decides who signs:

FieldMeaning
Provider ClassThe adapter, e.g. DocuSignProvider
Template API NameBlank = the org default; a template's API name = an override for that template only
Is ActiveInactive rows are ignored

Resolution: per-template override → org default → built-in. Built-in signing needs no configuration at all — absent configuration means "use the built-in default".

Important

Broken configuration fails loudly; it does not fall back to built-in signing. A row naming a class that is missing (adapter not installed), misspelled, or not a signature provider makes the send fail and the action says so. Silently substituting built-in signing would downgrade a document the client configured for AES/QES to SES without telling anyone — a compliance problem, not a convenience.

DocuSign#

The DocuSign adapter is a small separate package that Welisa installs and configures for clients who own DocuSign. It builds on the DocuSign eSignature for Salesforce managed package and its Apex toolkit: the client owns the DocuSign account, seats, envelope billing, key custody and go-live. Welisa does not resell DocuSign.

Prerequisites in the client org#

  1. The DocuSign eSignature for Salesforce package installed and the account connected through its Docusign Setup tab.
  2. The sending user must be a sender on that DocuSign account. The toolkit requires it, so system and batch contexts cannot send — use a designated integration user with a DocuSign seat.
  3. The adapter installed by Welisa, and the DocuSign Sender permission set assigned.
  4. A Welisa Signature Setting record: Provider Class = DocuSignProvider, Is Active = true, Template API Name blank (org default) or a template's API name (route only that template to DocuSign).

Anchor text — read this before debugging a missing signature box#

DocuSign places fields by anchor text: a token it searches for in the PDF's text layer. Built-in signing uses {@Signature_…} tags; the two mechanisms are unrelated, and a template written for one does not work with the other.

  1. Put a unique token in the template, in white text so it is in the text layer but invisible to the reader:

    <p><span style="color: #ffffff;">/sig1/</span></p>

    Use color: #ffffff, never display: none — hidden text is never rendered at all, so there is nothing to find.

  2. Give the same token to the signer. In the action, open Show advanced options and type /sig1/ into Anchor text for that signer.

Warning

Step 2 is required for any template without {@Signature_…} tags. If anchor text is left blank, the role name (for example "Signer 1") is used as the anchor; DocuSign does not find it and — because one bad anchor must never fail an entire envelope — sends with no signature field at all, degrading to free-form signing. That is the exact cause of "I put /sig1/ in the HTML but there is no signature box."

Anchor facts learned from live envelopes: matching is substring-based, so uniqueness of the token is what prevents unwanted matches — never use a common word; the anchor text stays visible in the finished PDF unless it is white-on-white; never position fields by x/y coordinates (generated documents reflow, anchors move with the content); no anchor and no role means no field, which DocuSign treats as free-form signing.

Operations#

OperationBehaviour
SendCreates and sends a DocuSign envelope with one recipient per signer and anchored signature tabs; a Contact Id makes a linked recipient so DocuSign's status writeback relates to the right row
CancelVoids the envelope at DocuSign (a voided envelope cannot be un-voided and DocuSign still bills it); the reason you type is shown to signers
ResendNudges the existing envelope — no new envelope, no extra cost; recipients who already signed are unaffected
StatusRead locally from DocuSign's status records pushed by DocuSign Connect — no callout

Limits#

  • Cancel and resend are callouts, so the adapter calls DocuSign before updating the envelope record.
  • Callout bodies cap at 6 MB synchronous / 12 MB asynchronous, and base64 inflates a PDF by about a third, so documents above roughly 8 MB cannot be sent.
  • DocuSign has no idempotency key on envelope creation: a lost response plus a blind retry would bill the client twice. The envelope record is written before the send so a retry is detectable.
  • Open items at the time of writing: the per-send e-mail subject and message are accepted but not yet forwarded to DocuSign, and envelope status is not yet written back from DocuSign to the Welisa Envelope (it stays Sent until cancelled). Ask Welisa for the current state.

Which should a client use?#

Built-in signing covers most contracts, quotes, approvals and consent forms, at no cost and with a complete audit trail and certificate. DocuSign makes sense when the client already standardises on it, needs an existing file on the record signed, or needs an assurance level above SES. Because the choice is a configuration record, a client can start built-in and switch later — or route only specific templates to DocuSign.