Before going into Electronic Contract Signing, I would like to give an example of manual contract signing. In most cases an employee is being asked to sign a bond. This is an agreement, when an employee leaves an organization within a period of time, that he needs to pay back an amount of money (loan). In these kind of cases HR just sends you an email and asks you to print it out, sign it with a pen and send the scanned copy back.
Now think about if you would get the contract after joining the organization and you just need to sign it with your touchscreen smart phone. You eliminate the print out part and the need to return the scanned copy. After joining the organization, SuccesFactors will send the contract automatically and you just need to open it in your mobile, sign it digitally and submit it.
BestRun is a software company, who runs their whole HR in SAP SuccessFactors. They recently hired couple of engineers, who will work on Machine Learning Projects. As Machine Learning is currently a very demanding skill, BestRun company also has to make sure, that the investment they are making on the employees is for the long term The best way to do this is to insure this via bonds. Next to this the company BestRun also has taken the initiative to Go Paperless and they prefer to digitze their current manual processes.
This is where Docusign comes into the picture, This is a cloud based solution, which allows organizations to manage electronic agreements. As part of the DocuSign Agreement Cloud, DocuSign offers eSignatures, which is a way to sign electronically on different devices. Integrating this with an HR solution, like SAP SuccesFactors, closes the loop.
In this architecture we are using the 'Integration Center' extension, which is available in SAP SuccessFactors Employee Central (SFEC). Whenever a new employee is onboarded, the Integration Center is going to pass the data to a Node.js application. This application is being deployed in SAP Cloud Platform (Cloud Foundry), which will check is the contract has been submitted earlier, by making an API Call to the SAP Cloud Platform Backend Service. If there is no entry found, it will call the DocuSign open connector API to send the contract. Once the API Call is retrieving a successful response, it will automatically create an entry in the SAP Cloud Platform Backend Service.
Step 1: Design the contract in DocuSign
Step 2: Create an API key in DocuSign
Step 3: Create DocuSign Open Connector Instance
Step 4: Create OData service using CDS model and Cloud Platform Backend Service.
Step 5: Create an XSUAA instance for Calling Backend Service API from the Node.js application.
Step 6: Developing and Deploying the Node.js Aapplication in Cloud Foundry which will handle the logic for sending the Contract to the Employee.
Step 7: Configure a Destination in Integration Center, which will call the Node.js application and pass the recent change employee Data.
Step 8: Test the whole scenario.
Lets complete each step
Even before getting into DocuSign you have to design the contract in Word or PDF with a blank signature, date and parties, so that you can integrate DocuSign fields correctly. Please find the sample PDF contract here. Your sample PDF Contract is looking like this.
Now you can register into DocuSign Sand Box Account.
After Registering login to DocuSign and create new Template
It should look like below
Scroll down and fill the email subject and signer details(without this we will not able to design the template). After filling all the highlighted info click on next:
Now we need to drag and drop all the required Fields from the left side to the PDF. In this case: Name, Date Signed and Signature is required.
If everything goes well, you will have have template ready like below.
Now click on the template and note down the template ID, which will be required later.
Now we need to create an API key to create instance in open Connector, so to do that go to account -> Admin
Click on Integration – > API and keys
Add Integration Key, And keep this Key for creating open connector Instance.
Login SAP Cloud Platform and provision the Open Connector Instance. Now search Docusign in the Connector and click on Authenticate.
Now fill the details, in this case we are using a demo environment. oAuth API key is nothing but an integration API key, which we have created in the last step. Username and Password is nothing but your DocuSign login credential.
Once you successfully created the Instance, you are able to play with all the API's in the API Docs like below.
This Envelopes API is normally being used for sending the Contract.
We need some storage to store the data of all users, who already got the contract. In this way if someone is trying to change something within SFEC Integration Center, it will not send the contract again. The easiest way to do this is using SAP Cloud Platform, Cloud Foundry Backend Service. Using the CDS model, we will create the OData service, which will be used for storing user data and checking if the user already has a contract or not.
In order to use the SAP Cloud Platform Backend Service, we need to subscribe in the Backend Service (Subscription).
Now Create the CDS Model File (docusign.cds), remember file extension should be .cds
Click on Create API
Upload the CDS file and fill all the information requested and click on create API button to create the OData service.
Initially it will be in pending status ,then it will change to active.
Click on this API and explore the swagger API. If you want to use V2 OData you can also check V2.
We can’t directly call the Backend service API from outside. We first need to create an XSUAA Instance
and configure the XSUAA with the Backend Service.
On successful deployment you will be able to see the application running on SAP Cloud Platform Cloud Foundry like below
Login to SuccessFactors Employee Central and navigate to Integration center
Click on My Integration then create – > More Integration Types
Select Destination Type Rest, source type SuccessFactors
Select Destination Type Rest, source type SuccessFactors
Give meaningful Integration name and Description in my case i have given Docusign
Choose user entity and select the fields you want to pass
Select the filter, here we have selected time-based filter
Now this is the main part, configure the rest API URL, Select Method type POST
Below the final configuration.
Interested in moving towards the New Intelligent Enterprise with Digital Signature Management in your Organization?
Please contact me on: