docusignapipowerform

DocuSign: Is it possible to send a custom payload via PowerForm link and get it back via webhook?


I am integrating with DocuSign APIs and I wonder if it's possible to pull off the following scenario:

  1. GET a PowerForm to obtain its URL
  2. Attach a custom payload to the URL (e.g., some stringified and urlencoded JSON)
  3. Send the URL to a user
  4. Have the user sign the documents attached to the PowerForm's template
  5. Receive the callback on my webhook
  6. Recover the custom payload somehow

The context is this: I want to send a specific user a document to sign and when they do it - recognize their specific notification. And this would be a part of a chat over SMS or Skype (chatbot) - so return URL is not really a good option.

I was looking in the direction of Template Custom Fields API because you can in fact fill them using the URL. But it looks like custom fields have to be visible on the document while it is signed and it poses a problem - having something like dfd84fc1-317f-4939-9dfb-4350d2127d2f (even "asterisked") would be a bad UX for the end user.

It's the first time I'm working with DocuSign APIs and so I hope it's just my missing something in the basic concepts... Hence I'm posting this question.


Solution

  • You can use a Template Custom Field with the text colored white to match the background. The text will still be 'burned in' to the document (findable via ctrl-f), but it won't appear to the signer.

    Alternatively, you can use an Envelope Custom Field - these are not visible to the signer, they don't burn in to the document, but they are retained as 'metadata' accessible via the API. Per https://docs.docusign.com/DocuSignHelp/Content/populate-custom-fields.htm:

    Envelope Field: To populate an envelope field in the Web PowerForm, add the following text in the URL:
    EnvelopeField_<EnvelopeFieldName>=<value>
    Where <EnvelopeFieldName> is the name of the envelope field in the Web PowerForm and the <value> is the value you want in the field.
    Example: EnvelopeField_Region=Northwest
    

    You can retrieve that information with a call to

    GET /v2/accounts/{accountId}/envelopes/{envelopeId}/custom_fields
    

    as per https://developers.docusign.com/esign-rest-api/reference/Envelopes/EnvelopeCustomFields/list

    Envelope Custom Fields are also included in a Connect publish