You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+26-22Lines changed: 26 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,13 +8,13 @@ MyConnectWebhook is a DocuSign sample application written in Ruby on Rails (serv
8
8
MyConnectWebhook demonstrates the following:
9
9
10
10
1.**Authentication** with DocuSign via [JSON Web Token (JWT) Grant](https://developers.docusign.com/esign-rest-api/guides/authentication/oauth2-jsonwebtoken).
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.
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.
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.
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.
18
18
19
19
## Prerequisites
20
20
@@ -52,34 +52,38 @@ The ruby script included with this project sets up a custom Connect configuratio
52
52
* Check https://admindemo.docusign.com/connect to view or edit your new custom Connect configuration!
* Add a name for your custom Connect configuration
58
58
* 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.
59
59
* subscribe to the events you wish your app to receive notifications for. Events for this app include
60
60
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:
68
62
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
72
79
73
-
DocuSign Click:
74
-
* Click Agreed
75
-
* Click Declined
76
80
77
81
* Select "Enable Mutual TLS"
78
82
* "SAVE CONFIGURATION"
79
83
80
84
## Installation steps
81
85
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.
"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>",
4
4
"SubmitButton": "Submit",
5
5
"AddRecipientButton": "Add recipient",
6
6
"Recipient": {
@@ -9,15 +9,15 @@
9
9
},
10
10
"ApiDecription": {
11
11
"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>"
13
13
},
14
14
"Error": {
15
15
"FullNameIsRequired": "Full name is required",
16
16
"EmailIsRequired": "Email is required",
17
17
"EmailFormatIsWrong": "Email format is wrong"
18
18
},
19
19
"ConfirmationComplete": {
20
-
"Title": "Clickwrap complete!",
20
+
"Title": "Elastic signing agreement complete!",
21
21
"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>"
Copy file name to clipboardExpand all lines: public/locales/en/Home.json
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -12,9 +12,9 @@
12
12
"Button": "Get Started"
13
13
},
14
14
"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>",
0 commit comments