我正在使用docusign(生产帐户)来允许用户签署文档。我正在尝试将数据添加到通过docusign仪表板创建的textTab中。因此,如果我添加一个文本框并将其命名为nbShares,则下面的代码不会填充该框。我在仪表板上添加的所有框(例如签名,文本,复选框等)都不会显示在生成的链接中。我也没有API错误。我还尝试创建customFields,并将数据作为textTab传递给它们-但这也不起作用。
我想我可能会误解流程,我以编程方式添加了所有收件人和签名者-这就是为什么我看不到我添加的占位符/按钮的原因吗?我还允许在我添加的字段中进行协作,使它们成为必需的-但它们仍然没有出现。
真的很感谢您的帮助。这是我的信封定义-我将节点sdk和ts类型一起使用。
const makeEnvelopeDefinition = async (
templateName: string,
user: User,
dealId?: string,
): Promise<EnvelopeDefinition> => {
const personToSign: Signer = {
email: user.email,
name: user.name,
roleName: 'Signer',
// Should this work?
tabs: {
textTabs: [
{ tabLabel: 'nbShares', value: '1000' },
],
},
clientUserId: DOCUSIGN_CLIENT_USER_ID,
recipientId: '1',
}
const compositeTemplate: CompositeTemplate = {
serverTemplates: [
{ sequence: '1', templateId: 'remote-template-id' },
],
inlineTemplates: [
{
sequence: '1',
recipients: {
signers: [personToSign],
certifiedDeliveries: [
{
email: 'someemail@something.com',
recipientId: '77',
name: 'Receipt of transaction',
},
{
email: user.email,
recipientId: '771',
name: user.name,
},
],
},
},
],
}
// create the envelope definition
const envelope: EnvelopeDefinition = {
emailSubject: 'Review signed document',
status: 'sent',
compositeTemplates: [compositeTemplate],
}
return envelope
}
答案 0 :(得分:0)
对我来说,解决方案是将我的签名者更改为此
const personToSign: Signer = {
email: user.email,
name: user.name,
clientUserId: await getDocusignConfig().DOCUSIGN_CLIENT_USER_ID,
recipientId: '1',
routingOrder: '1', // Was missing this
roleName: 'Signer', // Must match signer specified on docusign dashboard
tabs: {
textTabs: [
{
xPosition: '150',
yPosition: '200',
name: 'First Name',
tabLabel: 'name', // Must match the dataLabel name specified on docusign
value: 'Test',
},
],
},
}
并启用此设置“在发送信封时,在docusign的“签名设置”中为所有收件人写入该字段的初始值。