@@ -45,11 +45,9 @@ const smsDelivery = async (args) => {
4545 */
4646function makeEnvelope ( args ) {
4747 // Data for this method
48- // args.signerEmail
4948 // args.signerName
5049 // args.phoneNumber
5150 // args.countryCode
52- // args.ccEmail
5351 // args.ccName
5452 // args.ccPhoneNumber
5553 // args.ccCountryCode
@@ -111,20 +109,15 @@ function makeEnvelope(args) {
111109 number : args . phoneNumber ,
112110 } ) ;
113111
114- // Create an additional notification for the signer
115- let signerSmsNotification = new docusign . RecipientAdditionalNotification ( ) ;
116- signerSmsNotification . phoneNumber = signerPhoneNumber ;
117- signerSmsNotification . secondaryDeliveryMethod = "SMS" ;
118-
119- // Create a signer recipient to sign the document, identified by name and email
112+ // Create a signer recipient to sign the document, identified by name and phone number
120113 // We're setting the parameters via the object constructor
121114 let signer1 = docusign . Signer . constructFromObject ( {
122- email : args . signerEmail ,
123115 name : args . signerName ,
116+ phoneNumber : signerPhoneNumber ,
124117 recipientId : "1" ,
125118 routingOrder : "1" ,
126119 } ) ;
127- signer1 . additionalNotifications = [ signerSmsNotification ] ;
120+
128121 // routingOrder (lower means earlier) determines the order of deliveries
129122 // to the recipients. Parallel routing order is supported by using the
130123 // same integer as the order for two or more recipients.
@@ -135,19 +128,13 @@ function makeEnvelope(args) {
135128 number : args . ccPhoneNumber ,
136129 } ) ;
137130
138- // Create an additional notification for the signer
139- let ccSmsNotification = new docusign . RecipientAdditionalNotification ( ) ;
140- ccSmsNotification . phoneNumber = ccPhoneNumber ;
141- ccSmsNotification . secondaryDeliveryMethod = "SMS" ;
142-
143- // Create a cc recipient to receive a copy of the documents, identified by name and email
131+ // Create a cc recipient to receive a copy of the documents, identified by name and phone number
144132 // We're setting the parameters via setters
145133 let cc1 = new docusign . CarbonCopy ( ) ;
146- cc1 . email = args . ccEmail ;
147134 cc1 . name = args . ccName ;
148135 cc1 . routingOrder = "2" ;
149136 cc1 . recipientId = "2" ;
150- cc1 . additionalNotifications = [ ccSmsNotification ] ;
137+ cc1 . phoneNumber = ccPhoneNumber ;
151138
152139 // Create signHere fields (also known as tabs) on the documents,
153140 // We're using anchor (autoPlace) positioning
@@ -198,9 +185,7 @@ function makeEnvelope(args) {
198185
199186function document1 ( args ) {
200187 // Data for this method
201- // args.signerEmail
202188 // args.signerName
203- // args.ccEmail
204189 // args.ccName
205190
206191 return `
@@ -216,8 +201,8 @@ function document1(args) {
216201 margin-top: 0px;margin-bottom: 3.5em;font-size: 1em;
217202 color: darkblue;">Order Processing Division</h2>
218203 <h4>Ordered by ${ args . signerName } </h4>
219- <p style="margin-top:0em; margin-bottom:0em;">Email : ${ args . signerEmail } </p>
220- <p style="margin-top:0em; margin-bottom:0em;">Copy to: ${ args . ccName } , ${ args . ccEmail } </p>
204+ <p style="margin-top:0em; margin-bottom:0em;">Phone number : ${ args . phoneNumber } </p>
205+ <p style="margin-top:0em; margin-bottom:0em;">Copy to: ${ args . ccName } , ${ args . ccPhoneNumber } </p>
221206 <p style="margin-top:3em;">
222207 Candy bonbon pastry jujubes lollipop wafer biscuit biscuit. Topping brownie sesame snaps sweet roll pie. Croissant danish biscuit soufflé caramels jujubes jelly. Dragée danish caramels lemon drops dragée. Gummi bears cupcake biscuit tiramisu sugar plum pastry. Dragée gummies applicake pudding liquorice. Donut jujubes oat cake jelly-o. Dessert bear claw chocolate cake gummies lollipop sugar plum ice cream gummies cheesecake.
223208 </p>
0 commit comments