Skip to content

Commit 92f5106

Browse files
authored
Updating the language from "Clickwrap" to "Elastic Template" (#10)
* Updating the language from "Clickwrap" to "Elastic Template"
1 parent 8074c61 commit 92f5106

File tree

5 files changed

+36
-32
lines changed

5 files changed

+36
-32
lines changed

README.md

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ MyConnectWebhook is a DocuSign sample application written in Ruby on Rails (serv
88
MyConnectWebhook demonstrates the following:
99

1010
1. **Authentication** with DocuSign via [JSON Web Token (JWT) Grant](https://developers.docusign.com/esign-rest-api/guides/authentication/oauth2-jsonwebtoken).
11-
2. **Bulk Sending Multiple Envelopes:** ([Source](./app/services/e_sign/bulk_sending_envelopes_service.rb))
12-
This example uses the DocuSign [eSignature REST API](https://developers.docusign.com/esign-rest-api) to [Bulk Send](https://developers.docusign.com/docs/esign-rest-api/reference/bulkenvelopes/bulksend/) multiple envelopes based on PDF document template, and filling data dynamically.
13-
3. **Tracking User Signing Progress with Docusign Connect feature.** After the request has been sent to Docusign, the app awaits for webhook requests from [Docusign Connect](https://developers.docusign.com/platform/webhooks/connect/) and displays the result on UI.
14-
4. **Signing Clickwrap Document:** ([Source](./app/javascript/src/pages/automatedWorkflow/index.js))
15-
This example demonstates signing process of DocuSign [Clickwrap](https://developers.docusign.com/docs/click-api/how-to/create-clickwraps/) document.
16-
5. **Sending out Confirmation Envelope after Successful Clickwrap Signature:** ([Source](./app/services/e_sign/send_envelope_service.rb))
17-
This example uses the DocuSign [eSignature REST API](https://developers.docusign.com/esign-rest-api), demonstrating how to [crete an envelope](https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopes/create/). The example sends an envelope based on PDF template.
11+
2. **Bulk sending multiple envelopes:** ([Source](./app/services/e_sign/bulk_sending_envelopes_service.rb))
12+
This example uses the DocuSign [eSignature REST API](https://developers.docusign.com/docs/esign-rest-api/) to [Bulk Send](https://developers.docusign.com/docs/esign-rest-api/reference/bulkenvelopes/bulksend/) multiple envelopes based on PDF document template, and filling data dynamically.
13+
3. **Tracking user signing progress with the Docusign Connect webhook service.** After the request has been sent to Docusign, the app awaits for webhook requests from [Docusign Connect](https://developers.docusign.com/platform/webhooks/connect/) and displays the result on UI.
14+
4. **Elastic signing:** ([Source](./app/javascript/src/pages/automatedWorkflow/index.js))
15+
This example demonstates signing process of a DocuSign [elastic template](https://developers.docusign.com/docs/click-api/how-to/create-elastic-templates/) document.
16+
5. **Sending out a confirmation envelope after a successful elastic signature:** ([Source](./app/services/e_sign/send_envelope_service.rb))
17+
This example uses the DocuSign [eSignature REST API](https://developers.docusign.com/docs/esign-rest-api/), demonstrating how to [crete an envelope](https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopes/create/). The example sends an envelope based on PDF template.
1818

1919
## Prerequisites
2020

@@ -52,34 +52,38 @@ The ruby script included with this project sets up a custom Connect configuratio
5252
* Check https://admindemo.docusign.com/connect to view or edit your new custom Connect configuration!
5353

5454
### Using the DocuSign UI
55-
* Visit https://admindemo.docusign.com/connect
55+
* Visit https://admindemo.docusign.com/authenticate?goTo=connect
5656
* Select "ADD CONFIGURATION" --> "Custom"
5757
* Add a name for your custom Connect configuration
5858
* In the `URL to Publish` field enter `https://{YOUR_NGROK_HOST}.ngrok.io/api/docusign/trigger/do_process.json`. This will allow Connect to send request to your local environment.
5959
* subscribe to the events you wish your app to receive notifications for. Events for this app include
6060

61-
Envelope and Recipients:
62-
* Envelope Sent
63-
* Envelope Delivered
64-
* Recipient Auto Responded
65-
* Recipient Signed/Completed
66-
* Recipient Declined
67-
* Recipient Finish Later
61+
Envelope and Recipients:
6862

69-
Include Data:
70-
* Custom Fields
71-
* Recipients
63+
Envelope Sent
64+
Envelope Delivered
65+
Recipient Auto Responded
66+
Recipient Signed/Completed
67+
Recipient Declined
68+
Recipient Finish Later
69+
70+
71+
Include Data:
72+
Custom Fields
73+
Recipients
74+
75+
DocuSign Click:
76+
77+
Click Agreed
78+
Click Declined
7279

73-
DocuSign Click:
74-
* Click Agreed
75-
* Click Declined
7680

7781
* Select "Enable Mutual TLS"
7882
* "SAVE CONFIGURATION"
7983

8084
## Installation steps
8185

82-
**NOTE:** The first time you run the app with a new client id, you must grant consent for the application to perform actions on behalf of the user. Fill in your integration key and redirect url to the following consent url template and visit https://account-d.docusign.com/oauth/auth?response_type=code&scope=signature+impersonation+click.manage+click.send&client_id=#{jwt_integration_key}&redirect_uri=#{redirect_uri} to grant consent.
86+
**NOTE:** The first time you run the app with a new client id, you must grant consent for the application to perform actions on behalf of the user. Fill in your integration key and redirect url to the following consent url template and visit `https://account-d.docusign.com/oauth/auth?response_type=code&scope=signature+impersonation+click.manage+click.send&client_id=#{jwt_integration_key}&redirect_uri=#{redirect_uri}` to grant consent.
8387

8488
### Running app using docker compose
8589
To build app:

app/models/clickwrap.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# frozen_string_literal: true
22

3-
# class for handling Clickwraps
3+
# class for handling elastic templates
44
class Clickwrap < ApplicationRecord
55
belongs_to :user
66

config/routes.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@
3939

4040
resources :clickwrap, only: [], constraints: only_json do
4141
collection do
42-
# init params for FE, to send out Clickwrap
42+
# init params for FE, to send out elastic template
4343
get :init_params
44-
# store data about sent Clickwrap
44+
# store data about sent elastic signing agreements
4545
post :store_data
4646
end
4747
end
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"Title": "Automate workflow based on Clickwrap agreement",
3-
"SubTitle": "<p>Demonstrates how to use the DocuSign Connect webhook service to automate business processes based on a sample purchase license clickwrap. Once the user takes action on the clickwrap, the app will wait for a Connect notification before sending a sample purchase confirmation to the user’s provided email.</p> Please provide your name and email address to get started.</p>",
2+
"Title": "Automate workflow based on an elastic signing agreement",
3+
"SubTitle": "<p>Demonstrates how to use the DocuSign Connect webhook service to automate business processes based on a sample purchase license elastic template. Once the user takes action on the elastic template, the app will wait for a Connect notification before sending a sample purchase confirmation to the user’s provided email.</p> Please provide your name and email address to get started.</p>",
44
"SubmitButton": "Submit",
55
"AddRecipientButton": "Add recipient",
66
"Recipient": {
@@ -9,15 +9,15 @@
99
},
1010
"ApiDecription": {
1111
"SeeMore": "Behind the scenes",
12-
"CodeFlow": "<h3>This sample features:</h3><ul><li>Create and activate a clickwrap</li><li>Embed a clickwrap on your site</li><li>DocuSign Connect webhook service</li><li>Remote signing</li></ul><h3>Code flow:</h3><p>View source file <a target='_blank' rel='noopener noreferrer' href='https://github.com/docusign/sample-app-myconnectwebhook-ruby/blob/main/app/services/clickwraps/clickwrap_service.rb'>clickwrap_service.rb</a> on GitHub.</p><h5>Step 1</h5><p>Once recipient information is submitted by the user, the Click API is used to create a new clickwrap if it doesn’t already exist in the account. To create a clickwrap, we must provide a document for the user to read and agree to, a name for the clickwrap, and we must define <code>display_settings</code> to control what the UI experience will look like. The clickwrap is created using <a target='_blank' rel='noopener noreferrer' href='https://developers.docusign.com/docs/click-api/reference/accounts/clickwraps/createclickwrap/'>ClickWraps:createClickwrap</a>. Then we must activate the clickwrap before use with <a target='_blank' rel='noopener noreferrer' href='https://developers.docusign.com/docs/click-api/reference/accounts/clickwraps/updateclickwrapversion/'>ClickWraps:updateClickwrapVersion</a> by updating the clickwrap and setting the status to <code>active</code>.</p><h5>Step 2</h5><p>Using the ID of the clickwrap created in the previous step, we display the clickwrap using a JavaScript API call to the <code>docuSignClick.Clickwrap.render()</code> method. Required arguments include <code>clickwrap_environment</code>, which is <code>https://demo.docusign.net</code> for the development environment; <code>clickwrap_account_id</code>, which is the account ID for the preconfigured DocuSign developer account; <code>clickwrap_id</code>, which we obtain in the previous step; and <code>client_user_id</code>, which is created in the app session. To make this client-side API call, the code needs to include https://demo.docusign.net/clickapi/sdk/latest/docusign-click.js on the page as a script element.</p><h5>Step 3</h5><p>Once the user accepts or declines the clickwrap, we wait for a DocuSign Connect notification to tell us what action was taken. If we receive a <code>click-agreed</code> notification, we can start the next step of the example workflow, otherwise the workflow ends at this step. The screenshot below shows the events to which we subscribe in our custom Connect configuration in the preconfigured account.</p> <p><img width='600px' src='/images/click_connect_config.png' alt='click connect configuration' /></p><h5>Step 4</h5><p>View source code <a target='_blank' rel='noopener noreferrer' href='https://github.com/docusign/sample-app-myconnectwebhook-ruby/blob/main/app/services/e_sign/send_envelope_service.rb'>send_envelope_service.rb</a> on GitHub.</p> <p>After receiving the <code>click-agreed</code> notification, we use the DocuSign eSignature REST API to create an envelope with <a target='_blank' rel='noopener noreferrer' href='https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopes/create/'>Envelopes:create</a>. In the envelope definition, we include a recipient with the information submitted by the user, a sample purchase confirmation document, and tabs. We set the envelope definition status to <code>sent</code> so that the envelope is sent immediately when we make our API call.</p>"
12+
"CodeFlow": "<h3>This sample features:</h3><ul><li>Create and activate an elastic template</li><li>Embed an elastic template on your site</li><li>DocuSign Connect webhook service</li><li>Remote signing</li></ul><h3>Code flow:</h3><p>View source file <a target='_blank' rel='noopener noreferrer' href='https://github.com/docusign/sample-app-myconnectwebhook-ruby/blob/main/app/services/clickwraps/clickwrap_service.rb'>clickwrap_service.rb</a> on GitHub.</p><h5>Step 1</h5><p>Once recipient information is submitted by the user, the Click API is used to create a new elastic template if it doesn’t already exist in the account. To create an elastic template, we must provide a document for the user to read and agree to, a name for the elastic template, and we must define <code>display_settings</code> to control what the UI experience will look like. The elastic template is created using <a target='_blank' rel='noopener noreferrer' href='https://developers.docusign.com/docs/click-api/reference/accounts/clickwraps/createclickwrap/'>ClickWraps:createClickwrap</a>. Then we must activate the elastic template before use with <a target='_blank' rel='noopener noreferrer' href='https://developers.docusign.com/docs/click-api/reference/accounts/clickwraps/updateclickwrapversion/'>ClickWraps:updateClickwrapVersion</a> by updating the elastic template and setting the status to <code>active</code>.</p><h5>Step 2</h5><p>Using the ID of the elastic template created in the previous step, we display the elastic template using a JavaScript API call to the <code>docuSignClick.Clickwrap.render()</code> method. Required arguments include <code>clickwrap_environment</code>, which is <code>https://demo.docusign.net</code> for the development environment; <code>clickwrap_account_id</code>, which is the account ID for the preconfigured DocuSign developer account; <code>clickwrap_id</code>, which we obtain in the previous step; and <code>client_user_id</code>, which is created in the app session. To make this client-side API call, the code needs to include https://demo.docusign.net/clickapi/sdk/latest/docusign-click.js on the page as a script element.</p><h5>Step 3</h5><p>Once the user accepts or declines the elastic signing agreement, we wait for a DocuSign Connect notification to tell us what action was taken. If we receive a <code>click-agreed</code> notification, we can start the next step of the example workflow, otherwise the workflow ends at this step. The screenshot below shows the events to which we subscribe in our custom Connect configuration in the preconfigured account.</p> <p><img width='600px' src='/images/click_connect_config.png' alt='click connect configuration' /></p><h5>Step 4</h5><p>View source code <a target='_blank' rel='noopener noreferrer' href='https://github.com/docusign/sample-app-myconnectwebhook-ruby/blob/main/app/services/e_sign/send_envelope_service.rb'>send_envelope_service.rb</a> on GitHub.</p> <p>After receiving the <code>click-agreed</code> notification, we use the DocuSign eSignature REST API to create an envelope with <a target='_blank' rel='noopener noreferrer' href='https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopes/create/'>Envelopes:create</a>. In the envelope definition, we include a recipient with the information submitted by the user, a sample purchase confirmation document, and tabs. We set the envelope definition status to <code>sent</code> so that the envelope is sent immediately when we make our API call.</p>"
1313
},
1414
"Error": {
1515
"FullNameIsRequired": "Full name is required",
1616
"EmailIsRequired": "Email is required",
1717
"EmailFormatIsWrong": "Email format is wrong"
1818
},
1919
"ConfirmationComplete": {
20-
"Title": "Clickwrap complete!",
20+
"Title": "Elastic signing agreement complete!",
2121
"SubTitle": "<p>You have completed the agreement.</p><p>If you have accepted the sample purchase license agreement, check your email to see a sample purchase confirmation.<p>"
2222
}
2323
}

public/locales/en/Home.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
"Button": "Get Started"
1313
},
1414
"Card2": {
15-
"Title": "Automate workflow based on a clickwrap agreement",
16-
"Description": "Example: Trigger a business workflow based on Connect notifications from a clickwrap agreement.",
17-
"Features": "<h4 class='h4 card-info-list-title'>DocuSign Features</h4><ul class='custom-list'><li>Create and activate a clickwrap</li><li>Embed a clickwrap on your site</li><li>DocuSign Connect webhook service</li><li>Remote signing</li></ul>",
15+
"Title": "Automate workflow based on an elastic signing agreement",
16+
"Description": "Example: Trigger a business workflow based on Connect notifications from an elastic template.",
17+
"Features": "<h4 class='h4 card-info-list-title'>DocuSign Features</h4><ul class='custom-list'><li>Create and activate an elastic template</li><li>Embed an elastic template on your site</li><li>DocuSign Connect webhook service</li><li>Remote signing</li></ul>",
1818
"Button": "Get Started"
1919
},
2020
"Resources": {

0 commit comments

Comments
 (0)