+ Start a Discussion
Nina GonzalezNina Gonzalez 

How to automatically send a docusign using workflow or process builder?

When a checkbox field is 'true' want to automate the sending of a docusign. I know all the logic can be included in javascript for a custom button. Can you do the same for process builder or workflow? Can you use javascript? Or is there another way to automate this process?
Are you using Conga to send docusign email?
It would help if you can post your javascript button code to see if it is possible to do it with workflow.
Nina GonzalezNina Gonzalez
We are not using Conga. We are considering Drawloop but think a workflow or process builder may be better. We already have our template built with our merge fields. Plus we have a lot of customization in our read / write rules and our docusign status and attachements. A lot is setup and working so we would like to avoid using a third party tool, if possible.  Here is a script for a custom button. 

//********* Option Declarations (Do not modify )*********//
var RC = '';var RSL='';var RSRO='';var RROS='';var CCRM='';var CCTM='';var CCNM='';var CRCL=''; var CRL='';var OCO='';var DST='';var LA='';var CEM='';var CES='';var STB='';var SSB='';var SES='';var SEM='';var SRS='';var SCS ='';var RES='';
// Modify individual options here:
// Related Content (default no related content)
RC = ''; //Ex: GetRelContentIDs("{!Opportunity.Id}");
// Recipient Signer Limit (default no limit)
RSL = ''; //Ex: '3'
// Recipient Starting Routing Order (default 1)
RSRO = ''; // Ex: '1'
// Recipient Routing Order Sequential (default not sequential)
RROS = ''; //Ex: '1'
// Custom Contact Role Map (default config role)
CCRM = ''; //Ex: 'Decision Maker~Signer1;Economic Buyer~Carbon Copy'
// Custom Contact Type Map (default Signer)
CCTM = ''; //Ex: 'Decision Maker~Signer;Economic Buyer~CC'
// Custom Contact Note Map (default no note)
CCNM = ''; //Ex: 'Decision Maker~Note for DM;Economic Buyer~Note For EB;DEFAULT_NOTE~Default Note'
// Custom Related Contact List (default object contact)
CRCL = ''; //Ex: 'MyContacts__r,Email~Email__c;FirstName~First_Name__c;LastName~Last_Name__c;Role~Role__c,LoadDefaultContacts~0'
// Custom Recipient List
CRL = ''; //Ex: 'Email~;FirstName~;LastName~;Role~SignInPersonName~;RoutingOrder~;AccessCode~;RecipientNote~;SignNow~, LoadDefaultContacts~1'
// One Click Option (default edit envelope screen)
OCO = ''; //Ex: Tag
// DocuSign Template ID (default no template)
DST = ''; //Ex: '67870A79-A0B5-4596-8AC1-CC7CC1EA01EB'
// Load Attachments (default on)
LA = ''; //Ex: '0'
// Custom Email Message (default in config)
CEM = ''; //Ex: 'Envelope sent by [FirstName] [LastName] ([Email])!'
// Custom Email Subject (default in config)
CES = ''; //Ex: 'Re: Opportunity Name: {!Opportunity.Name}'
// Show Tag Button (default in config)
STB = ''; //Ex: '1'
// Show Send Button (default in config)
SSB = ''; //Ex: '1'
// Show Email Subject (default in config)
SES = ''; //Ex: '1'
// Show Email Message (default in config)
SEM = ''; //Ex: '1'
// Show Reminder/Expire (default in config)
SRS = ''; //Ex: '1'
// Show Chatter (default in config)
SCS = ''; //Ex: '1'
// Reminder and Expiration Settings
RES = ''; //Ex: '0,1,2,0,120,3'
//********* Page Callout (Do not modify) *********//
window.location.href = "/apex/dsfs__DocuSign_CreateEnvelope?DSEID=0&SourceID={!Opportunity.Id}&RC="+RC+
Nina GonzalezNina Gonzalez
Here is another script that may be better for this purpose:
var SourceID = "{!opp.Id}"; var LA = "0"; var DST = "XXXXX"; //This is the template id that you will only get from docusign portal var OCO = "Send"; //this specify that the page is automatically send to avoid clicking send from that VF Page window.open("/apex/dsfs__DocuSign_CreateEnvelope?DSEID=0&SourceID={!opp.Id}&LA=0"+"&DST="+DST+"&OCO="+OCO, '_top');
You cannot automate docusign envelope delivery I afraid. AFAIK, You have to use some kind of merging and delivery tool like Conga (looks like drawloop has similar functionality) to merge fields and deliver docusign enevlope.

I recommend  you to check with DocuSign once. They have a very good support team who will be able to guide you.
Nina GonzalezNina Gonzalez
OK, thanks. I suspect that a trigger or Apex code may work. I will contact Docusign.
Nate VannNate Vann
Looking into doing the same. Was Docusign able to help?
Swapna MistrySwapna Mistry
I know this thread is old, but did DocuSign advise if it was possible to automate the envelope delivery?
Nina GonzalezNina Gonzalez
Docusign indicated that it was not possible. 
Ni MaNi Ma
This is possible but would need APEX coding that calls Docusign API for envelope creation/delivery.
Hello, old post I know, but it is possible, just check this out from the DocuSign Salesforce Admin Guide (https://support.docusign.com/en/guides/DocuSign-for-Salesforce-v7-Administrator-Guide), at the very end, p. 199 - 202
snehil kumarsnehil kumar
It enables Salesforce developers (and even admins if they are so inclined) to integrate DocuSign into their custom Salesforce apps and processes quite easily. (https://www.docusign.com/blog/dsdev-dreamforce-2018-trailhead-demo-recap/)