0
votes

I have been successfully using DocuSign embedded signing in a J2EE application, using the createEnvelopeFromTemplates SOAP API, 1 template and 1 document to create 1 document in an envelope for 2 signers.

Now I am implementing a case with more than two signers. There are some checkboxes contained within the document. The chechboxes are to be checked by one of the signers. Not all signers sign each document, and which signer checks the checkboxes is determined at envelope creation time, based on which signers are actually present.

I tried to implement this case by using a set of templates with:

  • One template for all the possible signatures
  • Templates tagged for each possible signer that could fill in the checkboxes.

At envelope creation time, my website has collected the information to know which signers are present, and which signer will fill in the checkboxes. The appropriate templates are referenced in the call to DocuSign to create the envelope, and the appropriate roles are assigned. The problem is that when specifying multiple templates with the createEnvelopeFromTemplates operation, each TemplateReference object requires a document. I can't figure out how to tell the API to apply the multiple templates to the same document, so I will end up with a single document in the envelope.

Reading the DocuSign documentation, it appears that using createEnvelopesFromTemplatesAndForms with CompositeTemplates might work, but I would prefer to stay with the simpler CreateEnvelopeFromTemplates. Is there a way to apply multiple templates to a single document using CreateEnvelopeFromTemplates?

Thanks, Mark

2
CreateEnvelopeFromTemplatesAndForms is not a good solution for us because we would have to programmatically assign DocuSign tabs at run time. This API call throws an error if you have tabs assigned to anchor text on the template but the anchor text does not appear in the document. We have many cases of tabs in our templates that are anchored to anchor text that may or may not appear in the actual document. We have many variations of a document all using the same template. Switching over to CreateEnvelopeFromTemplatesAndForms would require an entire re-design of our process. Thanks, MarkMarkB

2 Answers

2
votes

You will need to use CompositeTemplates to solve this. The CreateEnvelopeFromTemplates() call that you are making adds what are known as ServerTemplates to your envelope, and since each server template contains a document (i.e. you can't save a design-time template in the DocuSign Console without providing a document) each time you add a server template to an envelope it adds the document too.

Using CompositeTemplates you can add ServerTemplates as well as InlineTemplates to your envelopes which means you can start with the template with the document(s) then use the properties of a second (inline) template without including its documents. Therefore, the SOAP call you should instead make is

CreateEnvelopeFromTemplatesAndForms()

And using the RoleName property you can assign your recipients to the template roles you have already created at design-time.

I was going to suggest testing this through the API Explorer but remembered you're using the SOAP API not REST and that's for testing with REST, so instead probably your best bet is the SOAP documentation and the samples found in the SOAP SDK on GithUb:

There are sample CreateEnvelopeFromTemplatesAndForms() calls in the SDK that show how to make the call.

0
votes

We have found a solution that seems to work. We are still using the CreateEnvelopeFromTemplates operation, but we combined our templates into one and have a created a new role, "Question Answerer", and assigned all the checkboxes to that role. At envelope creation time, when we specify the role assignments, we specify the ID of the appropriate signer to both the signature role and the "Question Answerer" role.

Although we did not find a way to apply multiple templates to a single document using CreateEnvelopeFromTemplates, the above solution solves our problem.

Thanks, Mark