DocuSign 可选签名无需打开文档

问题描述 投票:0回答:1

我正在使用 docusign apex 工具包来创建和签署我的 Docusign 信封模板。我有一个文本字段,在此基础上我决定是否需要或可选地签署文档。 我想实现,即当我的任何收件人打开电子邮件并签署文档时,无论其他收件人采取什么行动,我的整个签名过程都应该完成。 但是,当签名是可选的时,它正在工作,因为每个收件人都需要打开电子邮件/文档,并且需要单击完成,即使他没有签署文档,也只有签名过程才能完成。我从我的联系人对象中添加了几个收件人,并添加了一个收件人,该收件人是我的源记录的所有者。所有者收件人签名顺序为 1,其余收件人签名顺序为 2。以下是创建联系人收件人的代码。

 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;
        
    }
docusignapi apex docusignapextoolkit docusign-sdk
1个回答
0
投票

不幸的是,我们没有那个选项。没有所有签名者签名,信封状态无法完成。您可以使用条件路由或 条件收件人,但所有定义为签名者的收件人都必须签署文档才能完成。

莱安德罗·雷斯

© www.soinside.com 2019 - 2024. All rights reserved.