Edit the webhook URL after envelope creation - docusignapi

Is it possible to edit the webhook url after the envelope has already been created?
During the envelope creation I create the webhook url using:
$event_notification = new \DocuSign\eSign\Model\EventNotification();
$event_notification->setUrl("https://mywebhooks.com/docusign/index.php");
$envelope_definition = new DocuSign\eSign\Model\EnvelopeDefinition();
$envelope_definition->setEventNotification($event_notification);
Everything works and it's hitting the url as expected.
However, recently we have added authentication to our webhook url and want to add a GET param to the url so we can validate it when we get hit by this call.
So the updated URL is set to $event_notification->setUrl("https://mywebhooks.com/docusign/index.php?api_key=docusign_webhook_key"); but now the old envelopes that have already been created without this param will hit our system and not get authenticated because it's missing the param.
Is there any way to update the URL's of the already created envelopes?
(There is a way to hardcode the webhook url in the console - https://support.docusign.com/en/guides/ndse-admin-guide-custom-connect-configuration-htm. That works fine when i add it there. But it then gets hits twice and will cause failures on our end.)

No, it looks like in-flight envelopes cannot have their EventNotifications changed.

Related

Pega 7.3 Connect-Rest with multiple URLS

I am trying to figure out how to use multiple URLs in a Connect-Rest in Pega 7.3 to connect to DocuSign using the DocuSign Pega integration that is built by Pega.
I have a specific link that contains API keys that I am required to use as the resource path in my Connect-Rest. However, I also have another link that calls a specific instance of DocuSign so that the info from Pega goes directly to the DocuSign instance.
I know that Pega has updated their connect-rest functionality in the current version but my question is does anyone know if there is a way to incorporate multiple urls into one connect-rest.
Thank you in advance.
I don't know what you mean by "connect-rest."
DocuSign has the "Connect" feature for sending webhook notifications when an envelope's status changes. All envelope sent by selected (or all) users will be monitored. You can create multiple Connect subscriptions so that multiple URLs will be sent when an envelope's status changes.
DocuSign also has "individual envelope webhooks." This feature is configured when an envelope is created via the API and the create request includes the EventNotification attribute. A maximum of one URL can be set per envelope.
If you are invoking Connect-Rest from a pega activity, you can capture the relevant URL as variable and pass that to function call to 'Connect-Rest' within activity. Another useful way maybe to use dynamic system setting and use #(Pega-RULES:Utilities).getSystemSetting() function to read the value of URL saved in the Dynamic system settings

how to get the signed document and response after signing in Docusign

So i am using docusign and testing the api with a simple index.php type project and i have successfully sent the document to the email provided in the
$signerEmail = 'test#test.com' using docusign api-client
now after it have signed the document and finish it by clicking at the finish button in docusign window. I want to retrieve the response and document on which it have given its information.
how can i achieve this and right now i am having difficulty to find it in the documentation.
There are 2 ways to do that, synchronously and asynchronously.
Or in other words, if you know the document is already complete, you can run the code, or you can use a webhook with notifications from DocuSign letting you know that the envelope is complete.
Regardless, the API to retrieve a document is this:
GET /v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}
or you can use it from the PHP SDK as well.
Hope this helps.
A full code example (in PHP as well) can be found here - https://developers.docusign.com/esign-rest-api/code-examples/code-example-download-envelope-documents

Creating form data via rest doesn't trigger autoresponder

Kentico 10. When I make a rest request to post data to the kentico form module I get a successful http 201 back and I can see the data created in the kentico interface. This particular form I am posting data to has an autoresponder set up.
I have a default smtp server set up and can successfully email out through it, which leads me to believe that the autoresponder on the form does not get triggered when data is created in the kentico form via rest. I never see the autoresponder attempt to send an email in either the email queue module or the event viewer (with the proper web.config key set).
Is that the intended behavior, to not trigger the autoresponder when forms module data is created via a rest request? If so, any idea how to get it to trigger?
Yes you are correct. Kentico REST is meant to perform simple CRUD operations. Essentially what you doing is the same as if you do it inside the admin i.e. go inside admin -> forms -> your form name -> recorded data and add new record. It doesn't trigger anything like sending email or Redirect to URL etc.
What you can do if you want to send email using form global events and on insert send email yourself. Here is the example of using global events

Docusign API - on Cancel get url to return to

Using the API, I generate the document and place my tags. User goes to sign and decides to finish later. It passes an event="cancelled" to my callback. I make note in my system that they cancelled it. But how can I get them back to the form later? There is no "authentication" with this. I do all the authentication on my end. So I need a URL to send them back to. Using the URL the api gives me to load in iframe expires. So how do I sent them Back to document?
I use PHP by the way.
Here are 2 possible causes (there may be others):
A 'Signing ceremony UX URL' has a short time to live (300 seconds or less I believe) so ensure you are making the call to retrieve a URL right when the user intends to perform the signing session.
A 'Signing ceremony UX URL' can only be rendered once. Verify that you are in fact retrieving a new URL each time and not reusing the original URL.
See this recipe from the DocuSign Developer Center. Repeat step 3 to retrieve a new URL to present to your user.

DocuSign embedded envelope correct returnUrl not working

I am using an embedded envelope correct view in my website. I have attempted to define the returnUrl, but the view seems to always return to the DocuSign console. I am still using a demo account, so I'm thinking this may be a feature that's only available on production accounts?
I'm posting to
https://demo.docusign.net/restapi/v2/accounts/{account_id}/envelopes/{envelope_id}/views/correct
and passing the following fields:
{
"returnUrl": "http://www.docusign.com/devcenter",
"supressNavigation": "true"
}
I get a successful response and the provided URL works correctly to edit an envelope, it just still shows the navigation and doesn't forward to the specified return URL after editing. Are these features available on a demo account and if so, do I need to enable them somewhere?
I too am seeing the same results (i.e. returnUrl and suppressNavigation are ignored with the embedded envelope correction api call).
Bug has been logged with DocuSign, for internal reference this is bug TRI-707. I'll update this post and add comments as more info becomes available.

Resources