Process to Update Child Records Using the Lightning Process Builder
Share on facebook
Share on twitter
Share on linkedin
DocuSign for Salesforce helps us shorten sales cycles, increase close rates, increase productivity, and reduce paper waste, resulting in savings of time. It allows us to quickly pull data from Salesforce objects like Lead, Account, Contact, Opportunity etc. and then either sign documents online, or send them out for signature directly from Salesforce. The signed documents are then returned to Salesforce and attached to the corresponding salesforce records.
Why Choose Docusign?
Merge Fields Embed the Power of Salesforce into your Documents
DocuSign allow us to make use of Salesforce (merge) fields, by simply dragging and dropping data fields into vital documents. This never requires any programming knowledge, which results in reduced operating costs.
Accurate & Secure Transactions
DocuSign provides 100% accurate & secure transactions, reduces employee time spent on handling and tracking documents, and eliminates costs of paper, ink, printing, faxing and mail. The transaction details are tracked in existing systems as well as Salesforce.
Collaborate in the Cloud
Users can leverage DocuSign for Salesforce to close deals in the cloud and resend to all signing parties to accept. Changes are tracked throughout the process, so users always know what was changed, when and who signed off.
Single Sign On with your Salesforce Password
It also provides Single Sign On facility; so users can automatically log into DocuSign with their existing Salesforce username and password, and the user is n0t required to remember and manage multiple passwords.
Steps to create DocuSign Developer Account
Step 1 : Go to the following url to create DocuSign developer account,
Step 2 : Now, click the ‘Get a Free Dev Account’ button. (For trial version)
Step 3 : Next, fill in all the fields with appropriate information and then click the ‘Get Started’ button.
Note: Specify a valid email address to receive the activation code.
Step 4 : Now, check your email and click the ‘Account Activation’ message.
Step 5 : Next, click the ‘Activate’ button.
Step 6 : Now, enter the password and security question and then click the ‘Activate’ button.
Step 7 : Your DocuSign developer account is created successfully. Finally, remember this username and password.
Steps to install DocuSign in Salesforce
Step 1 : Go to the following App Exchange url to install DocuSign application,
Step 2 : Now, click the ‘Log In’ button.
Step 3 : You can log into the AppExchange using one of the following methods.
Using Salesforce Production Credential (if you have the production credential) or
Using Salesforce Developer Edition Credential.
Step 4 : Next, click the “Get It Now” button.
Step 5 : Now,click the ‘Install in sandbox’ button to install the DocuSign application on a Sandbox. For Production, click ‘Install in Production’
Step 6 : Next, enable the checkbox and then click the ‘Confirm and Install’ Button to continue installation process.
Step 7 : Enter the sandbox login credentials, and then click the ‘Log in to Salesforce’ button.
Step 8 : Now, you will see the list of Package components and the version details of the application. Click the ‘Continue’ button to install.
Step 9 : Review the third-party access information. This shows a list of websites that the package might send data to or receive data from during operations. Finally, enable the checkbox and then click the ‘Continue’ button.
Step 10 : Approve Package API Access. Review the information on the page and then click the ‘Next’ button to continue the installation process.
Step 11 : Choose the security level. The security level determines user access to DocuSign for Salesforce. DocuSign recommends you select ‘Grant access to all users’ (you can change user access later through the DocuSign Admin tab) and then click the ‘Next’ to continue.
Step 12 : Click the ‘Install’ button to complete your installation process.
Steps to configure the installed Package
Step 1 : After installation, Go to App Setup Deploy Installed Packages,find the ‘DocuSign for Salesforce’ package and then click the ‘Configure’ button to start the configuration.
Step 2 : Now, you will be redirected to ‘Configuring Docusign For Salesforce’ page.
Enter the Email and password of Docusign Developer Account.
Set the Environment to demo for trial version.
And then click the ‘Log in’ button.
Step 3 : In order to enable a Salesforce connection to DocuSign, you must add DocuSign as a trusted network and connect your Salesforce account to DocuSign. Add all four IP ranges as follows
A pop-up window with the Salesforce Network Access Trusted IP Range Edit window opens and the IP range information is shown.
Click Save. Do not modify the IP range. The range is populated automatically with the correct values for remote access to the DocuSign data centers.
Close the Network Access pop-up window.
Repeat the ‘Add IP Range’ steps for each of the remaining Add IP Range buttons. After adding all four ranges, you will have the following IP ranges listed in Salesforce Network
Access as Trusted IP Ranges:
18.104.22.168 through 22.214.171.124
126.96.36.199 through 188.8.131.52
184.108.40.206 through 220.127.116.11
18.104.22.168 through 22.214.171.124
Step 4 : Now go to ‘Connect DocuSign to Salesforce’ section and enter the following information:
Enter the Salesforce Username and Password
Select the Saleforce Environment to Sandbox for trial version.
And then click the ‘Next’ button.
Step 5 : Finally, click the ‘Done’ button to connect with Docusign developer account.
Once the connection is created between Salesforce and Docusign, next we need the Integration Key. This key is a Unique Identifier for each DocuSign integration. An Integrator Key is required for all integrations, and if you want to move to Production, the Integrator Key must be authorized by DocuSign for Production.
All Integrator Keys are used for development first, and as a result, they are all managed (and requested) in DocuSign’s DEMO service. If you already have a DocuSign Developer account (demo), log into the account and request an Integrator Key. If you do not have a Demo Developer Account, go to the DocuSign Developer Center: https://www.docusign.com/developer-center and request a free account. After development is done using Demo Integrator Key, then we must get that Integrator Key certified before moving to production.
Important: Web service calls made without an Integrator Key will receive an exception for every call made. The exception message states, “The specified Integrator Key was not found or is disabled”.
Sample Code :
In order to use DocuSign API, you need to retrieve your DocuSign API credentials. Go to https://demo.docusign.net, sign into your demo account, and then go to Preferences -> API. There you will find these values:
Integrator's Key: ZORO-a81ec71a-cb17-4af0-b1aa-9513115cbf02
API UserName: 0e212ae6-1e12-40c1-8f5a-a57458ccaa63
API Account ID: 736e7948-6861-4ef3-ae71-4c56603dc14f
String auth = ''+ userId
+'' + password
+ '' + integratorsKey
System.debug('Setting authentication to: ' + auth);
dsApiSend.inputHttpHeaders_x = new Map();
DocuSignAPI.Document document = new DocuSignAPI.Document();
document.ID = 1;
document.pdfBytes = EncodingUtil.base64Encode(pdfdocument);
document.Name = 'Contract';
document.FileExtension = 'pdf';
envelope.Documents = new DocuSignAPI.ArrayOfDocument();
envelope.Documents.Document = new DocuSignAPI.Document;
envelope.Documents.Document = document;
DocuSignAPI.Recipient recipient = new DocuSignAPI.Recipient();
recipient.ID = 1;
recipient.Type_x = 'Signer';
recipient.RoutingOrder = 1;
recipient.Email = ‘Test@gmail.com’;
recipient.UserName = ‘TestName’;
//Calling the API to send Document to the Recepient
DocuSignAPI.EnvelopeStatus es = dsApiSend.CreateAndSendEnvelope(envelope);
Docusign certification process
Once the development is done in the demo environment, applications must go through a certification process to deploy the application in production environment. DocuSign Certification Review team will examine the application to ensure following development best practices have been followed.
1. API Certification Checklist
Here, we need to provide the basic information regarding our application, company name, technical and business contacts, and technical and business insight on how you plan to work with DocuSign and the API.
2. A video demonstrating the application
We need to provide a video demonstrating end-to-end functionality of our application. This video should clearly explain the user experience from both the sender and signer perspective. Also, it should include all “signing” options, including Decline to Sign, Sign on Paper, Finish Later, Change Signer, etc.
3. Screen shots of exception handling messages
The exception handling screen shot must expose what users observe when signing and sending the documents fail due to an unexpected error. We must show a friendly error message with specific contact information to our support staff such as email and/or phone.
4. JSON, SOAP, or XML HTTP/s web service request and response trace
The Trace must clearly show the request and response including headers, and the Docusign should be able to recreate the event using the provided trace. The provided trace must also contain URI, endpoint, authentication method, credentials, and payload etc.
5. Single date indicating at least 20 test transactions
The log file should contact twenty test transactions to show the integration from end-to-end. The tests need to be on a single day and without interference of other testing. These tests must be run using the Integrator Key provided in the Checklist for promotion. For a given date, DocuSign will pull our server logs to validate no errors occurred and best practices are being followed like caching, and will focus around how the application polls status of the document.
6. Details on how status is obtained via Connect, Fetch, or API
Provide a detailed description of how envelope status is obtained via Connect, Fetch, or API. Docusign will check the server log to ensure best practices have been followed.
DocuSign is a powerful Digital Transaction Management tool that allows businesses to share documents with their customers for electronic signature easily, securely and efficiently in the Cloud.
The Process Builder is a new workflow tool that helps automate the business processes by providing a user-friendly visual representation with point-and-click efficiency. The Process builder consists of criteria that determine when to execute action groups—whether to execute the actions immediately or in the future when those criteria are met. Furthermore, the process builder gives the advantage of various automated processes, like creating a record, updating a child record when the parent record is updated, sending an email, posting to Chatter, and submitting for approval.
Steps to create a process to update child records when the parent record is updated:
1. Under Build section
NAVIGATE TO CREATE –> WORKFLOW & APPROVALS –> PROCESS BUILDER
2. Click New
3. Enter the Name, API Name and Click Save
4. Click Add Object, choose Object, specify when to start the Process, and Click Save
5. Click Add Criteria, enter the Criteria Name, Filter Conditions, and click Save.
6. Click Add Action, and select the Action Type as Update Records.
7. Select the object, set the Object Variables, and click Save.
8. Activate the process, by clicking the Activate Button.
When an Account object’s Shipping Address is updated, all its Contacts’ mailing address under the Account get updated.
Here you can see the Contact records’ mailing address related to the Account also got updated.
Automated processes in the Process Builder consists of criteria that determine when to execute actions when the criteria are met. Any change that causes a record to match the criteria can automatically trigger the action group. Record updates are a vital part of any organization with large number of customers as the customers might change the address, phone number or any other information. Lightning Process Builder provides the functionality with point and click for easy record updates when the criteria are met. The article illustrates the steps for updating all the contact records’ mailing address, when an account record’s shipping address is updated.
At MST Solutions our cornerstone is to adapt, engage and create solutions which guarantee the success of our clients. The talent of our team and experiences in varied business verticals gives us an advantage over other competitors.
Our people aren’t just employees, they are key to the success of our business. We recognize the strengths of each individual and allow them time and resources to further develop those skills, crafting a culture of leaders who are passionate about where they are going within our organization.