Create Document Templates with DocuSign Tags
Setting up Word-based document templates in Agiloft with the appropriate DocuSign tags is a key part of the integration, as this makes it easy for users to generate documents that already have DocuSign tags in the proper locations. By automating document creation with document templates, the user sending the documents doesn't have to manually place signature tags in the DocuSign interface.
DocuSign Tags in Agiloft document templates use the following syntax:
$docusign:TagType:FieldName:RoleName(Label){property1:value1,property2:value2}
$docusign
: begins each tag for DocuSign functionality.TagType
: uses one of the available types to indicate what information will be stored there. For example, SignHere, FullName, or Title.FieldName
: optionally designates a name for the field. The FieldName portion of the tag is optional and usually left out, except in cases where there are multiple tags using the same tag type and the same signer. The FieldName text appears in a tooltip in DocuSign if a user hovers over the tag.RoleName
: assigned to a specific signer according to their role in the envelope. The options come from the entries in the DocuSign Roles table.Label
: used to differentiate lines that use the same tag type and role name. Labels can be reused in the document to indicate identical fields, but different labels must be used for different fields to distinguish them for DocuSign and prevent overlapping.property
andvalue
: used to apply additional properties to the tag, such as making the tag optional, setting a specific font, or adding tooltip text.
Tips
Keep the following tips in mind when creating print templates with DocuSign tags:
- Microsoft Word can be inconsistent in the way it formats document templates, variables, and API tags from Agiloft. Often, Word can insert extra formatting that is not visible in the document but that can interfere with DocuSign Tags. Be careful when formatting DocuSign tags in Word document templates, and be sure to test the results.
- As a rule, do not use HTML-enabled text fields in Agiloft to insert DocuSign Tags into document templates. The resulting Word document will separate any sections containing HTML code away from the main document's XML file, which will result in an incorrect translation by the DocuSign API.
- Turn off spelling and grammar checks for document templates, as Word may insert formatting that will interfere with the DocuSign Tags.
DocuSign Tag Types
For each DocuSign tag, you need to specify the tag type to determine how the field behaves. Some fields automatically populate with the signer's information, while others require the signer to enter information or make a choice.
The following tag types can be used in a DocuSign tag:
- Approve
- Checkbox
- Company
- DateSigned
- Decline
- EmailAddress
- FullName
- InitialHere
- SignHere
- Text
- Title
For more information about these tags, see the DocuSign documentation here. Note that the DocuSign page lists field types by name, not by the syntax you need to use to insert them in document templates. Inside a tag, the field type should not have spaces.
Using Tag Types
In most cases, simply combine a tag type with the appropriate role name to create a DocuSign tag. For example:
- A DocuSign tag to indicate the signature for a signer whose role name is "InternalSigner1" would appear as:
$docusign:SignHere::InternalSigne
r1
- Add a DocuSign "Decline" button with:
$docusign:Decline::Signer1
Other commonly used tag types include DateSigned and InitialHere. A signature block that includes the DocuSign tags for the signer's signature, full name, title, and date signed is a common configuration.
Any DocuSign tags should be formatted with white text so that the tag text does not appear in the final document. Here's an example with dark red highlighting applied to show the text:
Remember to use DocuSign tags for all signature block items. This way, signer information does not need to be known at the time the template is generated.
Using Field Names
When there are multiple tags containing the same tag type and signer, they will cause overlapping signatures and other problems on the final document. For example, a signature field that appears multiple times in a document will create overlapping signatures if their syntax is identical. To distinguish between tags in this situation, use the FieldName
part of the tag syntax to give each tag a unique value.
To prevent the problem of duplicated tags, use different field names for each tag that will be used in the template. Likewise make sure to use different field names if the same tag needs to be used more than once within the same envelope.
$docusign:SignHere:unique1:Customer1(unique1) $docusign:SignHere:unique2:Customer1(unique2)
Tag Properties
You can optionally include additional properties in your tags. Note that any property that conflicts with the body of the tag is discarded.
The following properties are supported:
Property | Value |
---|---|
optional | Use this with the SignHere and InitialHere tags as optional:true to make the tags optional. |
required | Use this with the Text, Title, Company, and Email tags as required:false to make the tags optional. |
caption | Text that is shown as a caption. |
font | The font to be used for the tab value. Supported fonts include Default, Arial, ArialNarrow, Calibri, CourierNew, Garamond, Georgia, Helvetica, LucidaConsole, MSGothic, MSMincho, OCR-A, Tahoma, TimesNewRoman, Trebuchet, and Verdana. |
fontColor | The font color to use for the information in the tab. Possible values are Black, BrightBlue, BrightRed, DarkGreen, DarkRed, Gold, Green, NavyBlue, Purple, and White. |
fontSize | The font size used for the information in the tab. Possible values are Size7, Size8, Size9, Size10, Size11, Size12, Size14, Size16, Size18, Size20, Size22, Size24, Size26, Size28, Size36, Size48, and Size72. |
height | The height of the tag in pixels. Must be an integer. |
italic | When true, the text is italicized. |
tooltip | The text of a tooltip that appears when a user hovers over a form field or tab. |
underline | When true, the text is underlined. |
width | The width of the tag in pixels. Must be an integer. |
Common DocuSign Tags
Here are some example DocuSign tag constructions.
Tag | Output |
---|---|
$docusign:SignHere::RoleName | With a specific role selected in place of RoleName, this inserts a "Sign Here" icon in the document where the signer with the selected role is expected to sign. |
$docusign:SignHere::RoleName{optional:true} | With a specific role selected in place of RoleName, this inserts an optional "Sign Here" icon in the document where the signer with the selected role can sign. |
$docusign:FullName:FieldName:RoleName | Here, the FieldName comes from the drop-down selection for the recipient field for that signer; the selected RoleName determines the signer with that role; and FullName is populated using the Person record for that signer, or the name entered in the envelope. |
$docusign:FullName:internal_contract_owner:RoleName | Inserts the Internal Contract Owner field from the Contract record. |
$docusign:FullName:party1_signer_full_name:RoleName | Inserts the 1st Party Signer Name field for the envelope from the Contract record. |
$docusign:Title::RoleName | DocuSign fills the Title automatically from the last time the current signer typed their title at DocuSign. If they haven't entered a title before, DocuSign prompts the signer to enter one. DocuSign stores title information for both senders and signers, but signer titles are not shown in the DocuSign address book. |
$docusign:DateSigned::RoleName | DocuSign fills DateSigned automatically with today's date when the person with that assigned role signs the document. |
$docusign:Text:contract_title:RoleName | Agiloft inserts the Contract Title from the Contract record. However, while this is possible, most document templates simply insert the Contract Title directly using field tags, rather than doing it through a DocuSign tag. |
Example Repeat Tags
If the same tag needs to be used more than once within the same envelope, make the FieldName unique:
Example
$docusign:Initial:a1:Customer1
$docusign:Initial:a2:Customer1
$docusign:Initial:a3:Customer1