Before you use this tool

The user the connection acts as needs a CloudFiles Document Generation license. See Who the Agent Acts As. DocuSign must be connected to your CloudFiles account, and the document's template must name signers in its signing settings.

Inputs

InputRequiredDescription
documentIdYesThe documentId that generate-document returned.

Outputs

On the first call, send-for-signing answers as soon as the document is handed over for sending, with these fields.

FieldDescription
documentIdThe document's ID.
statusready, because only a saved document can be sent.
recordIdThe Salesforce record the document was filled from.
fileNameThe document's file name.
savedFileIdThe saved file's ID in its library. On a Salesforce record, the ContentDocument ID.
savedLibraryWhere the document was saved: salesforce for the record's Salesforce Files, otherwise the folder's library.
savedDriveIdThe drive the document was saved in, for libraries with drives.
previewUrlOpens the document in the CloudFiles viewer. Stops working after a few minutes.
downloadUrlDownloads the document. The link expires after a short time.
signingStatussending, because the document is on its way to DocuSign.
signersWho the document is sent to, signers first in signing order and then those who receive a copy. Each has the status not_sent until DocuSign sends it. The signer fields are listed in get-document-status.

A repeat call sends nothing new. It answers with how signing stands then: signingStatus moves on to sent, completed, declined, voided or failed, each signer shows their own status, error says why if signing failed, and the signed copy's links are added once signing is completed.

When a document can be sent

The document must be ready and its signingStatus must be waiting. If the document is still being generated or prepared for signing, the tool asks the agent to check again with get-document-status. If the document failed, or its template names no signers, the tool says there is nothing to send. If DocuSign is not connected to your CloudFiles account, the tool says so and the document stays waiting.

Example requests

You askWhat the agent does
Looks good, send it for signing.Shows you the signers from get-document-status, waits for your confirmation and then calls send-for-signing.
Generate the MSA and send it to the customer for signature.Calls generate-document, then get-document-status until the document is waiting for approval, confirms the signers with you and calls send-for-signing.