对于In Person Signer类型,收件人签名者名称不能为空

时间:2016-08-12 20:59:26

标签: docusignapi

当我尝试从模板中实例化信封时,我突然收到此错误消息:

text: '{\r\n  "errorCode": "IN_PERSON_SIGNER_NAME_CANNOT_BE_BLANK",\r\n  "message": "For In Person Signer type, the Recipient Signer Name cannot be blank."\r\n}',

这是我用来创建TemplateRoles的代码:

  const tRole = new docusign.TemplateRole();
  tRole.setRoleName(templateRoleName);
  tRole.setName(signerName);
  tRole.setEmail(signerEmail);

  tRole.setInPersonSignerName(signerName);
  tRole.setDefaultRecipient('true');
  tRole.setClientUserId('agent');
  templateRolesList.push(tRole);

  // Create a tempalte role for each client
  // TODO: Set correct user data where appropriate instead of test data
  let count = 1;
  forEach(opts.contacts, () => {
    const clientRole = new docusign.TemplateRole();
    clientRole.setRoleName(`client${count}`);
    clientRole.setName(signerName);
    clientRole.setEmail(signerEmail);

    clientRole.setInPersonSignerName(signerName);
    clientRole.setDefaultRecipient('true');
    clientRole.setClientUserId(`client${count}`);

    templateRolesList.push(clientRole);
    count++;
  });

  console.log('templateRolesList', JSON.stringify(templateRolesList));

从控制台日志中,我得到:

[
  {
    "email": "eng@residenetwork.com",
    "roleName": "agent",
    "name": "Reside Network",
    "signingGroupId": null,
    "inPersonSignerName": "Reside Network",
    "clientUserId": "agent",
    "embeddedRecipientStartURL": null,
    "defaultRecipient": "true",
    "accessCode": null,
    "routingOrder": null,
    "emailNotification": null,
    "tabs": null
  },
  {
    "email": "eng@residenetwork.com",
    "roleName": "client1",
    "name": "Reside Network",
    "signingGroupId": null,
    "inPersonSignerName": "Reside Network",
    "clientUserId": "client1",
    "embeddedRecipientStartURL": null,
    "defaultRecipient": "true",
    "accessCode": null,
    "routingOrder": null,
    "emailNotification": null,
    "tabs": null
  }
]

在这些对象中,inPersonSignerName设置为" Reside Network"。我不明白为什么会出现这个错误或抱怨什么。

我们的代码没有改变(尽管我们的帐户可能有一些设置)。

1 个答案:

答案 0 :(得分:2)

对于inPersonSigners,需要托管签名的用户的姓名和电子邮件,并且需要签名者的姓名,而他们的电子邮件是可选的。

例如:

"inPersonSigners": [{
    "hostEmail": "john.doe@company.com",
    "hostName": "John Doe",
    "autoNavigation": true,
    "defaultRecipient": false,
    "signInEachLocation": false,
    "signerEmail": "optional_signer_email",
    "signerName": "Sally Doe"
}],

inPersonSigner的API文档: https://docs.docusign.com/esign/restapi/Envelopes/EnvelopeRecipients/#inPerson