Docusign SDK - Why document_id are ignored when creating a SignHere tag?

121 views Asked by At

I use docusign-esign SDK for Python, version 3.3.0.

Let's suppose that I have two differents documents in the same envelope, and the same Signatory have to sign them both.

I declare following entities, which is a simplified version of my code :


documents = await build_docusign_documents() # A list of instances that modelise my documents that needs be signed on Docusign
john = database.users.get_john() # My user model instance.

signer = InPersonSigner(
            signer_email=john.mail,
            signer_name=f"{john.first_name} {john.last_name}",
            recipient_id=1,
            routing_order=1,
            host_name=f"{representative.first_name} {representative.last_name}",
            host_email=representative.mail,
            tabs=Tabs(sign_here_tabs=[], date_signed_tabs=[]),
        )


tabs = [
    SignHere(
        recipient_id=1,
        document_id=document.id,
        tab_label="SignHereTab",
        anchor_string="DS_USER_SIGNING",
    )
    for document in documents
]

signer.tabs = Tabs(sign_here_tabs=tabs)


The snippet abose is supposed to declare two "sign here" tabs on two differents documents.
What happens in Docusign interface is quite different, both tabs are duplicated. (2 pack of 2 superposed tabs)
Which means that the two SignHere instances are triggered on both documents by the anchor_tag, regardless on the document_id that are provided.
To solve the issue, I removed the document_id key, and only declaring a single SignHere tab for a user, regardless of the number of tabs needed.
This is not what I understand from the docs : https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/tabs/

When tabs are added with anchor tagging, DocuSign searches the document for instances of an anchorString property that you provide. For each found instance, it places a tab of the specified type for the designated recipient. Tab positions in relation to the string instances can be set by providing x and y offsets.

The docs says that the scan is perfomed for a whole document not a whole envelope.

It works, but I don't understand why and I'm not confortable with this.

Thanks

1

There are 1 answers

0
Inbar Gazit On

There is a global setting of "Anchor Population Scope" for your account that determines the scope of anchor tags. It can either be for a specific document, or the entire envelope. Yours must be set the other way. Unfortunately changing this settings requires you contact DocuSign support. This settings is for all your envelopes, so you need to figure out if changing it is what you need, and if so - make the request by going to support.docusign.com