Streamline Salesforce Lightning with DocuSign: Creating Custom Buttons
In today's fast-paced business environment, efficiency is key. Salesforce Lightning, with its intuitive interface and powerful features, has become a go-to platform for sales teams. However, to truly maximize productivity, integrating DocuSign for seamless document signing and management is a game-changer. This article will guide you through creating custom buttons in Salesforce Lightning to launch DocuSign, enhancing your sales processes.
Understanding DocuSign for Salesforce
DocuSign, a leading eSignature solution, seamlessly integrates with Salesforce. This integration allows you to send documents for signature, track their status, and store completed documents directly within Salesforce. By creating custom buttons, you can make DocuSign functionality easily accessible within your Salesforce Lightning interface.
Prerequisites
- DocuSign for Salesforce integration must be set up and active.
- You should have the necessary permissions to create custom buttons in Salesforce.
- Basic understanding of Salesforce Lightning and DocuSign is recommended.
Creating a Custom Button for DocuSign
To create a custom button for DocuSign in Salesforce Lightning, follow these steps:

Step 1: Create a New Lightning Component
In your Salesforce org, navigate to the Lightning App Builder. Click on 'New' and select 'Lightning Component'. Name your component (e.g., 'DocuSign_Send_Document') and click 'Next'.
Step 2: Design the Component
In the design editor, create a button using the 'Aura: Input' component. Set its 'Label' to 'Send for Signature' and 'Value' to '{!v.documentId}'. Click 'OK'.
Step 3: Add JavaScript Controller
Click on 'Add JavaScript Controller' and name it 'DocuSignController'. In the controller, write a function to handle the button click event:

({
handleClick : function(component, event, helper) {
var docId = component.get("v.documentId");
var docuSignUrl = '/apex/DocuSign_Send_Document?id=' + docId;
window.open(docuSignUrl, '_blank');
}
})
Step 4: Save and Activate
Save your component and activate it. Now you can add this custom button to your Lightning pages.
Adding the Custom Button to Lightning Pages
To add the custom button to your Lightning pages, follow these steps:
- Navigate to the Lightning App Builder for the page where you want to add the button.
- Drag and drop the 'Custom: DocuSign_Send_Document' component onto the page.
- Set the 'Document Id' field to '{!Record.Id}'.
- Save and activate the page.
Benefits of Using DocuSign with Salesforce Lightning
| Benefit | Explanation |
|---|---|
| Increased Efficiency | Quickly send documents for signature without leaving Salesforce. |
| Improved Compliance | Ensure documents are signed by the right people with real-time tracking. |
| Better Visibility | Monitor document status directly within Salesforce. |
By integrating DocuSign with Salesforce Lightning and creating custom buttons, you're empowering your sales team to work faster, smarter, and more efficiently. Embrace this powerful combination to drive your business forward.





















