docusignapi - How to get docusign webhook to retry on failure?
问题描述
I'm able to correctly set up and monitor any changes to docusign envelopes.
However, I'm trying to get this edge case working: if my listener is not active, I want docusign to retry.
I've tried adding "requireAcknowledgment" to true when creating my envelope, however, that does not seem to change anything. I can see the failures on my admin panel's connect tab. But they only retry if I manually trigger them.
event_notification = DocuSign_eSign::EventNotification.new({
:url => webhook_url,
:includeDocuments => false,
:envelopeEvents => [
DocuSign_eSign::EnvelopeEvent.new({:envelopeEventStatusCode => "sent"}),
DocuSign_eSign::EnvelopeEvent.new({:envelopeEventStatusCode => "delivered"}),
DocuSign_eSign::EnvelopeEvent.new({:envelopeEventStatusCode => "completed"}),
DocuSign_eSign::EnvelopeEvent.new({:envelopeEventStatusCode => "declined"}),
DocuSign_eSign::EnvelopeEvent.new({:envelopeEventStatusCode => "voided"}),
],
:loggingEnabled => true,
:requireAcknowledgment => true #retry on failure
})
# create the envelope definition with the template_id
envelope_definition = DocuSign_eSign::EnvelopeDefinition.new({
:status => 'sent',
:eventNotification => event_notification,
:templateId => @template_id
})
Some related threads that I've looked into: Docusign webhook listener - is there a retry?
解决方案
Connect will retry automatically once a successful publish to the same endpoint has occurred. If the first retry fails, a second will not be attempted until 24 hours have passed.