0

I am using docusign apex toolkit for creation and signing of my Docusign Envelope Template. I have a text field on the basis of which i am deciding whether the signing of the document should be required or optional. I want to achieve i.e when it is optional if anyone of my recipients opens up the email and sign the document my entire signing process should get completed irrespective of the action from other recipients. But when signing is optional currently it is working as every recipient needs to open email/document and needs to click on finish even if he is not signing the document then only the signing process is getting completed. I am adding few recipients from my contact object and one recipient which is owner of my source record. For owner recipient signing order is 1 and for rest of the recipients signing order is 2. Below is the code for contact recipients creation.

 public static List<dfsle.Recipient> populateContactRecipient(List<Contact> contactList,String signingText){
        
        System.debug('signingText inside populateContactRecipient ' +signingText);
        Boolean isRequired;
        if(signingText == 'Jointly - All Signatures  required'){
            isRequired=true;
        }
        else{
            isRequired=false;
        }
        System.debug('isRequired value ' +isRequired);
        Integer i=0;
         List<dfsle.Recipient> signerRecipientList = new List<dfsle.Recipient>();
        for(Contact con : contactList){
            i++;
             dfsle.Tab hereTab = new dfsle.SignHereTab()
                .withScale(0.8) // 1/2 scale
                .withRequired(isRequired) // Signing mandatory
                .withAnchor(new dfsle.Tab.Anchor(
                        'x?S' +i, // Anchor string 
                        false, // Allow white space in anchor string
                        true, // Anchor string is not case sensitive
                        '', // Horizontal alignment in relation to the anchor text
                        true, // Ignore if the anchor text is not present in the document
                        true, // Must match the value of the anchor string in its entirety
                        'pixels', // Unit of the x and y offset properties
                        5, // X offset
                        5 // Y offset
                
                ));
                
               dfsle.Recipient myRecipient = new dfsle.Recipient(
                null, //Source Id
                'Signer',//Type of recipient
                 i+1, //Sequence
                2, //routing order
                new dfsle.Recipient.Role('Signer' +i,null), //role -used to match role
                //on template if using a template
                con.Name, //inPerson Recipient name
                con.Email, //inPerson Recipient Email
                null, //signing group
                null, //phone
                null,//no Authentication
                null, //note
                null, //EmailSettings
                null, //host name This is the name of the host for InPerson
                null, //host email email of host
                false, //sign now
                null, //source
                false, //read only
                false //required
                 )
            .withTabs(new List<dfsle.Tab>{hereTab});
             System.debug('myRecipient' +myRecipient);
            signerRecipientList.add(myRecipient);
        }
           /* dfsle.Recipient myRecipient = dfsle.Recipient.fromSource(
                    con.Name, // Recipient name
                    con.Email, // Recipient email
                    null, //Optional phone number
                    'Signer' +i,// Signer role
                     null)            // No Salesforce association --new dfsle.Entity(con.Id));
                    .withTabs(new List<dfsle.Tab>{hereTab});
                     System.debug('myRecipient' +myRecipient);
                    signerRecipientList.add(myRecipient);
                    System.debug('signerRecipientList' +signerRecipientList);
        } */
         System.debug('signerRecipientList size ' +signerRecipientList.size());
        return signerRecipientList;
        
    }
EhtU
  • 41
  • 4

2 Answers2

1

Could you use a signing group here?

Signing groups enable you to send an envelope to a predefined group of recipients and have any one member of the group sign your documents. When you send an envelope to a signing group, anyone in the group can open it and sign it with their own signature.

When the signing group option is used, group members that open and sign the documents are tracked in the history and certificate of completion. The members of a signing group are not required to have a DocuSign account.

Once a signing group is set up, it is available for use by any account sender when adding recipients to an envelope. The group can be added in the same manner as any other recipient.

Signing groups are set up for your account by your DocuSign administrator.

https://support.docusign.com/s/document-item?language=en_US&bundleId=gav1643676262430&topicId=wld1578456445412.html&_LANG=enus

  • Hi i can't use signing group here as my recipients are dynamic and they keeps on changing for every record. – EhtU Apr 18 '23 at 23:34
0

Unfortunately, we do not have that option. The envelope status can not be completed without all signers signing it. You can use conditional routing or conditional recipients, but all the recipients defined as signers must sign the document so it is completed.

Dharman
  • 30,962
  • 25
  • 85
  • 135
  • Hi Leandro, i am already filtering my recipients based on a checbox. What i want is that in case of optional signing the recipients has two options either he can choose to sign or simply click on the finish button to mark the signing process completed from his side. Now i want that if have two optional recipients and if any one of them signs the other don't need to open the email/document just to click finish to mark the signing process as completed even if he is not going to sign. – EhtU Apr 14 '23 at 23:28