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
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,23 +3,23 @@
3
3
### Github repo: MyConnectWebhookSampleApp
4
4
5
5
## Introduction
6
-
MyConnectWebhook is a DocuSign sample application written in Ruby on Rails (server) and React (client). You can find a live instance running at [https://myconnectwebhook.sampleapps.docusign.com/](https://myconnectwebhook.sampleapps.docusign.com/).
6
+
MyConnectWebhook is a Docusign sample application written in Ruby on Rails (server) and React (client). You can find a live instance running at [https://myconnectwebhook.sampleapps.docusign.com/](https://myconnectwebhook.sampleapps.docusign.com/).
7
7
8
8
MyConnectWebhook demonstrates the following:
9
9
10
-
1.**Authentication** with DocuSign via [JSON Web Token (JWT) Grant](https://developers.docusign.com/esign-rest-api/guides/authentication/oauth2-jsonwebtoken).
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/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.
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
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.
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
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 [create an envelope](https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopes/create/). The example sends an envelope based on PDF template.
17
+
This example uses the Docusign[eSignature REST API](https://developers.docusign.com/docs/esign-rest-api/), demonstrating how to [create 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
21
-
* A DocuSign developer account. Create a [free account](https://go.docusign.com/o/sandbox/).
22
-
* A DocuSign integration key (client ID) that is configured to use JSON Web Token (JWT) Grant.
21
+
* A Docusign developer account. Create a [free account](https://go.docusign.com/o/sandbox/).
22
+
* A Docusign integration key (client ID) that is configured to use JSON Web Token (JWT) Grant.
23
23
You will need the **integration key** itself and its **RSA key pair**. Copy your **RSA key pair** into a file in your config folder `config/docusign_private_key.txt`. You must also add your application's **Redirect URI** to your integration key. To run the app locally, this should be `http://localhost:3000/auth/docusign/callback`. This [**video**](https://www.youtube.com/watch?v=GgDqa7-L0yo) demonstrates how to create an integration key (client ID) for a user application like this example.
### Setup your custom DocuSign Connect configuration
73
+
### Setup your custom Docusign Connect configuration
74
74
75
75
#### Using a ruby script
76
76
The ruby script included with this project sets up a custom Connect configuration with the same settings that the hosted app uses at https://myconnectwebhook.sampleapps.docusign.com. You'll need to provide a name for your new custom connect configuration as well as the URL to publish which, if running locally using ngrok, should follow the format `https://{YOUR_NGROK_HOST}.ngrok.io/api/docusign/trigger/do_process.json`.
@@ -86,7 +86,7 @@ The ruby script included with this project sets up a custom Connect configuratio
86
86
* Provide the name and URL to publish for your connect configuration when prompted.
87
87
* Check https://admindemo.docusign.com/connect to view or edit your new custom Connect configuration!
<metaproperty="og:description" content="Discover how the DocuSign Connect webhook service can help you monitor and automate your business processes through real-time updates when specific events are triggered in your workflows." />
<metaproperty="og:description" content="Discover how the Docusign Connect webhook service can help you monitor and automate your business processes through real-time updates when specific events are triggered in your workflows." />
Copy file name to clipboardExpand all lines: public/locales/en/AutomatedWorkflow.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
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>",
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,7 +9,7 @@
9
9
},
10
10
"ApiDecription": {
11
11
"SeeMore": "Behind the scenes",
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>View source file <a target='_blank' rel='noopener noreferrer' href='https://github.com/docusign/sample-app-myconnectwebhook-ruby/blob/main/app/controllers/api/docusign/trigger_controller.rb#L35'>trigger_controller.rb</a> on GitHub.</p><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>"
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>View source file <a target='_blank' rel='noopener noreferrer' href='https://github.com/docusign/sample-app-myconnectwebhook-ruby/blob/main/app/controllers/api/docusign/trigger_controller.rb#L35'>trigger_controller.rb</a> on GitHub.</p><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>"
0 commit comments