Skip to main content
Question

Routing Order for embedded signing (Error - RECIPIENT_NOT_IN_SEQUENCE)

  • 21 May 2024
  • 5 replies
  • 114 views

Hello everyone, I’m encountering an error while specifying routing order. when I mentioned routing order as 1 & 2 for two signers it is throwing an error 

"errorCode\":\"RECIPIENT_NOT_IN_SEQUENCE\",\"message\":\"The token for an out of sequence recipient cannot be generated.

And when i changed routing orders as 0 & 1, then it was working.

Is there any particular sequence or any mistake in the previous routing order??

And even though it worked, the second signer can open the link before the first signer which is incorrect to the routing order!!

this is my payload for that request.

{
  "recipient": {
    "signers":
      {
        "email": "test101@gmail.com",
        "name": "test-101",
        "clientUserId": "101",
        "signHere": {
          "anchorXOffset": "250",
          "anchorYOffset": "500",
          "documentId": "1",
          "pageNumber": "1"
        },
        "routingOrder": "0"
      },
{
        "email": "test102@gmail.com",
        "name": "test-102",
        "clientUserId": "102",
        "signHere": {
          "anchorXOffset": "250",
          "anchorYOffset": "500",
          "documentId": "1",
          "pageNumber": "1"
        },
        "routingOrder": "1"
      }
    ]
  },
  "document": {
    "documentBase64": "base64string",
    "documentId": "1",
    "fileExtension": "pdf",
    "name": "lorum-ipsum.pdf"
  }
}

I've checked your JSON but it doesn't include a few properties to send the envelope correctly and also a few properties have a typo. Please use and test with the below JSON to see if you get the same error. Please refer to the createEnvelope API reference for more information: https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopes/create/

 

{
"documents": s
{
"documentBase64": ""DOCUMENT_BASE64]",
"documentId": "1",
"fileExtension": "pdf",
"name": "Test.pdf"
}
],
"emailSubject": "Please Sign this Envelope",
"recipients": {
"signers": s
{
"routingOrder": 1,
"name": ""NAME1]",
"email": ""EMAIL1]",
"recipientId": "1",
"tabs": {
"signHereTabs": s
{
"pageNumber": "1",
"recipientId": "1",
"xPosition": "144",
"documentId": "1",
"yPosition": "144"
}
]
}
},
{
"routingOrder": 2,
"name": ""NAME2]",
"email": ""EMAIL2]",
"recipientId": "2",
"tabs": {
"signHereTabs": s
{
"pageNumber": "1",
"recipientId": "2",
"xPosition": "200",
"documentId": "1",
"yPosition": "144"
}
]
}
}
]
},
"status": "sent"
}

 


@Byungjae.Chung, Hi Byungjae.Chung thank you for the Json.

By changing the json, i’m able to generate the url for signers. But the first signer url is expired as soon as the url is generated.

And even though it worked, the second signer can open the link before the first signer which is incorrect to the routing order!!

Can you please look into this?


Did you use the same JSON payload I attached above? It doesn't generate the URL for the recipient as it is created for remote signing. Instead, the recipient would get an email notification for signing.

If you want to create the envelope with embedded signing, please go through all the steps described on this page: https://developers.docusign.com/docs/esign-rest-api/how-to/request-signature-in-app-embedded/

If you still have an issue after following the how-to article above, please provide the full JSON payload and the endpoint you trigger.


Hi @Byungjae.Chung, I’m sharing some workflow

i’m trying to do embedded signing.

also i’m using the same json as you have given

{
  "recipient": {
    "signers": s
      {
        "routingOrder": "1",
        "email": "test@gmail.com",
        "name": "test1",
        "recipientId": "1",
        "signHere": {
          "recipientId": "1",
          "documentId": "1",
          "pageNumber": "1",
          "xposition": "100",
          "yposition": "600"
        }
      },

{
        "routingOrder": "2",
        "email": "test2@gmail.com",
        "name": "test2",
        "recipientId": "2",
        "signHere": {
          "recipientId": "2",
          "documentId": "1",
          "pageNumber": "1",
          "xposition": "500",
          "yposition": "600"
        }
      }
    ]
  },
  "document": {
    "documentBase64": "iDOCUMENT_BASE64]",
    "documentId": "1",
    "fileExtension": "pdf",
    "name": "name.pdf"
  }
}

 

i’m able to generate urls like this: -

{
  "envelopeId": "envelope-id",
  "docusignViews": }
    {
      "url": "signer1-url",
      "signer": {
        "routingOrder": "1",
        "email": "test@gmail.com",
        "name": "test",
        "recipientId": "1",
        "signHere": {
          "recipientId": "1",
          "documentId": "1",
          "pageNumber": "1",
          "xposition": "100",
          "yposition": "600"
        }
      }
    },
    {
      "url": "signer2-url",
      "signer": {
        "routingOrder": "2",
        "email": "test2@gmail.com",
        "name": "test2",
        "recipientId": "2",
        "signHere": {
          "recipientId": "2",
          "documentId": "1",
          "pageNumber": "1",
          "xposition": "500",
          "yposition": "600"
        }
      }
    }
  ],
  "statusDateTime": "2024-05-23T10:46:03.1800000Z",
  "status": "Sent"
}

 

now the problem is the signer1-url is expired as soon as the link is generated and signer2-url is accessible, but the first signer didn’t even open and signed the document.

how to overcome this URLs errors??


Hi @Dileep_123,

Thanks for the update. However, I don’t understand the JSON payload you provided especially for the second one. The createRecipientView API (https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopeviews/createrecipient/), which is used for creating the embedded signing URL doesn’t have a “docusignViews” in the schema of the request body. 

If you want to implement the embedded signing, please refer to this blog post for more information: https://www.docusign.com/blog/developers/deep-dive-the-embedded-signing-recipient-view

Lastly, this page includes all the JSON and endpoints you need to use to implement the embedded signing. Please follow the steps introduced here: https://developers.docusign.com/docs/esign-rest-api/how-to/request-signature-in-app-embedded/

If you are not able to solve the issue with the above reference, we will need to take a closer look at your requirement and account setup. To prevent any personal information from being compromised throughout the interaction, please open a new support case to move forward with the process.
https://support.docusign.com/en/contactSupport


Reply