Reputation: 13875
Using DocuSign developer API I am relying on anchor tags to add custom tabs to the document that a user uploads to my application.
I came up with custom tags such as text, signature, and date. With minor training to users who will be creating signature docs I tell them when there are multiple of the same tag you need to increment the number.
/text1/
/text2/
/text3/
/signature1/
/date1/
The user uploads the document to my site. In my code I am reading all of the text in the document, validating it. Looking for occurrences of "/text", "/signature" and "/date". For each occurrence I am creating a DocuSign tab of that type and adding them all to the document. Then sending it out for signing.
Does anyone have a better way to do something like this?
Upvotes: 1
Views: 2935
Reputation: 1370
You could try using automatic anchor tag placement.
Inside of your DocuSign account there's a section dedicated to Envelope Custom Fields. It's worth mentioning that this technique is usually used through Salesforce, but if you're creating envelopes directly through one of the DocuSign APIs it should also work.
https://support.docusign.com/guides/dfs-admin-guide-automatic-anchor-text-and-tags
Essentially how it works is that you create a tab at your account level with a label on it similar to /text_{r}/. When you create your underlying doc, you replace the {r} with the recipients position in the signing order.
This way, any instance of /text_1/ will have the custom tab with the /text_{r}/ anchor string added for recipient 1.
Pending on how you want your app to be set up, you should also know that all instances of /text_1/ will be added to as a group with a duplicate data label. What this means is that if you add text to one of them, all of them will be updated.
If this isn't how you want it to work you can continue to use the /text1_1/, /text2_1/, /text3_1/ format you're already using. If you have all three of these on the underlying document, an individual tab would be automatically placed that would be independent of each other and all placed for the first recipient in your routing order.
It would take some effort to set up, but it would save you the effort of having to validate and automatically add all of these fields -- DocuSign would do it for you.
Upvotes: 4