0

I have integrated DocuSign embedded signing into my web app, which is still in development so using DocuSign developer sandbox.

When an envelope is created programmatically, I am including Name, Email and ClientUserId for the signer like this:

var signers = new List<TemplateRole>();
foreach (var r in req.Recipients)
{
    var signer = new TemplateRole();
    signer.ClientUserId = r.SSOUserId;
    signer.Email = r.Email;
    signer.Name = r.Name;
    signer.RoleName = r.RoleName;
    signer.RoutingOrder = r.RoutingOrder.ToString();
    signer.Tabs = r.MergeFields
    signers.Add(signer);
}

var env = new EnvelopeDefinition() 
{
    TemplateId = ...,
    TemplateRoles = new List<TemplateRole>(signers),
    EventNotification = ...,
    Status = "Sent"
};

When an embedded recipient view is requested, I include the same exact Name, Email and ClientUserId in the request like this:

var envelopeApi = new EnvelopesApi(ApiClient);
var viewOptions = new RecipientViewRequest
{
    ReturnUrl = ...,
    AuthenticationMethod = "Password",
    ClientUserId = recipient.SSOUserId,
    UserName = recipient.Name,
    Email = recipient.Email
};
var viewUrl = envelopeApi.CreateRecipientView(AccountId, DocuSignEnvelopeId, viewOptions);

Even though the user may change their Name and/or Email in my app, I have the original values saved in a table and I use those original values when requesting the view from DocuSign. This setup has worked 100% of the time for many months until now when an envelope is having trouble obtaining a recipient view. The envelope was created + viewed last week (April 27, 2022), and when the user tried to sign it today (May 4, 2022), they keep getting this error:

DocuSign.eSign.Client.ApiException: Error calling CreateRecipientView: {
    "errorCode":"UNKNOWN_ENVELOPE_RECIPIENT",
    "message":"The recipient you have identified is not a valid recipient of the specified envelope."
}

Note that hundreds of envelopes created before and after the above envelope are still able to obtain a recipient view with the exact same code + configuration. The problematic envelope has not expired, I can still see it in the Waiting for Others section of the DocuSign admin site. I have compared its recipient info at DocuSign (by invoking ListRecipients) with the info I have in my database, and the Name, Email, ClientUserId, RoleName, RoutingOrder all match completely. My account is set up to expire envelopes after 120 days, and I am not doing anything during envelope creation to set an expiration date. I have seen many others having this issue but typically their problem is the ClientUserId. My code has that handled, and it works for every other envelope.

The only difference I have seen between this envelope and the others is that ListRecipients results show the affected envelope as having a property

"signatureInfo": {
    "fontStyle": "docusign7",
    "signatureInitials": "RW",
    "signatureName": "Test"
}

that is null for all other envelopes. The documentation states that this property can be set by the sender to pre-fill signature fields. However, I didn't even know about this property before today, so my app has never set it. It would be weird for this property to cause the envelope to be in a state where it cannot be signed anymore but I am struggling to find a reason why this particular envelope cannot be signed. Btw, the signatureName of Test actually matches the Name property of the recipient so its even more confusing why DocuSign is refusing to recognize the signer.

8
  • Please check the envelope that was created (it was still there in your developer account) and see what recipients it has. I wonder if this is a case where the template has different recipients, and while you try to match them with the roles, you still get a different one. Commented May 4, 2022 at 17:48
  • @InbarGazit the affected envelope is visible in the DocuSign admin site and I can query its recipient list, and all the relevant fields match my database (which I am using to create the recipient view request). Also, the affected envelope has exactly 1 recipient. Commented May 4, 2022 at 21:23
  • If you don't use a template - does this work ok? Commented May 4, 2022 at 21:26
  • I am not sure what you mean by not using a template. I have edited my post to clarify that it is a problem with only 1 envelope. All the hundreds of envelopes before, and the few after, are working 100% correctly. Commented May 4, 2022 at 21:36
  • What is different about this one envelope? Commented May 4, 2022 at 21:56

1 Answer 1

0

If the envelope is still active, I suggest doing a Recipients:list operation. Also check that the recipient is a "current" recipient. (If there's only one recipient, then this doesn't apply.)

If the Recipients:list doesn't give you any clues then I suggest you contact developer support. They can check our backend logs to see if there's additional information on why the RecipientsView call didn't work.

See page https://support.docusign.com/s/contactSupport?language=en_US First login to that page if you have a production account. You can get support if you only have a developer account.

1
  • When the envelope was active, I did invoke ListRecipients and all the user info matched what I had on my system. Unfortunately, the envelope is no longer active and I have not been able to reproduce this issue with any other envelope. Dropping this issue for now. Thank you to all who tried to help and asked questions. Commented Jun 7, 2022 at 13:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.