1
votes

I'm using PdfTransformFields for create envelope:

{
  "emailBlurb": "Test Transform PDF Fields",
  "emailSubject": "Test Transform PDF Fields",
  "status": "sent",
  "compositeTemplates": [{
    "inlineTemplates": [{
      "recipients": {
        "signers": [{
          "recipientId": "777",
          "name": "LastName FirstName",
          "email": "some email",                  
          "tabs":{
             "signHereTabs":[
                {
                   "tabLabel":"employee_esignature\\*"
                }
             ]
          }          
        }]
      }
    }],
    "document": {
      "documentId": "1234567",
      "name": "Test.pdf",
      "transformPdfFields": "true"
    }

  }]
}

Although RecipientId="777" and DocumentId="1234567" were defined, but when I get the envelopeStatus by the call:

envelopesApi.listRecipients(accountId,env.getEnvelopeId(),
   listRecipientsOptions);

I see, that recipients->signers->tabs->signHereTabs contains documentId="1", recipientId="1"

Why the documentId and recipientId are different from what I conveyed?

1
DocuSign always starts DocumentId and Recipientid with 1 and increment it by 1 for each successive document added via Composite Templates. But whats the usecase and why you need to know the document or recipientId? - Amit K Bist
Answering your question "But whats the usecase and why you need to know the document or recipientId?" If I add several documents in one envelope, then I need to know by which document the status was changed. - Antey
DocuSign does transaction as All or None, since transaction is moved from one status to another at an envelope level. So envelope will move from one status to another status when signer has completed all the action on all the documents present in the envelope and clicked Finish button on the top. - Amit K Bist

1 Answers

0
votes

I think the documentId and recipientId are somewhat ephemeral -- you can reference them in other parts of your composite template using the values you set, but they may then be overwritten by the DocuSign platform when it finishes processing your request.

If you want to associate your own metadata with a recipient, use the customFields attribute in a signer object.

You can add your own metadata to document objects by using the documentFields attribute.