This is with the REST api and the GitHub C# client. I create an envelope and send it off using the CreateEnvelope call. I see the deserialize calls JsonConvert.DeserializeObject on the content using the EnvelopeSummary model and it works as expected. Can EnvelopeSummary return what it does now, but also custom fields if I supplied them. I can make an additional call with the envelopeid to get this info. I would like to avoid that.
You will have to make a separate API call to retrieve the envelope custom fields.
(listCustomFields)
As per the API documentation, CreateEnvelope returns the envelopeSummary object which contains the following four properties
envelopeId
status
statusDateTime
uri
Here is a sample response.
{
"envelopeId": "91d26c0d-2e5f-40d9-bf5e-de19539d5ebf",
"uri": "/envelopes/91d26c0d-2e5f-40d9-bf5e-de19539d5ebf",
"statusDateTime": "2017-01-24T18:33:06.8230000Z",
"status": "sent"
}
Use the Connect publishing service. Implement a "Connect Listener" (a Web application) and register to receive push envelope status messages, which include the envelope custom fields.
Using Connect is considered a "best practice" and does not use any API calls (does not impact your quota, does not require an API Certification). Go to the DocuSign Dev Center and look for info on Connect or "Webhooks".
Related
I'm using REST API for Embedded Signing. I need to obtain the signed document when the first signer (of N) signed. When creating the envelope, I'm sending the recipientEvents array as follows:
"recipientEvents": [
{
"includeDocuments": "true",
"recipientEventStatusCode": "completed"
}
]
In my endpoint I'm receiving a base encoded document in the XML response (see below) for the RecipientStatus with status completed. However this is not the document signed by the first signee but the original one sent along with the create envelope json. How can I receive the signed document from DS?
<DocumentPDFs>
<DocumentPDF>
<Name>Test2.pdf</Name>
<PDFBytes>JVBERi0xLjQKJfv8/f4KJVdyaXRpbmcgb2JqZWN0cy4uLgoxNCAwIG9i ---</PDFBytes>
<DocumentID>1</DocumentID>
<DocumentType>CONTENT</DocumentType>
</DocumentPDF>
</DocumentPDFs>
You will have to make a REST API call for the document from you server in this case because it's a recipient event and the entire envelope is not complete yet. This is what it looks like:
GET https://demo.docusign.net/restapi/v2.1/accounts/{ACCOUNT_ID}/envelopes/{ENVELOPE_ID}/documents/{DOCUMENT_ID}
the sample here is not working and missing the azure function, any remarks on that: https://github.com/azure-ad-b2c/samples/tree/master/policies/selectemail
You need to build the REST API yourself.
The interface of the REST API is in the readme.
The REST API needs to respond with a JSON Array:
{
"emails": [
"email1#contoso.com",
"email2#contoso.com",
"email3#notrealemail.com"
]
}
To augment the sample, you would add an inputClaim to the Get-Emails technical profile to send an identifier in JSON to your REST API. Then your REST API can respond with an appropriate response in the format above.
I'm trying to achieve ID Check on embedded signing through an envelope sent via Docusign Java SDK. I am able to make it work through remote signing however, I get the following error on embedded signing.
{
"errorCode": "INVALID_REQUEST_PARAMETER",
"message": "The request contained at least one invalid parameter. The value of AuthenticationMethod is invalid."
}
I'm fully aware of another post on the same topic posted in 2013 (DocuSign ID Check with Embedded signing). The difference here is that I'm not using any document templates but sending the documents in the envelope itself. Based on the comments a bug was logged with bug id 30830 but I can't say whether this was resolved.
Also, I have already added the settings that I know that are required for ID Check.
signer.setRequireIdLookup("true");
recipientViewRequest.setAuthenticationMethod("ID Check $");
Can anyone advise on what I'm missing ?
It's a little hard to tell from your question but from what I gather you might be setting the properties on the wrong request. As you know when creating a remote signing request you can do it through just one API request - Envelopes: create.
For embedded signing you still first create an envelope (with an embedded recipient) but then you need to generate the signing URL by calling EnvelopeViews: createRecipient.
When setting the ID Check authentication for your recipient you still need to assign this in the first request (ie the create envelope call) so that recipient is configured like so:
"recipients": {
"signers": [
{
"idCheckConfigurationName": "ID Check $",
"requireIdLookup": "true",
...
}
]
}
THEN, in the request body of the second call you need to set the authenticationMethod with the same value and provide the other required params to identify the signer.
Please confirm you are following this flow and if so and still stumped then post the actual JSON that you are sending for your requests and we should be able to determine from there.
DocuSignAPI for Salesforce.
Hello everybody, I'm following this manual to access the DocuSign API in Force.com / Salesforce.com account in order to send an object with a single click of a button to be isgned.
http://developer.force.com/cookbook/recipe/accessing-docusign-api-from-salesforcecom-to-send-contracts-for-esignatures
the problems is when i get the next error:
"The DocuSign EnvelopeId:Exception - System.CalloutException: Web service callout failed: WebService returned a SOAP Fault: The email address for the recipient is invalid. The recipient Id follows. faultcode=soap:Client faultactor=https://demo.docusign.net/api/3.0/dsapi.asmx"
Do anyone know the solution?
Thank you.
Re your specific error, I suggest that you download the API call logging information from DocuSign itself to see exactly what you sent to DocuSign via Salesforce.
In general for Salesforce/DocuSign integration, recommended first step is to use DocuSign for Salesforce, available from the Salesforce app store.
Additional developer information and source code is available from this blog post. It includes info on recipes (including source code) from DocuSign that document how to call the DocuSign API from Salesforce.
One issue to watch out for: you can't send PDFs from Salesforce to DocuSign due to callout limitations enforced by Salesforce.
Solutions:
you can make a call to a gateway (which you write). Your gateway would then pull the doc from Salesforce and then send it to DocuSign
Or use DocuSign for Salesforce which does the above for you.
thank you for your answer.
At the end the solution was that the email of the person that I wanted to send the document to sign didnt exist :P.
But now my problem is How can I update the Docusign status? becouse when I put this in an "execute anonymous windows" that creates me a Status:
dsfs__DocuSign_Status__c status = new dsfs__DocuSign_Status__c();
status.dsfs__Contract__c='0293900000xD';
status.dsfs__Envelope_Status__c='Sent';
upsert status;
but when i use this inside of a controller extension:
try {
DocuSignAPI.EnvelopeStatus es = dsApiSend.CreateAndSendEnvelope(envelope);
envelopeId = es.EnvelopeID;
// this.contract.DocuSign_Status__c=es.Status;
dsfs__DocuSign_Status__c status = new dsfs__DocuSign_Status__c();
status.dsfs__Contract__c=this.contract.Id;
status.dsfs__Envelope_Status__c=es.Status;
upsert status;
} catch ( CalloutException e) {
System.debug('Exception - ' + e );
envelopeId = 'Exception - ' + e;
}
Doesn't work, the Status is never created.
Thank you for your help.
I'm working on a PHP application that has multiple products which require signing from a customer before going for the product.
I'm using powerforms link to embed them on my application (using iFrame).
They work fine. But the problem is I need to store the document signed status in my database.
The we can set a return URL in the Docusign Preferences Page. But that will be static and I won't have a clue of what product the user has selected.
References:
Powerform Docs
You can use DocuSign Connect to receive real-time notifications of envelope events (for example, Envelope Completed). At a high-level, it works like this:
You login to DocuSign web console (as Admin) and create a Custom Connect Configuration. As part of creating this configuration, you'll specify the endpoint (http address) that you want Connect to send notifications to, and which events you want to be notified of.
You build a "listener" -- i.e., the web page that will receive the HTTP POST messages from DocuSign Connect, and process those messages.
When an Envelope or Recipient event occurs (for which you've enabled notifications in your DocuSign Connect Configuration), Connect will almost immediately send an HTTP POST to your listener. This message contains XML with info about the Envelope, Recipients, Documents, Fields, etc. You'll develop your listener such that it parses the XML message to determine Envelope status, data field values, etc. and then can respond appropriately within the context of your application (i.e., in your scenario, your listener would use the XML message from Connect to determine envelope status and which product(s) the user selected).
See this guide (http://www.docusign.com/sites/default/files/DocuSign_Connect_Service_Guide.pdf) and this page in the DocuSign Dev Center (http://www.docusign.com/developer-center/explore/connect) for more detailed information on configuring/using DocuSign Connect.
UPDATE - Using Custom Fields to populate unique Identifier for Envelope
Depending on the nature of your use case, you might need to use an "envelope custom field" to populate a unique identifier for each Envelope in the "create/send envelope" request, so that your listener application has a way of identifying the envelope when it receives a Connect message. (An 'envelope custom field' is simply a custom piece of metadata on an envelope.) Simply set the customFields property in your Create Envelope request, and populate a single textCustomFields item with the unique identifier. For example:
{
"emailSubject": "Please sign this",
"emailBlurb": "Please sign...thanks!",
"customFields": {
"textCustomFields": [
{
"value": "1234567",
"required": "false",
"show": "true",
"name": "ProductId"
}
]
},
"status": "sent"
...
}
See the REST API Guide (http://www.docusign.com/sites/default/files/REST_API_Guide_v2.pdf) for more detailed info about using Custom Envelope Fields.