1

I am very new to DocuSign and trying to create a proof-of-concept for integrating DocuSign with our own Managed Package for Salesforce. I understand how I can create an envelope, how to create a document based on a template, how to fill it with the data of my Salesforce record and also how to send it.

My issue though is that the data which needs to be filled into the DocuSign document is not entirely saved within the specified record. Some data such as certain KPIs are loaded from AWS but belong to the record you're looking at. To me it seems that when creating an envelope, you need to specify the record-id of the record you're trying to pull data from.

Is it possible to extend that by not specifying a record-id but rather an Apex Object or List for example?

afeta96
  • 11
  • 1
  • 1
    This should be possible using the CustomField object to fill in the fields with any data source you desire. Granted, you will need to write Apex code that leverages the toolkit in order to use it. https://developers.docusign.com/salesforce/apex-toolkit-reference/customfield.html – nbrown Jun 22 '20 at 21:40
  • 1
    Thanks for the comment! I decided to not use the Toolkit at all though and go straight with the REST API which is sufficient enough for our particular use-case. – afeta96 Jun 23 '20 at 22:47
  • Nice! Please add what you built as an answer. As I'm sure you found, examples for DocuSign are few and far between and I know some future developers would be grateful for it. – nbrown Jun 23 '20 at 22:52
  • @nbrown Sorry for the very late reply, but just to complete this thread since we successfully integrated DocuSign into our system I wanted to add a final comment. What we ended up doing was creating templates on DocuSign for various scenarios (e.g. different templates for different monetary thresholds); created a new object in SF to maintain the template IDs from DocuSign; use the regular Rest API to create envelopes (/envelopes endpoint) by getting template IDs through the mapping object in SF, passing the data as "textTabs" and "numberTabs", and adding the salesforce record of the ... (1/3) – afeta96 Feb 03 '21 at 09:45
  • @nbrown controlling record (e.g. Opportunity) as a "CustomField" to our envelope. Obviously all variables need to exist in the templates. We enabled DocuSign Connect to connect to our Salesforce org and set it up to automatically update the controlling/parent salesforce record to which a document/envelope belongs, once said document is completed. In our use case, we use the whole feature for approvals. Once the documents are signed and completed in DocuSign, DocuSign updates the status field on the Salesforce record to "Approved". One important aspect to think about is licensing ... (2/3) – afeta96 Feb 03 '21 at 09:49
  • @nbrown and how to authenticate. Do you want to have a "Integration User" that handles all Salesforce->DocuSign transactions or do you want the processes to be run by your individual SF users and require every user to have their own user in DocuSign as well. All in all, it worked! (3/3) – afeta96 Feb 03 '21 at 09:50

0 Answers0