I'm able to explore most of the methods explained in the SOAP API document and Thanks alot for detailing each of the method.
I've a query on assigning specific form fields to each recipient as part of createandSendEnvelope request. for e.g., as shown in below image I know the form fields for each signer.
Recipient 1 fields: S1_Company, S1_Location, S1_SignHere, S1_PrintHere & S1_DateHere
Recipient 2 fields: S2_Company, S2_Location, S2_SignHere, S2_PrintHere & S2_DateHere
I tried anchor tags but wasn't able to use the form fields mentioned above. The logic I'm looking at is All the forms fields for a form which has to be assigned to a recipient for inputting data to signer is driven based on the static data loaded in Database and upon envelope completion I should be able to read the data inputted in each field assigned to each recipient should be retrievable. i.e., The basic benefit I'm looking at is by using RequestEnvelopeWithDocumentFields I should be able to read the values inputted by recipients in S1_Company, S1_Location etc form fields can be stored in my Database too for Audit purpose and to be in sync with Docusign Data.
Your help in this regard in greatly Appreciated!! let me know if you need any additional information for this query
Attached Payload for
<?xml version="1.0" encoding="utf-16" ?>
<arrayofcompositetemplate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<compositetemplate>
<inlinetemplates xmlns="http://www.docusign.net/API/3.0">
<inlinetemplate>
<sequence>1</sequence>
<envelope>
<accountid>4af47e96-b342-45f2-9fcb-ab3c031780f1</accountid>
<recipients>
<recipient>
<id>1</id>
<username>Signer 1</username>
<email>*******#*****.com</email>
<type>Signer</type>
<accesscode xsi:nil="true" />
</recipient>
</recipients>
<tabs>
<tab>
<recipientid>1</recipientid>
<type>DateSigned</type>
<tablabel>Client1_DocuSignDateSigned</tablabel>
</tab>
<tab>
<recipientid>1</recipientid>
<type>SignHere</type>
<tablabel>Client1_DocuSignSignHere</tablabel>
</tab>
<tab>
<recipientid>1</recipientid>
<type>FullName</type>
<tablabel>Client1_DocuSignFullName</tablabel>
</tab>
</tabs>
</envelope>
</inlinetemplate>
</inlinetemplates>
<document xmlns="http://www.docusign.net/API/3.0">
<id>1</id>
<name>DocumentOne</name>
<pdfbytes>JVBERi0x</pdfbytes>
<fileextension>.pdf</fileextension>
</document>
</compositetemplate>
</arrayofcompositetemplate>
PDF form transformation is much more efficient than using anchors. To take advantage of this feature you must use either CreateEnvelopeFromTemplates or CreateEnvelopeFromTemplatesAndForms. The first is legacy and is limited to assigning all fields ("Tabs" in our API) to one recipient. CreateEnvelopeFromTemplatesAndForms (CEFTAF) is built around composite templates. I strongly recommend building all solutions around composite template composition, both in SOAP and REST. It gives you full API capabilities so you can expand your integration without totally redesigning the envelope assembly.
CompositeTemplates are themselves not templates, but rather, "units of contribution" to the envelope construction process. They can contain one or more templates, usually server templates (stored in DocuSign) and inline templates (contributed via code). They also support PDF Form Transformation along with wild-card Tab matching.
Here is an example:
<CompositeTemplate>
<Document>
<ID>1</ID>
<Name>Application form</Name>
<PDFBytes>JVBERi0xLjYNJeL...(snipped)</PDFBytes>
<TransformPdfFields>true</TransformPdfFields>
<FileExtension>pdf</FileExtension>
</Document>
<InlineTemplates>
<InlineTemplate>
<Sequence>1</Sequence>
<Envelope>
<AccountId>87312c39-f11d-4cdf-a7de-905cfbe774e6</AccountId>
<Recipients>
<!-- the "S1" recipient -->
<Recipient>
<ID>1</ID>
<UserName>Iwana Getthat</UserName>
<Email>iwana#example.com</Email>
<Type>Signer</Type>
<RoutingOrder>1</RoutingOrder>
<RoleName>S1</RoleName>
<!-- (option)<DefaultRecipient>true</DefaultRecipient> -->
</Recipient>
<!-- the "S2" recipient -->
<Recipient>
<ID>2</ID>
<UserName>Ice Screen</UserName>
<Email>ice#example.com</Email>
<Type>Signer</Type>
<RoutingOrder>2</RoutingOrder>
<RoleName>Approver</RoleName>
</Recipient>
</Recipients>
<Tabs>
<!-- Tabs for Recipient 1 -->
<Tab>
<RecipientID>1</RecipientID>
<TabLabel>S1_\*</TabLabel>
<Type>SignHere</Type>
</Tab>
<Tab>
<RecipientID>1</RecipientID>
<TabLabel>S1_\*</TabLabel>
<Type>DateSigned</Type>
</Tab>
<Tab>
<RecipientID>1</RecipientID>
<TabLabel>S1_FullName\*</TabLabel>
<Type>FullName</Type>
</Tab>
<Tab>
<RecipientID>1</RecipientID>
<TabLabel>S1_Email\*</TabLabel>
<Type>Custom</Type>
<CustomTabValidationPattern>^\w+#[a-zA-Z_]+?\.[a-zA-Z]{2,3}$</CustomTabValidationPattern>
<CustomTabRequired>true</CustomTabRequired>
</Tab>
<Tab>
<!-- Catch all for all other CustomTab types not covered above -->
<RecipientID>1</RecipientID>
<TabLabel>S1_\*</TabLabel>
<Type>Custom</Type>
<CustomTabRequired>true</CustomTabRequired>
</Tab>
<!-- Tabs for Recipient 2 -->
<Tab>
<RecipientID>2</RecipientID>
<TabLabel>S2_\*</TabLabel>
<Type>SignHere</Type>
</Tab>
<Tab>
<RecipientID>2</RecipientID>
<TabLabel>S2_\*</TabLabel>
<Type>DateSigned</Type>
</Tab>
</Tabs>
</Envelope>
</InlineTemplate>
</InlineTemplates>
</CompositeTemplate>
Notice the convenient use of "*" as a wildcard, matching the Form Field name of S1_{anything} that resulted in a Tab with TabLabel of S1_{anything} to assign to the "S1" related recipient.
Related
I am trying to populate template text tabs, but they just wont populate.
I have created a template, and created a text tab in the template with data label "occupancy"
Here is my request for the Create Envelope Rest API call:
<envelopeDefinition
xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.docusign.com/restapi">
<emailSubject>Esr Reservation Agreement</emailSubject>
<status>sent</status>
<templateId>3a10eb47-4290-4a4b-bd45-240ff2b229cc</templateId>
<templateRoles>
<email>testemail#gmail.com</email>
<name>Test Name</name>
<roleName>Guest</roleName>
<tabs>
<textTabs>
<tabLabel>occupancy</tabLabel>
<value>1</value>
</textTabs>
</tabs>
</templateRoles>
</envelopeDefinition>
You are missing the templateRole node and the text node
The following XML should work.
<envelopeDefinition
xmlns="http://www.docusign.com/restapi">
<emailSubject>Esr Reservation Agreement</emailSubject>
<status>sent</status>
<templateId>3a10eb47-4290-4a4b-bd45-240ff2b229cc</templateId>
<templateRoles>
<templateRole>
<email>testemail#gmail.com</email>
<name>Test Name</name>
<roleName>Guest</roleName>
<tabs>
<textTabs>
<text>
<tabLabel>occupancy</tabLabel>
<value>1</value>
</text>
</textTabs>
</tabs>
</templateRole>
</templateRoles>
</envelopeDefinition>
We have been using the API for weeks with no issues, but suddenly we have one transaction that returns the error "New One or both of Username and Password are invalid".
I have tested with other transactions and they still work, all the transactions use the same PDF forms just the data is different (Credit applications).
Any ideas why just this one form would fail and the others still work perfectly?
Edit: Adding the example call here:
<CreateAndSendEnvelope xmlns="http://www.docusign.net/API/3.0">
<Envelope>
<TransactionID>ACC-A06786408:28:47.7578750</TransactionID>
<AccountId>[DSAccountID]</AccountId>
<Documents>
<Document>
<ID>1</ID>
<Name>ACC-A067864_Combined_1015201582846.pdf</Name>
<PDFBytes>[PDFBytes]</PDFBytes>
<FileExtension>pdf</FileExtension>
</Document>
</Documents>
<Recipients>
<Recipient>
<ID>1</ID>
<UserName>[DSUserName]</UserName>
<SignerName>[SignerName]</SignerName>
<Email>[DSUserEmail]</Email>
<Type>InPersonSigner</Type>
<AccessCode/>
<CaptiveInfo>
<ClientUserId>Signer1</ClientUserId>
</CaptiveInfo>
<RoutingOrder>1</RoutingOrder>
</Recipient>
<Recipient>
<ID>2</ID>
<UserName>[DSUserName]</UserName>
<SignerName>[SignerName2]</SignerName>
<Email>[DSUserEmail]</Email>
<Type>InPersonSigner</Type>
<AccessCode/>
<CaptiveInfo>
<ClientUserId>Signer2</ClientUserId>
</CaptiveInfo>
<RoutingOrder>2</RoutingOrder>
</Recipient>
</Recipients>
<Tabs>
<Tab>
<DocumentID>1</DocumentID>
<RecipientID>1</RecipientID>
<AnchorTabItem>
<AnchorTabString>PrimarySignature</AnchorTabString>
</AnchorTabItem>
<Type>SignHere</Type>
</Tab>
<Tab>
<DocumentID>1</DocumentID>
<RecipientID>1</RecipientID>
<AnchorTabItem>
<AnchorTabString>PrimarySignature</AnchorTabString>
<XOffset>200</XOffset>
</AnchorTabItem>
<Type>DateSigned</Type>
</Tab>
<Tab>
<DocumentID>1</DocumentID>
<RecipientID>1</RecipientID>
<AnchorTabItem>
<AnchorTabString>PrimIn</AnchorTabString>
</AnchorTabItem>
<Type>InitialHere</Type>
</Tab>
<Tab>
<DocumentID>1</DocumentID>
<RecipientID>2</RecipientID>
<AnchorTabItem>
<AnchorTabString>DealerSignature</AnchorTabString>
</AnchorTabItem>
<Type>SignHere</Type>
</Tab>
<Tab>
<DocumentID>1</DocumentID>
<RecipientID>2</RecipientID>
<AnchorTabItem>
<AnchorTabString>DealerSignature</AnchorTabString>
<XOffset>200</XOffset>
</AnchorTabItem>
<Type>DateSigned</Type>
</Tab>
<Tab>
<DocumentID>2</DocumentID>
<RecipientID>2</RecipientID>
<PageNumber>1</PageNumber>
<XPosition>100</XPosition>
<YPosition>100</YPosition>
<Type>SignerAttachment</Type>
</Tab>
</Tabs>
<Subject>[EmailSubject]</Subject>
<EmailBlurb/>
</Envelope>
</CreateAndSendEnvelope>
I was able to fix the issue with the help of support. There was an error with the initial tab on page 5 of this certain set of documents. They were able to help me track down the actual error instead of the generic username/password error.
I have created a template on my account and am now trying to post a new document to sign using the signature tabs in that template.
I'm trying to use inline composite templates to do this. I've successfully added a new document to the envelope but this document does not display the signature tabs i configured in the template. Additionally, the original document in my template persists as the "next envelope" when the user goes to sign.
Here is my current xml body for reference:
<envelopeDefinition xmlns="http://www.docusign.com/restapi">
<emailBlurb>Email Blurb</emailBlurb>
<emailSubject>Inline Template Test</emailSubject>
<status>Sent</status>
<compositeTemplates>
<compositeTemplate>
<serverTemplates>
<sequence>1</sequence>
<templateId>TEMPLATE ID</templateId>
</serverTemplates>
<inlineTemplates>
<inlineTemplate>
<sequence>1</sequence>
<documents>
<document>
<name>..\..\tester.pdf</name>
<documentId>1</documentId>
</document>
</documents>
<recipients>
<signers>
<signer>
<roleName>Developer</roleName>
<recipientId>1</recipientId>
<email>Signer Email</email>
<name>Signer Name</name>
</signer>
</signers>
</recipients>
</inlineTemplate>
</inlineTemplates>
</compositeTemplate>
</compositeTemplates>
As mentioned, using this body in conjunction with a multipart form results in the document being uploaded but the template not being applied.
If your intention is for the Template to define the tabs and recipient role, and the API request to supply Recipient info and the Document itself for each specific Envelope, then I'd suggest the following changes to your XML:
Add <serverTemplate> inside <serverTemplates>.
Change value of <sequence> to 2 for inline template.
Remove <documents> element, since each inline template can contain at
most ONE document a <documents> element is not needed/expected.
Move <document> outside of <inlineTemplates>.
Remove the backslashes in the value of the document's <name> property (they may be problematic, not sure. This value is simply the display name of the document within the Envelope.
After these changes are made, the <compositeTemplates> portion of your request will look like this:
<compositeTemplates>
<compositeTemplate>
<serverTemplates>
<serverTemplate>
<sequence>1</sequence>
<templateId>TEMPLATE ID</templateId>
<serverTemplate>
</serverTemplates>
<inlineTemplates>
<inlineTemplate>
<sequence>2</sequence>
<recipients>
<signers>
<signer>
<roleName>Developer</roleName>
<recipientId>1</recipientId>
<email>Signer Email</email>
<name>Signer Name</name>
</signer>
</signers>
</recipients>
</inlineTemplate>
</inlineTemplates>
<document>
<name>tester.pdf</name>
<documentId>1</documentId>
</document>
</compositeTemplate>
</compositeTemplates>
Finally, for the tabs that the Template defines to be assigned to the recipient you specify in the API request, make sure that the spelling and CASE of the <roleName> value matches exactly in your API request as it's specified in the Template itself.
Receiving INVALID_EMAIL_ADDRESS_FOR_RECIPIENT on few out of 130 templates. Here is the two JSON requests sent to DocuSign REST API v2:
{"status":"sent","emailBlurb":"","emailSubject":"Please DocuSign this document: blah blah blah",
"templateId":"308B68BB-85B7-42A0-8D11-7DF84F485681",
"customFields":{"textCustomFields":[{"name":"TAMID","value":"XXXXXXX"}]},
"templateRoles":[{"email":"dsmith16#answerfinancial.com","name":"Melinda Nelson","roleName":"Client"}]}
{"status":"sent","emailBlurb":"","emailSubject":"Please DocuSign this document: blah blah blah",
"templateId":"99EAF489-FA43-4943-A5EE-530D5888D078",
"customFields":{"textCustomFields":[{"name":"TAMID","value":"XXXXXXX"}]},
"templateRoles":[{"email":"dsmith16#answerfinancial.com","name":"Melinda Nelson","roleName":"Client"}]}
The first one returns INVALID_EMAIL_ADDRESS_FOR_RECIPIENT error code, while the second one is properly "sent". I looked at the templates and they seem identical besides the content of the document itself. Anyone have experienced similar problems, have solution? Any help is appreciated.
Here are two almost identical template XMLs. The one with "(Bad Code)" in the name returns error 100% of the time. PDFBytes node contents removed.
<?xml version="1.0" encoding="utf-8"?>
<EnvelopeTemplate xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.docusign.net/API/3.0">
<EnvelopeTemplateDefinition>
<TemplateID>3fb25b02-eabc-49c1-b904-3d04a3601abd</TemplateID>
<Name>MO 100 Producer Service Agreement (Bad Code)</Name>
<Shared>true</Shared>
<TemplatePassword/>
<TemplateDescription>MO 100 Producer Service Agreement</TemplateDescription>
<LastModified>2014-01-08T22:21:09.813</LastModified>
<PageCount>1</PageCount>
</EnvelopeTemplateDefinition>
<Envelope>
<AccountId>736c1f32-6c73-4798-b67b-de3f6a1a61bc</AccountId>
<Documents>
<Document>
<ID>1</ID>
<Name>MO_100_R_Producer Service Agreement.pdf</Name>
<PDFBytes/>
</Document>
</Documents>
<Recipients>
<Recipient>
<ID>1</ID>
<UserName/>
<Email/>
<Type>Signer</Type>
<AccessCode/>
<RequireIDLookup>false</RequireIDLookup>
<SAMLAuthentication>
<SAMLAttributes/>
</SAMLAuthentication>
<RoutingOrder>1</RoutingOrder>
<Note/>
<RoleName>Client </RoleName>
<TemplateLocked>true</TemplateLocked>
<TemplateRequired>true</TemplateRequired>
<SignInEachLocation>false</SignInEachLocation>
</Recipient>
</Recipients>
<Tabs>
<Tab>
<DocumentID>1</DocumentID>
<RecipientID>1</RecipientID>
<PageNumber>1</PageNumber>
<XPosition>136</XPosition>
<YPosition>519</YPosition>
<ScaleValue>1</ScaleValue>
<Type>SignHere</Type>
<Name>Sign Here</Name>
<TabLabel>Signature 1</TabLabel>
<Value/>
<TemplateLocked>false</TemplateLocked>
<TemplateRequired>false</TemplateRequired>
<Bold>false</Bold>
<Italic>false</Italic>
<Underline>false</Underline>
</Tab>
<Tab>
<DocumentID>1</DocumentID>
<RecipientID>1</RecipientID>
<PageNumber>1</PageNumber>
<XPosition>120</XPosition>
<YPosition>608</YPosition>
<ScaleValue>1</ScaleValue>
<Type>DateSigned</Type>
<Name>Date Signed</Name>
<TabLabel>Date Signed</TabLabel>
<Value/>
<TemplateLocked>false</TemplateLocked>
<TemplateRequired>false</TemplateRequired>
<Bold>false</Bold>
<Italic>false</Italic>
<Underline>false</Underline>
</Tab>
</Tabs>
<Subject>Please DocuSign this document: Producer Service Agreement MO</Subject>
<EmailBlurb/>
<SigningLocation>Online</SigningLocation>
<CustomFields>
<CustomField>
<Name>TAMID</Name>
<Show>True</Show>
<Required>True</Required>
<Value/>
</CustomField>
</CustomFields>
<AutoNavigation>true</AutoNavigation>
<EnvelopeIdStamping>true</EnvelopeIdStamping>
<AuthoritativeCopy>false</AuthoritativeCopy>
<Notification>
<Reminders>
<ReminderEnabled>false</ReminderEnabled>
<ReminderDelay>0</ReminderDelay>
<ReminderFrequency>0</ReminderFrequency>
</Reminders>
<Expirations>
<ExpireEnabled>true</ExpireEnabled>
<ExpireAfter>120</ExpireAfter>
<ExpireWarn>0</ExpireWarn>
</Expirations>
</Notification>
<EnforceSignerVisibility>false</EnforceSignerVisibility>
<EnableWetSign>true</EnableWetSign>
<AllowMarkup>false</AllowMarkup>
<AllowReassign>true</AllowReassign>
</Envelope>
<?xml version="1.0" encoding="utf-8"?>
<EnvelopeTemplate xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.docusign.net/API/3.0">
<EnvelopeTemplateDefinition>
<TemplateID>f8dba6af-5875-4a81-887a-28096b876c5c</TemplateID>
<Name>MO 100 Producer Service Agreement</Name>
<Shared>true</Shared>
<TemplatePassword/>
<TemplateDescription>MO 100 Producer Service Agreement</TemplateDescription>
<LastModified>2014-01-08T22:23:50.34</LastModified>
<PageCount>1</PageCount>
</EnvelopeTemplateDefinition>
<Envelope>
<AccountId>736c1f32-6c73-4798-b67b-de3f6a1a61bc</AccountId>
<Documents>
<Document>
<ID>1</ID>
<Name>MO_100_R_Producer Service Agreement.pdf</Name>
<PDFBytes/>
</Document>
</Documents>
<Recipients>
<Recipient>
<ID>1</ID>
<UserName/>
<Email/>
<Type>Signer</Type>
<AccessCode/>
<RequireIDLookup>false</RequireIDLookup>
<SAMLAuthentication>
<SAMLAttributes/>
</SAMLAuthentication>
<RoutingOrder>1</RoutingOrder>
<Note/>
<RoleName>Client</RoleName>
<TemplateLocked>true</TemplateLocked>
<TemplateRequired>true</TemplateRequired>
<SignInEachLocation>false</SignInEachLocation>
</Recipient>
</Recipients>
<Tabs>
<Tab>
<DocumentID>1</DocumentID>
<RecipientID>1</RecipientID>
<PageNumber>1</PageNumber>
<XPosition>137</XPosition>
<YPosition>519</YPosition>
<ScaleValue>1</ScaleValue>
<Type>SignHere</Type>
<Name>Sign Here</Name>
<TabLabel>Signature 1</TabLabel>
<Value/>
<TemplateLocked>false</TemplateLocked>
<TemplateRequired>false</TemplateRequired>
<Bold>false</Bold>
<Italic>false</Italic>
<Underline>false</Underline>
</Tab>
<Tab>
<DocumentID>1</DocumentID>
<RecipientID>1</RecipientID>
<PageNumber>1</PageNumber>
<XPosition>120</XPosition>
<YPosition>609</YPosition>
<ScaleValue>1</ScaleValue>
<Type>DateSigned</Type>
<Name>Date Signed</Name>
<TabLabel>Date Signed</TabLabel>
<Value/>
<TemplateLocked>false</TemplateLocked>
<TemplateRequired>false</TemplateRequired>
<Bold>false</Bold>
<Italic>false</Italic>
<Underline>false</Underline>
</Tab>
</Tabs>
<Subject>Please DocuSign this document: MO_100_R_Producer Service Agreement.pdf</Subject>
<EmailBlurb/>
<SigningLocation>Online</SigningLocation>
<CustomFields>
<CustomField>
<Name>TAMID</Name>
<Show>True</Show>
<Required>True</Required>
<Value/>
</CustomField>
</CustomFields>
<AutoNavigation>true</AutoNavigation>
<EnvelopeIdStamping>true</EnvelopeIdStamping>
<AuthoritativeCopy>false</AuthoritativeCopy>
<Notification>
<Reminders>
<ReminderEnabled>false</ReminderEnabled>
<ReminderDelay>0</ReminderDelay>
<ReminderFrequency>0</ReminderFrequency>
</Reminders>
<Expirations>
<ExpireEnabled>true</ExpireEnabled>
<ExpireAfter>120</ExpireAfter>
<ExpireWarn>0</ExpireWarn>
</Expirations>
</Notification>
<EnforceSignerVisibility>false</EnforceSignerVisibility>
<EnableWetSign>true</EnableWetSign>
<AllowMarkup>false</AllowMarkup>
<AllowReassign>true</AllowReassign>
</Envelope>
The only solution I've got so far is to re-create the templates. Not a big deal besides all the related headache associated with it, but this looks like a bug to me. May be DocuSign guys will have time to look at it some time.
I believe I can see the problem- I did a diff of your two template definitions and see one difference that could be causing your issue. If you look at the template role for each template, the GOOD template looks like this:
<RoleName>Client</RoleName>
and the BAD template has it's role like this:
<RoleName>Client </RoleName>
That extra space after Client is most likely causing your issue. To resolve, try exporting the bad template through the UI, remove the space, then re-upload and that should do the trick.
Your JSON looks valid to me, but without also seeing the XML for each of the Templates that you're using to send (the one that fails and the one that succeeds), it's hard to provide much feedback beyond that. (If you can download the Template XML for each template, remove PDF bytes from the XML (for brevity), and update your question to include the XML for each template, I'll be happy to review and provide further feedback.)
These (somewhat recent) posts in the (old) DocuSign Dev Forum seem to describe a similar issue:
http://community.docusign.com/t5/DocuSign-API-Integration-Java/INVALID-EMAIL-ADDRESS-FOR-RECIPIENT/td-p/19037
http://docusign.lithium.com/t5/Announcements/REST-API-Multiple-Templates-with-template-roles/td-p/15807
The final thread in the first of these two posts mentions a DocuSign bug # (26473). Perhaps someone with DocuSign can chime in on this thread with an update on that bug status, on the off chance that it's behind the issues you're experiencing.
You receive the error Invlid_email_address_for_recipient but you haven't used the recipient email in your program just yet.
Use your email address (one for docusign account) and not the docusign guid of the email on your account.
(Hopefully useful to other people)
I got the same error, INVALID_EMAIL_ADDRESS_FOR_RECIPIENT, when the template had roles defined as CC who didn't have an email address defined and I didn't add them to the JSON in the API call. This works fine for roles that need to sign (the created envelope just has less of those), but not for roles that receive a review carbon copy.
I'm continuing to work with the scenario described in this question and thus far I do have the ability as the insured (first recipient) to edit all secure fields that were created when I initially created my server templates. What doesn't happen, however is the second recipient (producer-who is also a signer) does not have those fields that were designated as required visible. This only seems to happen when I send an API call for signature on composite templates. When working with a single template both parties have designated fields available to edit. I understand this may be a configuration issue but wanted to rule out the possibility of essential parameters in my call being omitted. I have gone into console account features and set secure fields visible to all recipients (see Molly's comment in the forum).
Here is my call XML. There may be some redundancy (e.g. type, routing order) but I'm working from various examples. Thanks in advance.
<envelopeDefinition xmlns=\"http://www.docusign.com/restapi\">
<accountId>123456</accountId>
<status>sent</status>
<emailSubject>another test</emailSubject>
<emailBlurb>This comes from Me</emailBlurb>
<compositeTemplates>
<compositeTemplate>
<serverTemplates>
<serverTemplate>
<sequence>1</sequence>
<templateId>894ed334-4183-4b68-857e-01fe4829f79e</templateId>
</serverTemplate>
</serverTemplates>
<inlineTemplates>
<inlineTemplate>
<sequence>2</sequence>
<recipients>
<signers>
<signer>
<type>Signer</type>
<email>insured#email.com</email>
<name>test insured</name>
<RoutingOrder>1</RoutingOrder>
<recipientId>1</recipientId>
<roleName>Insured</roleName>
</signer>
<signer>
<email>producer#email.com</email>
<type>Signer</type>
<roleName>Producer</roleName>
<name>Test Agent</name>
<recipientId>2</recipientId>
<RoutingOrder>2</RoutingOrder>
</signer>
</signers>
</recipients>
</inlineTemplate>
</inlineTemplates>
</compositeTemplate>
</compositeTemplates>
I'm unable to repro the issue you describe. I can successfully create an Envelope from a single template (using Composite Templates in my XML request), where a data field is required/editable for the first Recipient, and the same data field is editable for the second Recipient (but optional -- since the field is 'owned' by the first Recipient). Here's my request XML:
<envelopeDefinition xmlns="http://www.docusign.com/restapi">
<accountId>ACCOUNT_ID</accountId>
<status>sent</status>
<compositeTemplates>
<compositeTemplate>
<serverTemplates>
<serverTemplate>
<sequence>1</sequence>
<templateId>TEMPLATE_ID</templateId>
</serverTemplate>
</serverTemplates>
<inlineTemplates>
<inlineTemplate>
<sequence>2</sequence>
<recipients>
<signers>
<signer>
<email>johnsemail#outlook.com</email>
<name>John Doe</name>
<recipientId>1</recipientId>
<roleName>signer</roleName>
<routingOrder>1</routingOrder>
</signer>
<signer>
<email>janesemail#outlook.com</email>
<name>Jane Doe</name>
<recipientId>2</recipientId>
<roleName>signer2</roleName>
<routingOrder>2</routingOrder>
</signer>
</signers>
</recipients>
</inlineTemplate>
</inlineTemplates>
</compositeTemplate>
</compositeTemplates>
</envelopeDefinition>
Here are a few suggestions for troubleshooting...
First, make a couple of changes to your request XML:
Try using routingOrder (lower-case 'r') instead of RoutingOrder (upper-case 'r') in your XML. In my (limited) testing just now, DocuSign seems to be ignoring the RoutingOrder element if it starts with an uppercase 'r'.
Remove the type element from the XML request -- this isn't
necessary because you're mapping each recipient to a Template
role (which defines recipient type).
Also, if you want both recipients to be able to Edit a field, double-check the field properties in the Template via the DocuSign web console to confirm that the field has "Allow All to Edit" selected.
Finally, it wouldn't hurt to double-check the Account settings (Preferences >> Features) to confirm that the Display Initial SecureField property is selected. (Occasionally I've seen it where someone enables a setting, but forgets to Save the change (by clicking the SAVE button that's located at the very bottom of the page.))