ABSYZ ABSYZ

  • Home

    Home

  • About us

    Who We Are

  • Our Expertise

    What we Do

  • Our Approach

    How We Do It

  • Products

    What We Made

  • Industries

    Who We Do It For

  • Clients

    Whom We Did It For.

  • Article & Blogs

    What Experts Think

  • Careers

    Join The Team

  • Get In Touch

    Let’s Get Started

ABSYZ

CONGA-DOCUSIGN FOR SALESFORCE INTEGRATION WITH OUTBOUND MESSAGE

Home / Article & Blogs / Conga / CONGA-DOCUSIGN FOR SALESFORCE INTEGRATION WITH OUTBOUND MESSAGE
By sebanasir94 inConga, Docusign, Salesforce

Conga Composer helps create and deliver documents from Salesforce by automatically populating the templates with data from any standard or custom object using merge fields. On the other hand, DocuSign is an eSignature solution that integrates with Salesforce. DocuSign delivers Conga Composer documents via email with the ability to acquire, track and file signatures using automatic anchor text and tags. Thus, if you can integrate DocuSign and Conga Composer, the Conga Composer would help gather information from any object in Salesforce and the DocuSign would allow the recipients to input data into the document. Does n’t that sound cool?!

How will it be if we can have Conga – DocuSign integration bound to the outbound message feature in Salesforce? Let us see – how to do it and how it works.

Step 1:

First, create the Conga Composer template with all the necessary merge fields to pull data from the related Salesforce record. Also, we can enter automatic anchor text like \s1\,\t1\,\d1\ etc. to enable the recipient to input data into the document. For example, use \s1\ where you want the tag information for the first signer to appear; Use \s2\ where you want the second signer to sign and so on.

Note: Colour the tag information white so it does not appear in the document.

Force1

Custom tags can also be related to Salesforce, which gives users the ability to push data from a DocuSign Envelope back into specific Salesforce fields.

Step 2: Store the document as a new Conga Template record to make it available for merging

 

Force2

Step 3:

The next and significant factor in this process is the formula field we send in the outbound message.

Force3

The formula field, as you can see, can hold a number of DocuSign integration parameters depending on our requirement.

&Template ID= The template ID of the document you uploaded in Step 2.

&DocuSignVisible=1 Changes the Action picklist in the Composer dialogue box to DocuSign.

&DocuSignR1Id= The record ID of a Salesforce Contact, Lead, or User to whom the document has to be send. This can be done with Salesforce fields, typically a lookup or formula field, with Contact Roles, or with more advanced options.

&DocuSignR1Type= Sets the recipient type. For e.g.: the type signer indicates that the recipient must sign, initial, date, or add data to tags on the documents in the envelope.

&DocuSignR1Role= Sets the role of the specified recipient as defined in Envelope Settings

&DocuSignR1RoutingOrder= Sets the order in which the message will be routed to recipients when multiple recipients exist.

&DocuSignSendAsUserId= Specifies a user if from which DocuSign envelopes are sent. Make sure this is the id of the user populated in the lookup field ‘User to send as’ in the outbound message

&DocusignEndPoint= Configures the Composer to connect to a specific DocuSign endpoint other than the DocuSign production endpoint. By default this will be set to prod.

&DS7=7 or 17 Runs in background mode and automatically sends the document.

You may refer this link for the DocuSign Integration Parameters:

https://support.getconga.com/Conga_Composer/Customizing_Composer_with_Parameters/Composer_Parameter_Guide/DocuSign_Integration_Parameters

Step 4:   Next, let us set up the  workflow rule.

force11WF

And the outbound message would look like:

Force6

What exactly are we doing in the workflow?

We include the formula field we created in Step 3, in the outbound message workflow action. (Keep note of the Endpoint URL, User to send as, Send Session ID fields)

Once the workflow is triggered, the outbound message sends the SOAP message to the designated endpoint, which in our case is the conga merge endpoint. The message contains the fields specified in the outbound message. Once the endpoint URL receives the message, it takes the information from the message and processes it, from where, it gets connected to the DocuSign endpoint and the document gets sent to the recipient from DocuSign.

VIEWING ENVELOPE STATUS

DocuSign also lets you examine the status of envelopes and review detailed status information about individual envelopes.

  1. From the force.com apps menu, select DocuSign for Salesforce.
  2. Click the DocuSign Status tab.

DocuSign Status Home page display the default view showing the status of all your recently viewed envelopes.

Force12

When DocuSign for Salesforce is installed, DocuSign Connect for Salesforce is set up for your system (DocuSign Connect for Salesforce sets up a connection between your Salesforce account and DocuSign) and two Connect Objects, one that updates envelope status and documents (Object name:  DocuSign Status ) and one that updates recipient status (Object name: DocuSign Recipient Status) , are added. Whenever selected events occur for an envelope (like envelope is in the sent, delivered or completed signing stages), DocuSign connects to Salesforce and updates the status record.

You will see the updates in Salesforce about 20‐30 seconds after the data changes or an event occurs in the DocuSign service.

 

CONNECTING DOCUSIGN FOR SALESFORCE WITH CUSTOM OBJECTS

To send the envelope to a contact or lead on a custom object, establish a lookup relation between the custom object and the DocuSign Status object and perform the DocuSign Connect settings to add the object to DocuSign.

force15

You may refer this documentation for the Connect Settings:

https://www.docusign.com/sites/default/files/DocuSign%20Connect%20for%20Salesforce.pdf

Note that the ‘Contact_dsfs’ field in DocuSign Status object has to be populated with the contact in the related custom object to whom the envelope needs to be send. For this, upon the insertion/updation of the DocuSign Status record, you can use a trigger as below:

[sourcecode language=”java”]
Set ABCSet = new Set ();

Set docuSignSet = new Set ();

list docuSignReclstToUpdate = new list ();

map ABCMap = new map ();

for(dsfs__DocuSign_Status__c docuSignStatus: Trigger.New)

{

if (Trigger.isInsert)

{

if (docuSignStatus.ABC_Object__c!= null)

{

ABCSet.add(docuSignStatus.ABC_Object__c);

docuSignSet.add(docuSignStatus.Id);

}

}

if (trigger.isUpdate)

{

if (docuSignStatus.ABC_Object__c != null && docuSignStatus.ABC_Object__c !=

triggerOldMap.get(docuSignStatus.Id).ABC_Object__c)

{

ABCSet.add(docuSignStatus.ABC_Object__c);

docuSignSet.add(docuSignStatus.Id);

}

}

}

for(ABC_Object__c bAC: [Select Id, related_Contact from ABC_Object__c Where Id =: ABCSet])

{

ABCMap.put(bAC.Id, bAC.related_Contact);

}

list docuSignStatuslist = [Select Id, ABC_Object__c, (Select dsfs__Contact__c from R00NS0000000WUO2MAO) from dsfs__DocuSign_Status__c where Id =: docuSignSet];

for(dsfs__DocuSign_Status__c docuSignStatus: docuSignStatuslist)

{

for(dsfs__DocuSign_Recipient_Status__c docuSignRec:  docuSignStatus.R00NS0000000WUO2MAO)

{

if(ABCMap.containsKey(docuSignStatus.ABC_Object__c))

{

docuSignRec.dsfs__Contact__c = ABCMap.get(docuSignStatus.ABC_Object__c);

docuSignReclstToUpdate.add(docuSignRec);

}

}

}

if (docuSignReclstToUpdate.size() > 0)

{

database.update(docuSignReclstToUpdate, false);

}

[/sourcecode]

 

UPDATING SALESFORCE DATA

Now that you have connected a custom object to the DocuSign for Salesforce. Any workflow as mentioned above on this connected custom object, when triggered, sends the envelopes to the recipient. You can track the status of the envelopes from the DocuSign tab also. All Good! Now, what if, once the recipient completes signing the document enclosed in the envelope, you need to reflect that on this custom object record? Is that possible? Yes, it is.

One of the significant features of DocuSign is that it enables updating relevant data in your Salesforce account automatically with signed documents and collected data.

DocuSign Recipient Status object maintains a Master-Detail relationship with Status object (dsfs__Parent_Status_Record__c). Envelopes have statuses and so do Recipients. For example, an envelope has two recipients, the first has signed the document, but the second recipient has declined to sign. In this case the first recipient’s status would be signed, the second recipient’s status would be declined, and the envelope’s status is declined (since one recipient has declined).

So, to update the Salesforce record, based on a recipient’s response, you may write a trigger on the DocuSign Recipient Status object as follows. (Keep in mind to populate dsfs_Contact in this DocuSign Recipient Status object also (same as how we did for DocuSign Status object)).

[sourcecode language=”java”]

Set docuSignRecStatusId = new Set ();

Map brokerA ABCRecMap = new map ();

for(dsfs__DocuSign_Recipient_Status__c docuRec: docuSignRecStatuslst)

{

docuSignRecStatusId.add(docuRec.Id);

}

list docuSignRecStatusRecords = [Select Id, dsfs__Date_Signed__c, dsfs__Recipient_Status__c, dsfs__Contact__c, dsfs__Parent_Status_Record__r.ABC_Object__c from dsfs__DocuSign_Recipient_Status__c where Id =: docuSignRecStatusId ];

for(dsfs__DocuSign_Recipient_Status__c docuRec: docuSignRecStatusRecords)

{

if (docuRec.dsfs__Recipient_Status__c == ‘Completed’ && docuRec.dsfs__Recipient_Status__c! = oldTrigger.get(docuRec.Id).dsfs__Recipient_Status__c && docuRec.dsfs__Contact__c! = null)

{

if (docuRec.dsfs__Parent_Status_Record__r.ABC_Object__c!= null)

{

ABCRecMap.put(docuRec.dsfs__Parent_Status_Record__r.ABC_Object__c, docuRec);

}

}

}

if (ABCRecMap.keySet().size() > 0)

{

list updatelist = new list ();

list abclist = [Select Id, Status__c from ABC_Object__c where

Id =: ABCRecMap.keySet()];

for (ABC_Object__c ab: abclist)

{

ab.Status__c = ‘Agreement signed’;

updatelist.add(ab);

}

if (updatelist.size() > 0)

{

database.update(updatelist, false);

}

[/sourcecode]

 

In the code above, we check if the Recipient Status is set to ‘Completed’ by DocuSign, i.e., if the recipient has signed the document, and updates the status field in the related ABC_Object record.

Thus the Conga Composer-DocuSign integrated with the outbound message, enables you to send documents that carry the concerned Salesforce record data that is relevant to the recipient thus providing a personalised experience, accept the input from the recipient electronically and helps track the information thus making the entire process simple, effortless and user friendly.

 

84
Like this post
3 Posts
sebanasir94

Search Posts

Archives

Categories

Recent posts

BioAsia 2023 in Hyderabad: An Annual International Event

BioAsia 2023 in Hyderabad: An Annual International Event

The Role Of Marketing in Small & Medium Enterprises

The Role Of Marketing in Small & Medium Enterprises

Salesforce For Retail: How Salesforce CRM Can Help Retailers

Salesforce For Retail: How Salesforce CRM Can Help Retailers

What is ChatGPT & How Does It Work?

What is ChatGPT & How Does It Work?

What Is Graphic Design? (Executive Summary 2023)

What Is Graphic Design? (Executive Summary 2023)

  • Previous PostHighlights From Spring '18 Release
  • Next PostEinstein Intent Analysis Using Einstein Language on Salesforce Chatter

Related Posts

Salesforce For Retail: How Salesforce CRM Can Help Retailers
Salesforce

Salesforce For Retail: How Salesforce CRM Can Help Retailers

Introduction To Copado Devops Tool
Salesforce

Introduction To Copado Devops Tool

What is Salesforce Code Builder?
Salesforce

What is Salesforce Code Builder?

Automation in Healthcare And Its Benefits
Health Cloud Salesforce

Automation in Healthcare And Its Benefits

2 Comments

  1. skhilauria1988
    Reply
    21 February 2018

    Amazing Work Seba ! Nice write up!

    Reply
    • sebanasir94
      Reply
      22 February 2018

      Thank you Shubham!

      Reply

Leave a Reply (Cancel reply)

Your email address will not be published. Required fields are marked *

*
*

ABSYZ Logo

INDIA | USA | UAE

  • About us
  • Article & Blogs
  • Careers
  • Get In Touch
  • Our Expertise
  • Our Approach
  • Products
  • Industries
  • Clients
  • White Papers

Copyright ©2022 Absyz Inc. All Rights Reserved.

youngsoft
Copy
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “ACCEPT ALL”, you consent to the use of ALL the cookies. However, you may visit "Cookie Settings" to provide a controlled consent. Privacy Policy
Cookie SettingsREJECT ALLACCEPT ALL
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled

Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.

CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.

Functional

Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.

Performance

Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.

Analytics

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.

Advertisement

Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.

Others

Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.

SAVE & ACCEPT