模板中的 Docusign 文本选项卡未填充

Docusign Text Tabs in template not populating

我正在使用 docusign(生产帐户)允许用户签署文档。我正在尝试将数据添加到我通过 docusign 仪表板创建的 textTabs。所以说如果我添加一个文本框并将其命名为 nbShares,下面的代码不会填充该框。我在仪表板中添加的所有框(例如签名、文本、复选框等)都没有显示在生成的 link 中。我也没有收到 API 错误。我还尝试创建 customFields,并将数据作为 textTab 传递给它们 - 但这也不起作用。

我想我可能误解了流程,我以编程方式添加了所有收件人和签名者 - 这就是我看不到我添加的 placeholders/buttons 的原因吗?我还允许在我添加的字段中进行协作,使它们成为强制性的 - 但它们仍然没有出现。

非常感谢您对此提供的帮助。这是我的信封定义 - 我使用节点 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
}

对我来说,解决方案是将我的签名者更改为此

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 的 'Signing Settings' 中启用此设置 'When an envelope is sent, write the initial value of the field for all recipients'。