The signer workflow determines the order in which multiple signers can participate in the signing ceremony.

The Code

You can get the complete example code for this guide from the Developer Community Code Share, here.The sample code below shows you how to edit the signer block in order to set a signer workflow.In this example, there are four signers where each one is required to sign in succession.The second signer will receive a notification to sign the document only after the first signer has completed signing the document and so on and so forth.
 .withSigner(newSignerWithEmail("[email protected]")   .withFirstName("FirstNameSigner1")   .withLastName("LastNameSigner1")   .signingOrder(1))   .withSigner(newSignerWithEmail("[email protected]")   .withFirstName("FirstNameSigner2")   .withLastName("LastNameSigner2")   .signingOrder(2))   .withSigner(newSignerWithEmail("[email protected]")   .withFirstName("FirstNameSigner3")   .withLastName("LastNameSigner3")   .signingOrder(3))   .withSigner(newSignerWithEmail("[email protected]")   .withFirstName("FirstNameSigner4")   .withLastName("LastNameSigner4")   .signingOrder(4)) 
Next, the sample code below shows how to reorders the signing order of signers after creating the package.Here, the signing order of the two signers are swapped.If you've already sent your package, you will need to change the status of your package to DRAFT before you can update the signer workflow.
 DocumentPackage afterReorder = eslClient.getPackage(packageId);   afterReorder.getSigner("[email protected]").setSigningOrder(2);   afterReorder.getSigner("[email protected]").setSigningOrder(1);   eslClient.getPackageService().orderSigners(afterReorder); 
If you need a comparison to the basic document object creation or if this is the first time creating a package with the Java SDK, see this guide.

Running Your Code

Once you’ve run your code, if you log into OneSpan Sign, you should find the appropriate signer workflow in your OneSpan Sign document package, as seen below.

signerorder

Get the Code

The signer workflow determines the order in which multiple signers can participate in the signing ceremony.

The Code

You can get the complete example code for this guide from the Developer Community Code Share, here.The sample code below shows you how to edit the signer block in order to set a signer workflow.In this example, there are four signers where each one is required to sign in succession.The second signer will receive a notification to sign the document only after the first signer has completed signing the document and so on and so forth.
 .WithSigner(SignerBuilder.NewSignerWithEmail("[email protected]")   .WithFirstName("FirstNameSigner1")   .WithLastName("LastNameSigner1")   .SigningOrder(1))   .WithSigner(SignerBuilder.NewSignerWithEmail("[email protected]")   .WithFirstName("FirstNameSigner2")   .WithLastName("LastNameSigner2")   .SigningOrder(2))   .WithSigner(SignerBuilder.NewSignerWithEmail("[email protected]")   .WithFirstName("FirstNameSigner3")   .WithLastName("LastNameSigner3")   .SigningOrder(3))   .WithSigner(SignerBuilder.NewSignerWithEmail("[email protected]")   .WithFirstName("FirstNameSigner4")   .WithLastName("LastNameSigner4")   .SigningOrder(4)) 
Next, the sample code below shows how to reorders the signing order of signers after creating the package.Here, the signing order of the two signers are swapped.If you've already sent your package, you will need to change the status of your package to DRAFT before you can update the signer workflow.
 afterReorder = eslClient.GetPackage(packageId);   afterReorder.GetSigner(email2).SigningOrder = 1;   afterReorder.GetSigner(email1).SigningOrder = 2;   eslClient.PackageService.OrderSigners(afterReorder); 
If you need a comparison to the basic document object creation or if this is the first time creating a package with the .NET SDK, see this guide.

Running Your Code

Once you’ve run your code, if you log into OneSpan Sign, you should find the appropriate signer workflow in your OneSpan Sign document package, as seen below.

signerorder

Get the Code

The signer workflow determines the order in which multiple signers can participate in the signing ceremony.

The Code

You can get the complete example code for this guide from the Developer Community Code Share, here.The sample request below shows you how to edit the roles object in order to set a signer workflow.In this example, there are four signers where each one is required to sign in succession.The second signer will receive a notification to sign the document only after the first signer has completed signing the document and so on and so forth.

HTTP Request

POST /api/packages

HTTP Headers

Accept: application/jsonContent-Type: application/jsonAuthorization: Basic api_key

Request Payload

 {   "roles": [   {   "id": "role1",   "index": 1,   "type": "SIGNER",   "signers": [   {   "email": "[email protected]",   "firstName": "FirstNameSigner1",   "lastName": "LastNameSigner1"   }   ],   "name": "signer1"   },   {   "id": "role2",   "index": 2,   "type": "SIGNER",   "signers": [   {   "email": "[email protected]",   "firstName": "FirstNameSigner2",   "lastName": "LastNameSigner2"   }   ],   "name": "signer2"   },   {   "id": "role3",   "index": 3,   "type": "SIGNER",   "signers": [   {   "email": "[email protected]",   "firstName": "FirstNameSigner3",   "lastName": "LastNameSigner3"   }   ],   "name": "signer3"   },   {   "id": "role4",   "index": 4,   "type": "SIGNER",   "signers": [   {   "email": "[email protected]",   "firstName": "FirstNameSigner4",   "lastName": "LastNameSigner4"   }   ],   "name": "signer4"   }   ]   } 
For a complete description of each field, take a look at the Request Payload section below.

Response Payload

 {   "id": "9sKhW-h-qS9m6Ho3zRv3n2a-rkI="   } 
Next, to update the role workflow, you will need to make a PUT request to:

HTTP Request

PUT /api/packages/{packageId}/roles

HTTP Headers

Accept: application/jsonContent-Type: application/jsonAuthorization: Basic api_key

Request Payload

 [{   "id":"OGCBUbLGa7gR",   "index":0   },   {   "id":"CnvwToUWLPgW",   "index":1   }] 
The sample JSON above shows how to reorders the signing order of roles after creating the package.Here, the signing order of the two roles are swapped.If you've already sent your package, you will need to change the status of your package to DRAFT before you can update the role workflow.If you need a comparison to the basic document object creation or if this is the first time creating a package with the REST API, see this guide.

Running Your Code

Once you’ve run your code, if you log into eSignLive, you should find the appropriate signer workflow in your OneSpan Sign document package, as seen below.

signerorder

Get the Code

Request Payload

PropertyTypeEditableRequiredDefaultSample Value(s)
roles
idstringYesNon/arole1
indexintegerYesNo01 / 2 / 3 ...
typestringYesNoSIGNERSIGNER / SENDER
signers
namestringYesNon/asigner1
emailstringYesNon/a[email protected]
firstNamestringYesNon/aFirstNameSigner1
lastNamestringYesNon/aLastNameSigner1
The signer workflow determines the order in which multiple signers can participate in the signing ceremony.

The Code

You can get the complete example code for this guide from the Developer Community Code Share, here.The sample code below shows you how to edit the signer block in order to set a signer workflow.In this example, there are four signers where each one is required to sign in succession.The second signer will receive a notification to sign the document only after the first signer has completed signing the document and so on and so forth.
 //Method1: add signing order when creating role   ESignLiveAPIObjects.Role role1 = new ESignLiveAPIObjects.Role();   role1.id = 'signer1';   role1.index = 1;   role1.signers = sdk.createRolesSigner('FirstNameSigner1', 'LastNameSigner1', '[email protected]', 'Applicant', 'xxx Company');   sdk.helper.createRole(packageId, role1);   ESignLiveAPIObjects.Role role2 = new ESignLiveAPIObjects.Role();   role2.id = 'signer2';   role2.index = 2;   role2.signers = sdk.createRolesSigner('FirstNameSigner2', 'LastNameSigner2', '[email protected]', 'Director', 'ABC Bank');   sdk.helper.createRole(packageId, role2);   ESignLiveAPIObjects.Role role3 = new ESignLiveAPIObjects.Role();   role3.id = 'signer3';   role3.index = 3;   role3.signers = sdk.createRolesSigner('FirstNameSigner3', 'LastNameSigner3', '[email protected]', 'Applicant', 'xxx Company');   sdk.helper.createRole(packageId, role3);   ESignLiveAPIObjects.Role role4 = new ESignLiveAPIObjects.Role();   role4.id = 'signer4';   role4.index = 4;   role4.signers = sdk.createRolesSigner('FirstNameSigner4', 'LastNameSigner4', '[email protected]', 'Director', 'ABC Bank');   sdk.helper.createRole(packageId, role4); 
Next, the sample code below shows how to reorders the signing order of signers after creating the package.Here, the signing order of the two signers are swapped.If you’ve already sent your package, you will need to change the status of your package to DRAFT before you can update the signer workflow.
 sdk.setSigningOrder('packageId', 'signer1',2);   sdk.setSigningOrder('packageId', 'signer2',1); 
If you need a comparison to the basic document object creation or if this is the first time creating a package with the Apex SDK, see this guide.

Running Your Code

Once you’ve run your code, if you log into OneSpan Sign, you should find the appropriate signer workflow in your OneSpan Sign document package, as seen below.

signerorder

Get the Code