0

We are using DocuSign Toolkit to generate a DocuSign envelope and getting the URL for that envelope id. Can you please suggest which one I can use for my application. which event we can capture for FINISH button click.

I am using embed tag to show the DocuSign URL page. I am using nodejs.

  • you can create an iframe that's the entire screen and have the DocuSign URL in an iframe. That works for standalone app. Not sure if you're using Apex that is inside Salesforce? – Inbar Gazit Apr 28 '21 at 18:11

1 Answers1

0

Here is an example of an app that is doing this - https://mysure.sampleapps.docusign.com/ It's using an iframe. If this works for you - you can use the code from GitHub, but seems like you're 90% there already - you just need a full screen iframe where the URL is hosted...

Inbar Gazit
  • 12,566
  • 1
  • 16
  • 23
  • Thanks and appreciate your help. Look like your solution is in phython. So can you please just let me know how you capture the FINISH event in that application. – Madhav Joshi Apr 28 '21 at 21:49
  • If you are using embedded signing, you use a redirectURL that DocuSign will redirect the browser when the user finished signing. This is one way to capture the "finish" event. It's a client-side approach so it's not ideal. You can register for webhook events and get a notification from DocuSign server for this instead using what we call DocuSign Connect. – Inbar Gazit Apr 28 '21 at 21:59
  • Where do i put the redirectURL – Madhav Joshi Apr 29 '21 at 02:41
  • If you share the code you wrote - I can show you. Do you have code? – Inbar Gazit Apr 29 '21 at 04:10
  • Thanks Gazit, I am able to capture that. – Madhav Joshi Apr 29 '21 at 21:12
  • Can you please check following code and let me know how to capture event --$('#iframeid').on("load", function() { var iframeDocument = document.getElementsByTagName("iframe")[0].contentDocument let x = $("#iframeid").get(0).contentWindow.location; var mydoc = x.search; if(mydoc == "?state=123&event=signing_complete"){ alert("Event Capture"); } }); – Madhav Joshi May 05 '21 at 12:37
  • This is the javascript code you have on the page after you get redirected back to it? What are you trying to do? I'm not clear here. – Inbar Gazit May 05 '21 at 15:36
  • I am trying to capture the redirect url and check – Madhav Joshi May 06 '21 at 16:13
  • then you need to https://stackoverflow.com/questions/901115/how-can-i-get-query-string-values-in-javascript and get the event URL parameter from the URL of the iframe – Inbar Gazit May 06 '21 at 16:34
  • Hi Gazit, Can you please help how to i capture the Finish event using iframe. Redirect url will show me inside the iframe and i want to capture that url so i can put it into my main url? So can you please help how to do that – Madhav Joshi Jun 04 '21 at 15:33
  • https://myuni.sampleapps.docusign.com/ see example of sample app that does this. See if this is what you want, we have the javascript code for you to look at. – Inbar Gazit Jun 04 '21 at 15:39
  • Hi Gazit, Thanks I can not use react in my js so can you please share with simple js using jquery. – Madhav Joshi Jun 04 '21 at 19:48