How to get embedded signing URL for signers who are assigned by agents/intermediaries in DocuSign?

Viewed 685

When using agents/intermediaries to assign signers in DocuSign, we set the clientUserId for the signers to use the embedded signing feature. But DocuSign will automatically send out the email to the assigned signers and we are not able to obtain the signing URL through the API POST {{baseUrl}}/v2.1/accounts/{{accountId}}/envelopes/{{envelopeId}}/views/recipient.

As suggested in this thread: https://stackoverflow.com/a/63810135/13191875 . It's due to the clientUserId was removed when agents/intermediaries change the signer's email/name info. It suggests that a workflow could be added to pause the process after the signer's email/name info is changed, and then add the clientUserId to the signer, then resume the workflow.

I tried with request body:

{
  "recipients": {
    "intermediaries": [
      {
        "clientUserId": "1",
        "email": "aaa@example.com.au",
        "name": "Intermediary",
        "recipientId": "1",
        "routingOrder": "1"
      }
    ],
    "signers": [
      {
        "clientUserId": "2",
        "email": "example@example.com",
        "name": "example",
        "recipientId": "2",
        "routingOrder": "2",
        "tabs": {
          "signHereTabs": [
            {
              "anchorIgnoreIfNotPresent": "false",
              "anchorString": "Signature_anchor_1",
              "anchorUnits": "pixels",
              "anchorYOffset": "0",
              "name": "Please sign here",
              "recipientId": "1"
            }
          ]
        }
      }
    ]
  },
  "workflow": {
    "workflowSteps": [
      {
        "action": "pause_before",
        "itemId": "2",
        "triggerOnItem": "routing_order"
      }
    ]
  },
  "emailSubject": "DocuSign API - Signature Request on Document Call",
  "documents": [
    {
      "documentId": "1",
      "name": "{{fileName}}",
      "documentBase64": "{{fileBase64}}"
    }
  ],
  "status": "sent"
}

I can set the clientUserId after the signer's email/name is changed. But the workflow cannot be resumed by calling the API PUT {{baseUrl}}/v2.1/accounts/{{accountId}}/envelopes/{{envelopeId}}?resend_envelope=true. So the signer's signing URL cannot be obtained since the process is paused, the signer's status stays in created.

I also tried the with agents:

{
  "recipients": {
    "agents": [
      {
        "clientUserId": "1",
        "email": "aaa@example.com.au",
        "name": "Agent",
        "recipientId": "1",
        "routingOrder": "1"
      }
    ],
    "signers": [
      {
        "clientUserId": "2",
        "email": "",
        "name": "",
        "recipientId": "2",
        "routingOrder": "2",
        "tabs": {
          "signHereTabs": [
            {
              "anchorIgnoreIfNotPresent": "false",
              "anchorString": "Signature_anchor_1",
              "anchorUnits": "pixels",
              "anchorYOffset": "0",
              "name": "Please sign here",
              "recipientId": "1"
            }
          ]
        }
      }
    ]
  },
  "workflow": {
    "workflowSteps": [
      {
        "action": "pause_before",
        "itemId": "2",
        "triggerOnItem": "routing_order"
      }
    ]
  },
  "emailSubject": "DocuSign API - Signature Request on Document Call",
  "documents": [
    {
      "documentId": "1",
      "name": "{{fileName}}",
      "documentBase64": "{{fileBase64}}"
    }
  ],
  "status": "sent"
}

After the name/email is added by the agent, the process is paused and I set the clientUserId for the signer, I verified that it is added by calling the get recipients info API. After I resume the process, an email is sent by DocuSign to the signer and I cannot get the embedded signing URL for that signer. I can see the clientUserId is removed for that signer by calling the get recipients info API again.

My question is:

  1. when using agents/intermediaries in DocuSign, is it possible that we can obtain the embedded signing URL for the assigned signer whose email is updated/added by agents/intermediaries?
  2. when using agents/intermediaries in DocuSign, is it possible that we can turn off that email from DocuSign to the signer, whose email is updated/added by agents/intermediaries?
2 Answers

when using agents/intermediaries in DocuSign, is it possible that we can obtain the embedded signing URL for the assigned signer whose email is updated/added by agents/intermediaries?

Yes, but you'll first need to assign a clientUserId to the recipient. And since the recipient has already been sent an email invite to the signing ceremony, adding a clientUserId attribute is problematic since doing so will invalidate the email invite.

when using agents/intermediaries in DocuSign, is it possible that we can turn off that email from DocuSign to the signer, whose email is updated/added by agents/intermediaries?

To do this, you need to stop the workflow as I described in the other answer.

Much better would be to expand your API application so that it is used to change the name/email of the signer. That way your application can also set the clientUserId at the same time and the signer won't receive any email.

Basically, embedded signing is only intended to work if the envelope is created/edited via an API program. Your goal of using an API program and using the regular DocuSign Web App (which focuses on email delivery, not embedded signing) is mixing apples and oranges. It is possible but problematic.

You can potentially use the new Advanced Recipient Routing (ARR) feature to pause the envelope, obtain the information about the next recipient (via GET call to listRecipients) and then modify it to add the clientUserId. I have not tried this, but in theory that should work. ARR is now available in demo/developer accounts for all new accounts created. https://developers.docusign.com/docs/esign-rest-api/how-to/pause-workflow has information about how to create the envelope such that it pauses after a specific routing number. https://developers.docusign.com/docs/esign-rest-api/how-to/unpause-workflow shows how to resume the envelope once you made your change. The other thing you may need to do is add a webhook call for when the status of the intermediary was updated so you know when to update the next recipient (but before you can do that you would have to obtain the information about the new recipient).

Related