简体   繁体   中英

CANNOT_EXCLUDE_DOCUMENT: This document cannot be excluded for this recipient

I am seeing a weird behavior with this test eSign transaction:

{
    "compositeTemplates": [
        {
            "inlineTemplates": [
                {
                    "documents": [
                        {
                            "documentBase64": "BASE64STRING",
                            "documentId": "7",
                            "fileExtension": "PDF",
                            "name": "DOCUMENT7"
                        }, {
                            "documentBase64": "BASE64STRING",
                            "documentId": "10",
                            "fileExtension": "PDF",
                            "name": "DOCUMENT10"
                        }, {
                            "documentBase64": "BASE64STRING",
                            "documentId": "12",
                            "fileExtension": "PDF",
                            "name": "DOCUMENT12"
                        }, {
                            "documentBase64": "BASE64STRING",
                            "documentId": "17",
                            "fileExtension": "PDF",
                            "name": "DOCUMENT17"
                        }, {
                            "documentBase64": "BASE64STRING",
                            "documentId": "18",
                            "fileExtension": "PDF",
                            "name": "DOCUMENT18"
                        }, {
                            "documentBase64": "BASE64STRING",
                            "documentId": "19",
                            "fileExtension": "PDF",
                            "name": "DOCUMENT19"
                        }, {
                            "documentBase64": "BASE64STRING",
                            "documentId": "20",
                            "fileExtension": "PDF",
                            "name": "DOCUMENT20"
                        }
                    ],
                    "recipients": {
                        "signers": [
                            {
                                "email": "SIGNER1@mailinator.com",
                                "excludedDocuments": [
                                    "20"
                                ],
                                "name": "SIGNER1",
                                "recipientId": "2",
                                "tabs": {
                                    "signHereTabs": [
                                        {
                                            "documentId": "7",
                                            "pageNumber": "1",
                                            "recipientId": "2",
                                            "xPosition": "45",
                                            "yPosition": "628"
                                        }
                                    ]
                                }
                            }, {
                                "email": "SIGNER2@mailinator.com",
                                "excludedDocuments": [
                                "7"
                            ],
                                "name": "SIGNER2",
                                "recipientId": "3",
                                "tabs": {
                                    "signHereTabs": [
                                        {
                                            "documentId": "20",
                                            "pageNumber": "1",
                                            "recipientId": "3",
                                            "xPosition": "45",
                                            "yPosition": "628"
                                        }
                                    ]
                                }
                            }
                        ]
                    },
                    "sequence": "1"
                }
            ]
        }, {
            "serverTemplates": [
                {
                    "sequence": "1",
                    "templateId": "f7e03095-8fd0-4c0a-9ec4-50d8fcee9b17"
                }
            ]
        }
    ],
    "emailSubject": "Test eSign",
    "enforceSignerVisibility": "True",
    "status": "sent"
}

When I send it to the DocuSign v2.1 api {{baseUrl}}/v2.1/accounts/{{accountId}}/envelopes I receive the following error:

{
    "errorCode": "CANNOT_EXCLUDE_DOCUMENT",
    "message": "This document cannot be excluded for this recipient. Recipient: SIGNER2 cannot be excluded from Document:DOCUMENT20"
}

However, as you can see in the recipient "SIGNER2", the list of excluded documents doesn't contain the document 20 but this one:

"excludedDocuments": [
    "7"

],

If I remove the document "7" from the list of excludedDocuments, then the transaction will go through. I have tested with any templates and it fails just the same. If I don't use the CompositeTemplate structure, it succeeds.

Anything I am missing or not seeing?

Thanks in advance

After more than 4 months since I have created a DocuSign case, it was finally reviewed and considered a bug on the DocuSign API. This bug has been announced as something that will be fixed in the future.

This issue is currently open and in the hands of our engineering team that have come with a workaround. This issue is due to the compositeTemplate call re-generated document Ids, so instead of honoring the values provided for document id the documents are renumbered, in the created envelope DOCUMENT20 does have an ID of 7, so that's where the error is coming from. To remove DOCUMENT20 you would have to send exclude document 7 in your call body.

Go to Settings > Sending Settings > Document Visibility And change Document Visibility to "Must sign to view, unless sender" If this does not work, open a case and make sure to include the API request logs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM