Skip to content

Commit 9b3dfe7

Browse files
add trigger controller source code link to behind the scenes
1 parent 896c97b commit 9b3dfe7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

public/locales/en/AutomatedWorkflow.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
},
1010
"ApiDecription": {
1111
"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>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>"
1313
},
1414
"Error": {
1515
"FullNameIsRequired": "Full name is required",

public/locales/en/MonitorEnvelopeStatus.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
},
2121
"ApiDecription": {
2222
"SeeMore": "Behind the scenes",
23-
"CodeFlow": "<h3>This sample features:</h3><ul><li>Anchor tagging</li><li>Custom fields</li><li>Bulk send</li><li>DocuSign Connect webhook service</li></ul><h3>Code flow:</h3><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/bulk_sending_envelopes_service.rb'>bulk_sending_envelopes_service.rb</a> on GitHub.</p><h5>Step 1</h5><p>Once recipient information is submitted by the user, the bulk send request is prepared. First, an envelope definition is created with a recipient, a document, and tabs. The recipient defined in the envelope definition uses placeholder dummy values–the actual recipient will be updated in the next step to use user input. The envelope document is a sample activity waiver form that the app provides and tabs are placed on that document using <a target='_blank' rel='noopener noreferrer' href='https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/tabs/auto-place/'>anchor tagging</a>. The <code>status</code> field on the envelope definition is set to <code>created</code> so that when we call <a target='_blank' rel='noopener noreferrer' href='https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopes/create/'>Envelopes:create</a>, the envelope is created but not yet sent.</p><h5>Step 2</h5><p>User input is used to create a bulk send recipients list using <a target='_blank' rel='noopener noreferrer' href='https://developers.docusign.com/docs/esign-rest-api/reference/bulkenvelopes/bulksend/createbulksendlist/'>BulkSend:createBulkSendList</a>. Once the bulk send list is created, we attach its ID to the envelope created in the previous step as a custom field using <a target='_blank' rel='noopener noreferrer' href='https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopecustomfields/create/'>EnvelopeCustomFields:create</a>. We add this custom field so that when we receive DocuSign Connect notifications on the envelope status in the next step, we can match the notification to the correct bulk send request. Then we can use the envelope ID from the previous step and the ID from the bulk send list we just created to create the bulk send request using <a target='_blank' rel='noopener noreferrer' href='https://developers.docusign.com/docs/esign-rest-api/reference/bulkenvelopes/bulksend/createbulksendrequest/'>BulkSend:createBulkSendRequest</a>. This method replaces the recipient placeholder values in the envelope definition with the recipient information in the bulk send list and sends the envelope to each recipient.</p><h5>Step 3</h5><p>Once the bulk send process is complete, we wait for the DocuSign Connect webhook service to send notifications of envelope status changes. The following screenshot displays the events to which we have subscribed with our custom Connect configuration in our preconfigured developer account, as well as the data that is included with each Connect notification. As the app receives Connect notifications, they are displayed to the user in real time.</p><p>More possible webhook event triggers: <ul><li><code>recipient-autoresponded</code>: Sent when DocuSign gets notification that an email delivery has failed. The delivery failure could be for a number of reasons, such as a bad email address or that the recipient’s email system auto-responds to the email from DocuSign.</li><li><code>recipient-declined</code>: Sent when the recipient declines to sign the document in the envelope.</li><li><code>recipient-finish-later</code>: Sent when the recipient selects “Finish Later” on an envelope within the DocuSign signing website.</li></ul></p></p><p>See the <a target='_blank' rel='noopener noreferrer' href='https://developers.docusign.com/platform/webhooks/connect/event-triggers/'>full list of webhook event triggers</a> with the <a target='_blank' rel='noopener noreferrer' href='https://developers.docusign.com/platform/webhooks/connect/'>DocuSign Connect</a> webhook service.</p><p><img width='600px' src='/images/envelopes_connect_config.png' alt='Envelope Connect config' /></p>"
23+
"CodeFlow": "<h3>This sample features:</h3><ul><li>Anchor tagging</li><li>Custom fields</li><li>Bulk send</li><li>DocuSign Connect webhook service</li></ul><h3>Code flow:</h3><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/bulk_sending_envelopes_service.rb'>bulk_sending_envelopes_service.rb</a> on GitHub.</p><h5>Step 1</h5><p>Once recipient information is submitted by the user, the bulk send request is prepared. First, an envelope definition is created with a recipient, a document, and tabs. The recipient defined in the envelope definition uses placeholder dummy values–the actual recipient will be updated in the next step to use user input. The envelope document is a sample activity waiver form that the app provides and tabs are placed on that document using <a target='_blank' rel='noopener noreferrer' href='https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/tabs/auto-place/'>anchor tagging</a>. The <code>status</code> field on the envelope definition is set to <code>created</code> so that when we call <a target='_blank' rel='noopener noreferrer' href='https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopes/create/'>Envelopes:create</a>, the envelope is created but not yet sent.</p><h5>Step 2</h5><p>User input is used to create a bulk send recipients list using <a target='_blank' rel='noopener noreferrer' href='https://developers.docusign.com/docs/esign-rest-api/reference/bulkenvelopes/bulksend/createbulksendlist/'>BulkSend:createBulkSendList</a>. Once the bulk send list is created, we attach its ID to the envelope created in the previous step as a custom field using <a target='_blank' rel='noopener noreferrer' href='https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopecustomfields/create/'>EnvelopeCustomFields:create</a>. We add this custom field so that when we receive DocuSign Connect notifications on the envelope status in the next step, we can match the notification to the correct bulk send request. Then we can use the envelope ID from the previous step and the ID from the bulk send list we just created to create the bulk send request using <a target='_blank' rel='noopener noreferrer' href='https://developers.docusign.com/docs/esign-rest-api/reference/bulkenvelopes/bulksend/createbulksendrequest/'>BulkSend:createBulkSendRequest</a>. This method replaces the recipient placeholder values in the envelope definition with the recipient information in the bulk send list and sends the envelope to each recipient.</p><h5>Step 3</h5><p>View source code <a target='_blank' rel='noopener noreferrer' href='https://github.com/docusign/sample-app-myconnectwebhook-ruby/blob/main/app/controllers/api/docusign/trigger_controller.rb#L59'>trigger_controller.rb</a> on GitHub.</p><p>Once the bulk send process is complete, we wait for the DocuSign Connect webhook service to send notifications of envelope status changes. The following screenshot displays the events to which we have subscribed with our custom Connect configuration in our preconfigured developer account, as well as the data that is included with each Connect notification. As the app receives Connect notifications, they are displayed to the user in real time.</p><p>More possible webhook event triggers: <ul><li><code>recipient-autoresponded</code>: Sent when DocuSign gets notification that an email delivery has failed. The delivery failure could be for a number of reasons, such as a bad email address or that the recipient’s email system auto-responds to the email from DocuSign.</li><li><code>recipient-declined</code>: Sent when the recipient declines to sign the document in the envelope.</li><li><code>recipient-finish-later</code>: Sent when the recipient selects “Finish Later” on an envelope within the DocuSign signing website.</li></ul></p></p><p>See the <a target='_blank' rel='noopener noreferrer' href='https://developers.docusign.com/platform/webhooks/connect/event-triggers/'>full list of webhook event triggers</a> with the <a target='_blank' rel='noopener noreferrer' href='https://developers.docusign.com/platform/webhooks/connect/'>DocuSign Connect</a> webhook service.</p><p><img width='600px' src='/images/envelopes_connect_config.png' alt='Envelope Connect config' /></p>"
2424
},
2525
"Error": {
2626
"FullNameIsRequired": "Full name is required",

0 commit comments

Comments
 (0)