docusign/code-examples-node

How do I change phone numbers when using templates to generate envelopes

shengbid opened this issue · 7 comments

Create templates that require phone validation. How do I change phone numbers when using templates to generate envelopes
image

image

Is there any interface that can modify the recipient as templateRoles does ?

See https://developers.docusign.com/docs/esign-rest-api/how-to/phone-auth/
The node code for a recipient is like this:

let signer1 = docusign.Signer.constructFromObject({
    email: args.signerEmail,
    name: args.signerName,
    recipientId: "1",
    routingOrder: "1",
    deliveryMethod: "Email",
    tabs: signer1Tabs,
    identityVerification: { workflowId: args.workflowId, steps: null, "inputOptions":[{"name":"phone_number_list","valueType":"PhoneNumberList","phoneNumberList":[{"countryCode":args.countryCode,"code":"1","number":args.phoneNumber}]}], "idCheckConfigurationName":""}

Just replace the Signer object with a TemplateRole object, but the rest should be the same.

How do I get signer1Tabs content? I want to generate the envelope with the defined template

The last error occurs because you're using a templateId which requires templateRole so you cannot specify recipients too.
I would recommend using the composite template model that allow the most flexibility.

Let us know if you still need help on this