Index
Video Courses
Watch structured video courses
Knowledge Base
Visit our User Forum for discussions & solutions
ESignAddWitness - XpressDox
Click here to learn about the DocuSign integration process, alternatively keep reading for more information about the ESignAddWitness() command.
The ESignAddWitness command allows you to add one or more witnesses to a signatory’s signing process when using XpressDox’s DocuSign integration. This command is used alongside the ESignAddSignatory command and must be placed in the template after the relevant ESignAddSignatory command has been defined.
Syntax
«ESignAddWitness(SignatoryEmail,CanEditWitness,WitnessName,WitnessEmail,PrivateMessage)»
| Parameter | Description |
|---|---|
| SignatoryEmail | The data element containing the email address of the signatory whose witness this is. |
| CanEditWitness | ‘true’ or ‘false’— whether the signatory is allowed to edit the witness information. |
| WitnessName | The name of the witness (can be a data element or a hard-coded value in quotes). |
| WitnessEmail | The email address of the witness (can be a data element or a hard-coded value in quotes). |
| PrivateMessage | An optional private message to send to the witness. Must be in quotes if hard-coded. |
Example 1: Witnesses known at the time of assembly
Each signatory may have up to two witnesses. XpressDox does not validate this limit, so the template author must ensure that no more than two witnesses are added per signatory. A witness’s name and email address may either be predefined by the author in the template, or provided by the signer during the DocuSign signing process:
- Predefined: supply the witnesses names and a real email address directly in the command (hard-coded in quotes or via data elements collected in the interview). The witness details are sent to DocuSign as part of the envelope.
«ESignAddSignatory(Landlord_signatory, Landlord_Email, 1, 'Please sign this document urgently.')»
«Comment(Add witnesses for the landlord — both witnesses are predefined.)»
«ESignAddWitness(Landlord_Email, 'true', 'Witness1', 'Witness1@example.com', 'Witness 1 Private Message')»
«ESignAddWitness(Landlord_Email, 'true', 'Witness2', 'Witness2@example.com', 'Witness 2 Private Message')»
Example 2: Witnesses not known at the time of assembly
- Signer-defined: set the witness email address with the
xd_witnessprefix (for example,xd_witness_1@null.com). When XpressDox detects this prefix, the witness details are not sent to DocuSign. Instead, the signer is prompted to nominate their own witness at the time of signing within DocuSign.
«ESignAddSignatory(Tenant_signatory, Tenant_Email, 1)»
«Comment(Add witnesses for the tenant — the tenant must specify the witness. We use the xd_witness email prefix to enable this behavior.)»
«ESignAddWitness(Tenant_Email, 'true', 'Tenant Witness1', 'xd_witness_1@null.com', 'tenant witness1 private message')»
«ESignAddWitness(Tenant_Email, 'true', 'Tenant Witness2', 'xd_witness_2@null.com', 'tenant witness2 private message')»

Sending to DocuSign
Once the interview has been completed and the document assembled, a DocuSign envelope is created and the document is sent to all signatories for signature. When a signatory (e.g. the Landlord or Tenant) opens the document to sign, they will be prompted with a Witness Information dialog. This dialog asks them to either confirm or enter the witness’s name, email address, and an optional message to the witness. This dialog will appear for each witness linked to that signatory.

Once the signatory has reviewed and signed the document, each witness will receive a separate email invitation to sign the document as a witness. Before they can sign, they will be required to enter or correct the information provided. Once verified, they can proceed to sign the document as a witness.

Notes:
- The ESignAddWitness command must always reference the email address of an existing signatory (added via ESignAddSignatory).
- Each signatory may have up to two witnesses. XpressDox does not enforce this limit — the template author is responsible for ensuring it is not exceeded.
- Hard-coded names, email addresses, and messages must be enclosed in single quotes.
- If the second parameter is set to ‘true’, the signatory can update the witness details when prompted during the signing process.
- If no private message is specified, the witness will receive DocuSign’s default notification message.
- When using the
xd_witnessprefix in the witness email, the witness details are not sent to DocuSign; instead, the signer nominates their own witness at the time of signing.
