Deliverymethod fax in docusign create and send API - demo environment - docusignapi

Hi Trying to use the DocuSign createsendEnvelope API for a recipient with delivery method FAX and fax number. However in the demo environment the API needs a recipients email and always send out the email. The document is not faxed to the number provided. Can any one confirm if the demo environment is disabled for faxing options?
Thanks in Advance!

The release notes for the "Fax Out" feature in the DocuSign SOAP API describe how to send via fax with the SOAP API (http://www.docusign.com/sites/default/files/DocuSignReleaseNotes-Jun-1-2012-Final.pdf). I tried to apply the same rational to send an envelope via fax with the REST API -- here's my "Create Envelope" request:
POST https://{{env}}.docusign.net/restapi/{{version}}/accounts/{{acctId}}/envelopes
{
"emailSubject": "Please sign this",
"emailBlurb": "Please sign...thanks!",
"status": "sent",
"enableWetSign": "true",
"recipients": {
"signers": [
{
"name": "John Doe",
"email": "johnsemail#outlook.com",
"faxNumber": "2069347947",
"recipientId": "1",
"routingOrder": "1",
"deliveryMethod": "Fax",
}]
},
"documents": [
{
"name": "TestFile.pdf",
"documentId": "1",
"fileExtension": "pdf",
"documentBase64" : "DOCUMENT_BYTES"
}
]
}
Unfortunately, I receive the following error in response to the request (even though the fax number I specified is a valid fax number):
{
"errorCode": "INVALID_FAXNUMBER",
"message": "Fax Number is invalid."
}
To troubleshoot further, I tried a little reverse-engineering in an attempt to determine what properties DocuSign expects you to set for a Fax recipient.
First, using the DocuSign web console, I created/sent a new Envelope with a single recipient where the delivery method = fax. Here's a screenshot of the Status pane from the DocuSign web console for this envlope (immediately after I sent it):
Next, I used the REST API to execute a "Get Recipients" request (GET https://{{env}}.docusign.net/restapi/{{version}}/accounts/{{acctId}}/envelopes/{{envId}}/recipients) -- with the goal of examining the recipient object in the response to determine which properties need to be set for a Fax recipient. Here's the response I received:
{
"signers": [
{
"signInEachLocation": "false",
"name": "John Doe",
"email": "johnsemail#outlook.com",
"recipientId": "1",
"recipientIdGuid": "977e571d-6613-492c-8a75-9c207d46c03c",
"requireIdLookup": "false",
"userId": "03c8a856-c0ae-41bf-943d-ac6e92db66a8",
"routingOrder": "1",
"status": "sent"
}
],
"agents": [],
"editors": [],
"intermediaries": [],
"carbonCopies": [],
"certifiedDeliveries": [],
"inPersonSigners": [],
"recipientCount": "1",
"currentRoutingOrder": "1"
}
Interestingly, the API response contains no mention of "deliveryMethod", and no mention of the fax number that was specified for the recipient. This would lead me to believe that perhaps the "fax" delivery method isn't fully supported via the REST API at this time. (If it is supported, then perhaps someone with DocuSign can chime in here and explain how to send via fax (with the API).)
In the meantime, if using the DocuSign SOAP API is an option for you, you might try that route, as it appears that the "Fax Out" feature was initially designed for and implemented in the SOAP API (so I'd expect it to work there, although I haven't personally tested it).

Related

Docuisgn Embedded signing plus email

We have a requirement that we want to send DocuSign email to recipient who is marked as Captive /embedded. By default DocuSign will not send email to embedded signers. In case the recipient doesn't want to sign at our web site, they can open envelope later from their email. Is there some setting like that or some setting in Rest API call?
Found Answer at Here.
If sender sets embeddedRecipientStartURL to SIGN_AT_DOCUSIGN for particular recipient, the recipient is directed to an embedded signing or viewing process directly hosted at DocuSign.
In effect, this causes the recipient to be both embedded and receive an official "please sign" email from DocuSign.
Sample Json
{
"compositeTemplates": [{
"inlineTemplates": [{
"recipients": {
"signers": [{
"tabs": {
"fullNameTabs": [{
"fontColor": "white",
"pageNumber": 1,
"documentId": "1",
"xPosition": 400,
"yPosition": 15
}]
},
"name": "Full Name",
"email": "signersemail#email.com",
"recipientId": "1",
"clientUserId": "1000",
"embeddedRecipientStartURL": "SIGN_AT_DOCUSIGN"
}]
},
"sequence": "1"
}],
"document": {
"documentBase64": "<Base64Bytes>",
"documentId": "1",
"fileExtension": "pdf",
"name": "Doc.pdf"
}
}],
"status": "sent",
"emailBlurb": "Test Body",
"emailSubject": "Test Subject"
}
There are multiple ways to do that, depending on the exact use-case.
It seems that you want to first do embedded signing (which I assume you know how to do) and then if the user select something in your app - you want to send an email for the same exact recipient to sign the same exact envelope. So you have to make an additional API call at that point to update the recipient to remote and re-send the envelope.
That can be done using a PUT call to update the envelope. You have to add ?resend_envelope=true to that call

How to get embedded signing URL for signers who are assigned by agents/intermediaries in DocuSign?

When using agents/intermediaries to assign signers in DocuSign, we set the clientUserId for the signers to use the embedded signing feature. But DocuSign will automatically send out the email to the assigned signers and we are not able to obtain the signing URL through the API POST {{baseUrl}}/v2.1/accounts/{{accountId}}/envelopes/{{envelopeId}}/views/recipient.
As suggested in this thread: https://stackoverflow.com/a/63810135/13191875 . It's due to the clientUserId was removed when agents/intermediaries change the signer's email/name info. It suggests that a workflow could be added to pause the process after the signer's email/name info is changed, and then add the clientUserId to the signer, then resume the workflow.
I tried with request body:
{
"recipients": {
"intermediaries": [
{
"clientUserId": "1",
"email": "aaa#example.com.au",
"name": "Intermediary",
"recipientId": "1",
"routingOrder": "1"
}
],
"signers": [
{
"clientUserId": "2",
"email": "example#example.com",
"name": "example",
"recipientId": "2",
"routingOrder": "2",
"tabs": {
"signHereTabs": [
{
"anchorIgnoreIfNotPresent": "false",
"anchorString": "Signature_anchor_1",
"anchorUnits": "pixels",
"anchorYOffset": "0",
"name": "Please sign here",
"recipientId": "1"
}
]
}
}
]
},
"workflow": {
"workflowSteps": [
{
"action": "pause_before",
"itemId": "2",
"triggerOnItem": "routing_order"
}
]
},
"emailSubject": "DocuSign API - Signature Request on Document Call",
"documents": [
{
"documentId": "1",
"name": "{{fileName}}",
"documentBase64": "{{fileBase64}}"
}
],
"status": "sent"
}
I can set the clientUserId after the signer's email/name is changed. But the workflow cannot be resumed by calling the API PUT {{baseUrl}}/v2.1/accounts/{{accountId}}/envelopes/{{envelopeId}}?resend_envelope=true. So the signer's signing URL cannot be obtained since the process is paused, the signer's status stays in created.
I also tried the with agents:
{
"recipients": {
"agents": [
{
"clientUserId": "1",
"email": "aaa#example.com.au",
"name": "Agent",
"recipientId": "1",
"routingOrder": "1"
}
],
"signers": [
{
"clientUserId": "2",
"email": "",
"name": "",
"recipientId": "2",
"routingOrder": "2",
"tabs": {
"signHereTabs": [
{
"anchorIgnoreIfNotPresent": "false",
"anchorString": "Signature_anchor_1",
"anchorUnits": "pixels",
"anchorYOffset": "0",
"name": "Please sign here",
"recipientId": "1"
}
]
}
}
]
},
"workflow": {
"workflowSteps": [
{
"action": "pause_before",
"itemId": "2",
"triggerOnItem": "routing_order"
}
]
},
"emailSubject": "DocuSign API - Signature Request on Document Call",
"documents": [
{
"documentId": "1",
"name": "{{fileName}}",
"documentBase64": "{{fileBase64}}"
}
],
"status": "sent"
}
After the name/email is added by the agent, the process is paused and I set the clientUserId for the signer, I verified that it is added by calling the get recipients info API. After I resume the process, an email is sent by DocuSign to the signer and I cannot get the embedded signing URL for that signer. I can see the clientUserId is removed for that signer by calling the get recipients info API again.
My question is:
when using agents/intermediaries in DocuSign, is it possible that we can obtain the embedded signing URL for the assigned signer whose email is updated/added by agents/intermediaries?
when using agents/intermediaries in DocuSign, is it possible that we can turn off that email from DocuSign to the signer, whose email is updated/added by agents/intermediaries?
when using agents/intermediaries in DocuSign, is it possible that we can obtain the embedded signing URL for the assigned signer whose email is updated/added by agents/intermediaries?
Yes, but you'll first need to assign a clientUserId to the recipient.
And since the recipient has already been sent an email invite to the signing ceremony, adding a clientUserId attribute is problematic since doing so will invalidate the email invite.
when using agents/intermediaries in DocuSign, is it possible that we can turn off that email from DocuSign to the signer, whose email is updated/added by agents/intermediaries?
To do this, you need to stop the workflow as I described in the other answer.
Much better would be to expand your API application so that it is used to change the name/email of the signer. That way your application can also set the clientUserId at the same time and the signer won't receive any email.
Basically, embedded signing is only intended to work if the envelope is created/edited via an API program. Your goal of using an API program and using the regular DocuSign Web App (which focuses on email delivery, not embedded signing) is mixing apples and oranges. It is possible but problematic.
You can potentially use the new Advanced Recipient Routing (ARR) feature to pause the envelope, obtain the information about the next recipient (via GET call to listRecipients) and then modify it to add the clientUserId. I have not tried this, but in theory that should work.
ARR is now available in demo/developer accounts for all new accounts created.
https://developers.docusign.com/docs/esign-rest-api/how-to/pause-workflow has information about how to create the envelope such that it pauses after a specific routing number.
https://developers.docusign.com/docs/esign-rest-api/how-to/unpause-workflow shows how to resume the envelope once you made your change.
The other thing you may need to do is add a webhook call for when the status of the intermediary was updated so you know when to update the next recipient (but before you can do that you would have to obtain the information about the new recipient).

Need list of valid authentication_methods for docusign API for embedded signers

I know that there is no authentication performed by Docusign when using embedded signers. In the RecipientViewReuest it allows for an authentication_method. So far I have found that 'none' and 'email' work fine. I assumed that this was a free form text field that allowed me to say something like 'Checked their IDs' But any I've used so far (besides none and email) cause an error, so I assume there a limited list of acceptable answers. Anyone know what they are?
You can enable the following recipient authentication types on your envelope:
Access Code
Phone Authentication
SMS
Knowledge-Base Authentication(KBA)
ID Verification (IDV)
In your case (for embedded signing) you have two separate API requests to make: The only change will come in your POST /envelopes call.
Ex. Let's say I wanted to add an access code to a particular recipient. Easy as adding the accessCode property when you create your envelope.
{
"documents": [{
"documentBase64": "JVBERi0xLjMNJeLjz...lRU9GDQo=",
"documentId": "1",
"fileExtension": "pdf",
"name": "Lorem"
}],
"emailBlurb": "Sample text for email body",
"emailSubject": "Please Sign",
"envelopeIdStamping": "true",
"recipients": {
"signers": [{
"name": "{SIGNER_NAME}",
"email": "{SIGNER_EMAIL}",
"roleName": "",
"note": "",
"routingOrder": 1,
"accessCode": "{ACCESS_CODE}"
"status": "created",
"tabs": {
"signHereTabs": [{
"documentId": "1",
"name": "SignHereTab",
"pageNumber": "1",
"recipientId": "1",
"tabLabel": "SignHereTab",
"xPosition": "75",
"yPosition": "572"
}]
}
}]
},
"status": "Sent"
}
Here is a full guide on this topic.
Matthew has provided the list of additional authentication that DocuSign can do for you if you wish.
Here is the list of authentications that you can list as having performed before calling the EnvelopeViews:createRecipient method.
They're listed on that page in the description for the recipientViewRequest.authenticationMethod attribute. Use the value that best describes the authentication that your application did.
Biometric
Email
HTTPBasicAuth
Kerberos
KnowledgeBasedAuth
None
PaperDocuments
Password
RSASecureID
SingleSignOn_CASiteminder
SingleSignOn_InfoCard
SingleSignOn_MicrosoftActiveDirectory
SingleSignOn_Other
SingleSignOn_Passport
SingleSignOn_SAML
Smartcard
SSLMutualAuth
X509Certificate

DocuSign - Document Download

I'm trying to use DocuSign via Rest API and ran into a question. After a user signed document and is redirected to the URL that is specified on RecipientView (/accounts/{accountId}/envelopes/{envelopeId}/views/recipient), Considering both best and worst case scenarios, how long should we wait before we download the signed document?
I'm asking this question because we saw some issues with SigniX in the past where, after SigniX returning the control to redirectUrl, the signed document was not available to download. Even though this happened very little number of times which might be <1% of all requests, Every single document is $$ and cannot afford to lose it.
If answer to my question is Yes, Please provide a C# example on using webhook.
Thanks.
You can setup DocuSign WebHook aka Connect notifications at your account level or envelope level and automatically receive the Documents when an envelope is completed.
Here is a sample CreateEnvelope request to setup configuration for the connect notifications per envelope level. Look at eventNotification property. All you have to do is host a listener to which DocuSign can send messages.
{
"emailSubject": "Testing connect notification",
"status": "sent",
"eventNotification": {
"url": "<Add your listener URL here>",
"loggingEnabled": "true",
"requireAcknowledgment": "true",
"envelopeEvents": [
{
"envelopeEventStatusCode": "Completed"
}
],
"includeDocuments": "true"
},
"recipients": {
"signers": [
{
"name": "john smith",
"email": "johnsmith#acme.com",
"recipientId": "1",
"routingOrder": "1"
}
]
},
"documents": [
{
"documentId": "1",
"name": "Contract",
"fileExtension": "contract",
"documentBase64": "DQoNCg0KDQogICAgICAgICBEdW1teSBDb250cmFjdA=="
}
]
}
Here are some useful links which help you to setup your connect listener
WebHook c# recipe
More Api Recipes
Blog Posts
Webhooks: Don’t Poll Us, We’ll Call You!
Adding Connect Webhooks to your Application
Securing Your Connect Webhook Listener

Keeping Multiple Embedded Signers and Remote Signers on the same document

We can generate multiple Remote Signers web request and keep all the signatures from Remote signers on the same document based on the workflow and Routing Order.
The main challenge we are facing is:
If we have multiple Embedded signers and Remote signers on the same document.
How can we send the setup the web service request so that all the Signatures are captured on the same document.
Seems like for each Embedded signer an unique signing URLs is generated.
Is there a way we can maintain the same envelop for all the signers?
Please advise.
Thank you
Sure, that's easy. For any recipient who will sign through Embedded Signing you need to set their clientUserId property when you add them to the envelope. For remote signers simply do not include this property at all in those recipients' definitions.
To control the order of signing use the routingOrder property for each recipient. Note that you can only generate a signing URL for a recipient when it is their turn in the routing order, and that both serial and parallel routing is supported by the DocuSign platform.
For example, to have 3 people sign in order where the first and third recipients sign through embedded signing and the second is a remote signer - i.e. initiates through an email notification - you could use this JSON:
{
"status": "sent",
"emailSubject": "Embedded and Remote Signers",
"documents": [{
"documentId": "1",
"name": "contract.pdf",
"documentBase64": "base64 document bytes...",
}],
"recipients": {
"signers": [
{
"email": "john#email.com",
"name": "John Doe",
"recipientId": "1",
"routingOrder": "1",
"clientUserId": "1001"
},
{
"email": "sally#email.com",
"name": "Sally Doe",
"recipientId": "2",
"routingOrder": "2"
},
{
"email": "bob#email.com",
"name": "Bob Doe",
"recipientId": "3",
"routingOrder": "3",
"clientUserId": "1002"
}
]
}
}

Resources