DocuSign for Salesforce - Removing Add Recipients button on Envelope - docusignapi

I am sending documents from Salesforce for Signature using DocuSign using Custom Button on the Custom Object record. I am capturing the recipients in the record and passing the details in CRL, CCRM, CCTM. Now i want to remove the feature to Add or delete or Edit the recipients that are showing in the Envelope just before send. Could any one subject what i could do to achieve this.
Thanks in-advance

Based on the documentation (http://www.docusign.com/sites/default/files/DocuSign_for_Salesforce_Administrator_Guide.pdf), I don't think it's possible to show the Envelope confirmation/review screen to the sender and NOT allow them to modify Recipients. The closest you could come would be to set OCO='Send' -- but that would result in the Envelope being sent immediately when the button is clicked (i.e., wouldn't display the Envelope confirmation/review screen at all) -- so your button code would need to supply all required Envelope information, and the sender wouldn't have the opportunity to review/change any of the information prior to the Envelope being sent.

Related

How do I prevent recipients from changing the routing order?

DocuSign the sender view Image
Details
No1.
Create an envelope with the following API.
https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopes/create/
At this time, include the following in the request body. This will invalidate any recipient edits that have already been set.
recipients.signers[0].templateRequired = 'true';
recipients.signers[0].templateLocked = 'true'.
No2.
Get the URL of the sender view of the envelope created in No1 with the following API.
https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopeviews/createsender/
No3.
Access the sender view URL obtained in No2 by specifying the following in the query parameter This will enable the envelope destination edit action.
?showHeaderActions=true&showEditRecipients=true
At this time, the Add Recipients button is pressed from the Edit Recipients action on the Senders view screen of the DocuSign UI. By default, they are sequentially numbered. (See image)
Is there any way to prevent this added recipient order from being changed by changing the settings from the screen or by specifying options when creating a recipient?
I have read the documentation but have not found a good way to do this.
Recipients should not be able to change the routing order unless they are an Editor Recipient (who can change the envelope and everything about it)
If they are all signers or other recipients with no editing privileges, the routing order will respect what you have put in.
If you are looking to make a template and lock the routing order in the template, that is possible too.
But otherwise if there are no editor type recipients, the routing order will stay the same

Recipient Delivery Failed -- Webhooks and Correcting/Resending via the API

I've been working on an integration that sends an envelope to 2 signers. I am trying to test and program for the case of 1 of the signers having a bad email address. I would need to:
Be notified of this (webhook?)
Update the email address for the signer
Update the email address in the custom fields as that's printed on the agreement
Resend the envelope
When I enable the delivery failure notification in Connect (this is set up at the account level, for now), I don't see where the failure is noted in the webhook response or for which signer the error is happening.
I've found multiple links via Google talking about "correct and resend" but I haven't been able to get anything definitive in terms of what steps need to be taken or a (PHP) code example. I've also found "resend" in the API reference but still no code examples.
I also haven't seen any code examples (PHP) of how I would update a signer's email address and how that would work via the API.
It'd also be good to know how to update custom field data for both signers so the email address in the contract is updated (it's listed separately as part of the custom form data).
And finally, how would I resend the envelope?
Thank you for your thoughts.
Per DocuSign support (customersupport#docusign.com):
Be notified of this (webhook?)
I have updated your account settings and now you should be able to see AutoResponded in your webhook messages when email invalid or unreachable.
(my comments: so it sounds like you have to ask to be able to see this stuff, it's not part of their standard webhook responses)
Update the email address for the signer
I also haven't seen any code examples of how I would update a signer and how that would work.
Unfortunately we don't have an example for recipient update but the logic is to get list of all recipients, pick the one need to be updated, and update.
You can use below to retrieve all recipients per envelope
https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/enveloperecipients/list/
GET /restapi/v2.1/accounts/accountId/envelopes/envelopeId/recipients
Extract the one you need to update edit email and update using the below
https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/enveloperecipients/update/
PUT /restapi/v2.1/accounts/accountId/envelopes/envelopeId/recipients
You can also see example code in C# how to do this in this thread https://github.com/docusign/docusign-csharp-client/issues/307
Update the email address in the custom fields as that's printed on the agreement
There is bug case created ( above link ) regarding this. At the moment you can not update signer custom fields case EC-2944.
Resend the envelope
You can resend the envelope during recipient update
https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/enveloperecipients/update/
PUT /restapi/v2.1/accounts/accountId/envelopes/envelopeId/recipients
My commentary:
Since custom fields can't be updated, this whole use-case goes out the window. We can't have contracts with incorrect data on it, so my client will have to do these corrections by hand. Kind of a bummer.

Enforce user & document specific tabs/fields within DocuSign embedded Sender screen

I have an ASP.NET MVC application that's using the DocuSign REST API to create a draft envelope, then redirect to the DocuSign Sender view, for the user to then manually add the relevant tabs/fields for each recipient, to each document.
Is there any way when creating the envelope, to state that for a given recipient, at least one signature field needs to be added (within the sender view) to a given document; for another recipient, they must add both a signature and initials field/tab to a given document, and so on. The result being that unless those criteria are met within the sender view, i.e. the sender has not added those necessary tabs/fields, then the sender cannot send the envelope until they've been added?
Basically, we don't know where on any documents these tabs/fields need to be applied, so we leave it up to the sender to add them in the DocuSign sender view, but it would be nice if we can ensure the sender does actually add the necessary tabs/fields accordingly - preventing the envelope from being sent with documents that have missing fields.
Is this possible?
You can do this but it is tricky. Here's another way to look at solving the use case; what I think you're asking for:
Your application creates the envelope in draft format
Your application opens a sender view for the human to do their tagging of the document(s) for the recipient(s)
You want your application to now have the ability to check that the human did add a certain number of tabs for various recipients. If they did, then the envelope should continue on its way to the first recipient. Else, you want to have the human try again with the sender view, or abort the send, or make the alarms go off, etc.
Here's how you can do the above:
When your app creates the envelope in draft form, add an additional signer recipient, as an embedded signer. Something like
{email: "noone#example.com", name: "App check tabs step", clientUserId: "1", routingOrder: "1"}
All the real recipients will also need their routingOrder to be set, and to a number above 1.
After the human completes the sender view (where they hopefully added the tags correctly), the envelope will be set to sent status and it will start to be routed. But since the first recipient is the embedded signer, the envelope will wait for your application to handle that recipient (because it is an embedded recipient).
After the human completes the sender view, your application can then "check" the envelope to see if the tabs were added per your specification--your app will just need to get the envelope recipients/tabs and check to see if the tabs were created.
Next step if the tabs were added correctly: your application should obtain an EnvelopeLock, then delete the embedded recipient, then delete the EnvelopeLock. Once you do this, the envelope routing will resume with the next recipient, the first "real" recipient.
If the the tabs were NOT added correctly, then you can probably open an Editing View screen for the human to fix the tabs. Or you could void the envelope. (Then re-check the envelope's tabs and then remove the embedded signer when you're ready for the envelope to proceed.)
The above works fine. There is a downside that the certificate of completion will show that the envelope was "corrected" when the "application user" was deleted.

SOAP API - deleting recipient

Looks like we can delete recipient in the REST API but is there a method in the SOAP API that will allow deleting recipients?
Currently we are calling CreateEnvelopeFromTemplatesAndForms() from the SOAP API to create the draft envelope. The template may have multiple recipients and some of them may be optional. Before we can send the envelope by setting ActivateEnvelope to true or calling SendEnvelope(), seems like all the recipients' info (i.e. name, email, etc) must be filled in, otherwise the call will throw an error "...email address is invalid...". So we would like to delete the optional recipients when they are not needed.
Can we somehow define an InlineTemplate for the CreateEnvelopeFromTemplatesAndForms() call to delete recipients?
We also looked at CorrectAndResendEnvelope(), seems like we can edit recipient info but not delete.
Thanks in advance!
No, there is no SOAP equivalent for deleting recipients. This is one of the reasons why DocuSign's REST API is encouraged over the SOAP API, and this feature gap is growing with every monthly release.
Three workarounds I can think of:
Use a recipient type like Editor or Agent to edit the recipient info after envelope has been sent.
Instead of deleting optional recipients, only add them later in the process if needed.
Use REST to delete your optional recipients.
For #1, there are recipient types like Editor, Agent, or Manage Recipients which allow you to edit the recipient info of recipients that are later in the routingOrder.
For #2, instead of adding your recipients at the beginning, only add the required recipients then at a later time if it's decided that optional ones are needed, add them through a Recipient Correction/Addition.
For #3, the nice thing is that you can intermix the APIs, and make some calls in SOAP and others in REST. The only thing you'd have to do is write code to send a REST request and parse the response.

Retroactively refresh document names in Envelopes

Can we "refresh" the document names in envelopes retroactively? We've already sent out our envelopes but need to change the document names inside of the completed/sent out envelopes. There is around a few hundred envelopes to update so updating each one individually will be problematic. The reason we need to do this is that we have a few different envelopes but when setting up the documents inside of the envelope the documents were setup with the same name so when we receive the Document through the API the documents had the same name so each document was overwriting the previous entry.
Sorry but I don't believe this is possible. Once an envelope has been sent and its status is "In-Process" the only aspects you can change are recipient(s), tab(s), and or custom fields (which are at the envelope level, not document level), and if it's in "Completed" status then there's nothing you can change about it.
So there's currently no way to change the document names of a sent envelope, and I'm not sure if there ever will be as that's like having someone sign something, then changing an aspect about that something that they signed underneath them.
With regards to what you CAN change once an envelope has been sent, you can edit the following recipient info:
email, userName, signerName, routingOrder, faxNumber, and deliveryMethod
And you can modify tabs for a given recipient as well. You can also modify any envelope custom fields you might have in the envelope. One final point I'll make, is that in our system a POST http request is always to add or create things, and a PUT http requests is for modifying existing envelopes - so whenever you are modifying a recipient, tab, or custom field make sure your requests are PUT requests.
References:
Modify or Correct and Resend Recipient Information
Modify Envelope Custom Fields for an Envelope
Modify Tabs for a Recipient

Resources