docusign / docusign-esign-java-client

The Official Docusign Java Client Library used to interact with the eSignature REST API. Send, sign, and approve documents using this client.
https://javadoc.io/doc/com.docusign/docusign-esign-java/latest/index.html
MIT License
104 stars 95 forks source link

[Question] [Help wanted] Sending an envelope with SMS using TemplateRole #185

Open shirish-niyuj opened 3 years ago

shirish-niyuj commented 3 years ago

What are the various ways of sending an envelope with SMS using Docusign Java client? I am aware of the setAdditionalNotifications() method in com.docusign.esign.model.Signer class. In which I can assign an object of com.docusign.esign.model.RecipientPhoneNumber. But as per the code examples, if we are using an existing Template to create an envelope then we must use an object of com.docusign.esign.model.TemplateRole instead of 'Signer' object. Since my application uses templates and not hardcoded PDF as documents, I am looking for a method like setAdditionalNotifications() inTemplateRole` class. But unable to find any.

Can you please suggest the best approach to send an envelope with SMS using an existing template. A code snippet would also help.

TIA

EdwinMoralesDS commented 3 years ago

@shirish-niyuj SMS delivery option is not available from the API yet due to bug number TT-3902. The engineering team is currently working on a solution but they are still testing it.

EdwinMoralesDS commented 3 years ago

As a temporary workaround I can recommend creating the envelope as a Draft and then using the envelopesApi.updateRecipients() method should let you update the envelope to add the phone number. You would use the setAdditionalNotifications() method to set the SMS information for the signer that you are including in the recipients you want to update.

Keep in mind that this requires a minimum of 3 API calls so it may increase your API usage if you send a lot of envelopes

shirish-niyuj commented 3 years ago

Hi,

What is the best way to send SMS notifications to multiple phone numbers?

Referred to this documentation for writing the required code: https://developers.docusign.com/docs/esign-rest-api/how-to/request-signature-sms/

As mentioned in the documentation, I tried creating an object of CarbonCopy and used setCarbonCopies() method to set the Recipient with this information. I observed that the CarbonCopy got created for the envelope but I wasn't receiving a SMS on the phone number that was provided inside the CarbonCopy. Alternatively, I also tried to include the phone numbers as a list inside additionalNotifications of the Signer object. But I received an ADDITIONAL_NOTIFICATION_CHANNEL_LIMITED_TO_1 error from DocuSign on Envelope create request. Is this a hard limit?

Let me know if you need any more information from my side.