收件人未收到 Docusign 复合模板,但显示在 DS inbox/sent

Docusign composite template not being received by recipients but is shown on DS inbox/sent

我正在按照可在此处找到的食谱进行操作:

https://developers.docusign.com/esign-rest-api/code-examples/code-example-adding-document-template#run-the-example

但我发现尽管信封在 docusign 收件箱中显示为已发送,但收件人不会收到,这是代码...

const tabs = getTabsMethodWorkingForStandaloneTemplates({
    name: "name",
    email: "name@email.com"
});
// Create a signer recipient for the signer role of the server template
let signer1 = docusign.Signer.constructFromObject({
    email: args.signerEmail,
    name: args.signerName,
    roleName: "signer",
    recipientId: "1",
    // Adding clientUserId transforms the template recipient
    // into an embedded recipient:
    clientUserId: args.signerClientId,
    tabs
});

// Recipients object:
let recipientsServerTemplate = docusign.Recipients.constructFromObject({
    signers: [signer1],
});

// create a composite template for the Server Template
let compTemplate1 = docusign.CompositeTemplate.constructFromObject({
    compositeTemplateId: "1",
    serverTemplates: [
        docusign.ServerTemplate.constructFromObject({
            sequence: 1,
            templateId: args.templateId
        })
    ],
    // Add the roles via an inlineTemplate
    inlineTemplates: [
        docusign.InlineTemplate.constructFromObject({
            sequence: 1,
            recipients: recipientsServerTemplate
        })
    ]
});



//const compTemplate2 = getCompositeTemplateFromHTML(args);

const eventNotification = new docusign.EventNotification();
eventNotification.url = 'http://pj.pagekite.me';
eventNotification.includeDocuments = true;
eventNotification.loggingEnabled = true;
eventNotification.envelopeEvents = getEnvelopeEvents();

// create the envelope definition
let env = docusign.EnvelopeDefinition.constructFromObject({
    status: "sent",
    compositeTemplates: [
        compTemplate1,
    //  compTemplate2
    ],
    eventNotification
});

try {
    // Step 2. call Envelopes::create API method
    // Exceptions will be caught by the calling function
    let results = await envelopesApi.createEnvelope(
        args.accountId,
        {envelopeDefinition: env}
    );

    let envelopeId = results.envelopeId;
    console.log(`Envelope was created. EnvelopeId ${envelopeId}`);
} catch (e) {
    debugger
}

你有 clientUserId 在那里。这意味着嵌入式签名。删除它,将发送一封电子邮件以进行远程签名。这两者是互斥的。不能两者兼得。